ecl::CartesianPoint< T, 2 > Class Template Reference

Specialisation for a cartesian point of dimension 2. More...

`#include <cartesian_point.hpp>`

## Public Member Functions

CartesianPoint (const CartesianPoint< T, 2 > &point)
Default copy constructor. More...

CartesianPoint (const ecl::linear_algebra::Matrix< T, 2, 1 > &vec)
Initialises with the specified input vector. More...

CartesianPoint (const T &value=T())
Default constructor - sets all elements to the same value. More...

CartesianPoint (const T &x_i, const T &y_i)

distance (const CartesianPoint< T, 2 > &other)

double get_angle (void)

double Norm (void)

Normalize (void)

bool operator!= (const CartesianPoint< T, 2 > &other) const

CartesianPoint< T, 2 > operator* (double d) const

CartesianPoint< T, 2 > operator+ (const CartesianPoint< T, 2 > &v) const

void operator+= (const CartesianPoint< T, 2 > &other)

CartesianPoint< T, 2 > operator- (const CartesianPoint< T, 2 > &v) const

ecl::linear_algebra::CommaInitializer< ecl::linear_algebra::Matrix< T, 2, 1 > > operator<< (const T &value)

const CartesianPoint< T, 2 > & operator= (const CartesianPoint< T, 2 > &v)

bool operator== (const CartesianPoint< T, 2 > &other) const

T & operator[] (const unsigned int &index)

const T operator[] (const unsigned int &index) const

ecl::linear_algebra::Matrix< T, 2, 1 > & positionVector ()
Representation of the position vector in eigen vector format. More...

const ecl::linear_algebra::Matrix< T, 2, 1 > & positionVector () const
Representation of the position vector in const eigen vector format. More...

void rotate (const double &angle)

unsigned int size ()
Size/dimension of the cartesian point. More...

x ()
Returns a copy of the x co-ordinate. More...

const T & x () const
Returns a constant reference to the x co-ordinate. More...

y ()
Returns a copy of the y co-ordinate. More...

const T & y () const
Returns a constant reference to the y co-ordinate. More...

virtual ~CartesianPoint ()

## Private Attributes

ecl::linear_algebra::Matrix< T, 2, 1 > elements

## Friends

template<typename OutputStream , typename Type >
OutputStream & operator<< (OutputStream &ostream, const CartesianPoint< Type, 2 > &point)

## Detailed Description

### template<typename T> class ecl::CartesianPoint< T, 2 >

Specialisation for a cartesian point of dimension 2.

It introduces handles to x(), y(), z() for convenience, whilst still permitting a vector representation of the underlying storage container via the positionVector() method.

Template Parameters
 T : the underlying element type.
CartesianPoint2d, CartesianPoint2f, CartesianPoint2i.

Definition at line 305 of file cartesian_point.hpp.

## ◆ CartesianPoint() [1/4]

template<typename T >
 ecl::CartesianPoint< T, 2 >::CartesianPoint ( const T & value = `T()` )
inline

Default constructor - sets all elements to the same value.

Definition at line 312 of file cartesian_point.hpp.

## ◆ CartesianPoint() [2/4]

template<typename T >
 ecl::CartesianPoint< T, 2 >::CartesianPoint ( const ecl::linear_algebra::Matrix< T, 2, 1 > & vec )
inline

Initialises with the specified input vector.

Parameters
 vec : input three dimensional vector.

Definition at line 318 of file cartesian_point.hpp.

## ◆ CartesianPoint() [3/4]

template<typename T >
 ecl::CartesianPoint< T, 2 >::CartesianPoint ( const CartesianPoint< T, 2 > & point )
inline

Default copy constructor.

Parameters
 point : copy this point directly.

Definition at line 324 of file cartesian_point.hpp.

## ◆ CartesianPoint() [4/4]

template<typename T >
 ecl::CartesianPoint< T, 2 >::CartesianPoint ( const T & x_i, const T & y_i )
inline

Definition at line 326 of file cartesian_point.hpp.

## ◆ ~CartesianPoint()

template<typename T >
 virtual ecl::CartesianPoint< T, 2 >::~CartesianPoint ( )
inlinevirtual

Definition at line 330 of file cartesian_point.hpp.

## ◆ distance()

template<typename T >
 T ecl::CartesianPoint< T, 2 >::distance ( const CartesianPoint< T, 2 > & other )
inline

Definition at line 452 of file cartesian_point.hpp.

## ◆ get_angle()

template<typename T >
 double ecl::CartesianPoint< T, 2 >::get_angle ( void )
inline

Definition at line 442 of file cartesian_point.hpp.

## ◆ Norm()

template<typename T >
 double ecl::CartesianPoint< T, 2 >::Norm ( void )
inline

Definition at line 489 of file cartesian_point.hpp.

## ◆ Normalize()

template<typename T >
 T ecl::CartesianPoint< T, 2 >::Normalize ( void )
inline

Definition at line 458 of file cartesian_point.hpp.

## ◆ operator!=()

template<typename T >
 bool ecl::CartesianPoint< T, 2 >::operator!= ( const CartesianPoint< T, 2 > & other ) const
inline

Definition at line 425 of file cartesian_point.hpp.

## ◆ operator*()

template<typename T >
 CartesianPoint ecl::CartesianPoint< T, 2 >::operator* ( double d ) const
inline

Definition at line 474 of file cartesian_point.hpp.

## ◆ operator+()

template<typename T >
 CartesianPoint ecl::CartesianPoint< T, 2 >::operator+ ( const CartesianPoint< T, 2 > & v ) const
inline

Definition at line 479 of file cartesian_point.hpp.

## ◆ operator+=()

template<typename T >
 void ecl::CartesianPoint< T, 2 >::operator+= ( const CartesianPoint< T, 2 > & other )
inline

Definition at line 447 of file cartesian_point.hpp.

## ◆ operator-()

template<typename T >
 CartesianPoint ecl::CartesianPoint< T, 2 >::operator- ( const CartesianPoint< T, 2 > & v ) const
inline

Definition at line 484 of file cartesian_point.hpp.

## ◆ operator<<()

template<typename T >
 ecl::linear_algebra::CommaInitializer< ecl::linear_algebra::Matrix > ecl::CartesianPoint< T, 2 >::operator<< ( const T & value )
inline

Provides a comma initialisation facility. This initiates the comma initialiser with an iterator to the underlying elements and then leaves the initialiser to do the rest. The initialiser will do range checking if NDEBUG is not defined.

CartesianPoint<double,2> point; // At this point it is initialised with default values.
point << 1.0,2.0,2.0; // If NDEBUG is not defined, this will throw if you exceed the range.
Parameters
 value : the first of three points to enter.
Returns
BoundedListInitialiser : the comma initialiser mechanism.

Definition at line 348 of file cartesian_point.hpp.

## ◆ operator=()

template<typename T >
 const CartesianPoint& ecl::CartesianPoint< T, 2 >::operator= ( const CartesianPoint< T, 2 > & v )
inline

Definition at line 362 of file cartesian_point.hpp.

## ◆ operator==()

template<typename T >
 bool ecl::CartesianPoint< T, 2 >::operator== ( const CartesianPoint< T, 2 > & other ) const
inline

Definition at line 419 of file cartesian_point.hpp.

## ◆ operator[]() [1/2]

template<typename T >
 T& ecl::CartesianPoint< T, 2 >::operator[] ( const unsigned int & index )
inline

Definition at line 352 of file cartesian_point.hpp.

## ◆ operator[]() [2/2]

template<typename T >
 const T ecl::CartesianPoint< T, 2 >::operator[] ( const unsigned int & index ) const
inline

Definition at line 357 of file cartesian_point.hpp.

## ◆ positionVector() [1/2]

template<typename T >
 ecl::linear_algebra::Matrix& ecl::CartesianPoint< T, 2 >::positionVector ( )
inline

Representation of the position vector in eigen vector format.

Converts representation to an eigen vector reference - oft necessary in mathematics calculations.

Returns
Matrix<T,2,1> : a reference to the underlying storage container.

Definition at line 374 of file cartesian_point.hpp.

## ◆ positionVector() [2/2]

template<typename T >
 const ecl::linear_algebra::Matrix& ecl::CartesianPoint< T, 2 >::positionVector ( ) const
inline

Representation of the position vector in const eigen vector format.

Converts representation to a const eigen vector reference - oft necessary in mathematics calculations.

Returns
Matrix<T,2,1> : a reference to the underlying storage container.

Definition at line 383 of file cartesian_point.hpp.

## ◆ rotate()

template<typename T >
 void ecl::CartesianPoint< T, 2 >::rotate ( const double & angle )
inline

Definition at line 431 of file cartesian_point.hpp.

## ◆ size()

template<typename T >
 unsigned int ecl::CartesianPoint< T, 2 >::size ( )
inline

Size/dimension of the cartesian point.

Size/dimension of the cartesian point.

Returns
unsigned int : size/dimension.

Definition at line 392 of file cartesian_point.hpp.

## ◆ x() [1/2]

template<typename T >
 T ecl::CartesianPoint< T, 2 >::x ( )
inline

Returns a copy of the x co-ordinate.

Returns
T : x value.

Definition at line 411 of file cartesian_point.hpp.

## ◆ x() [2/2]

template<typename T >
 const T& ecl::CartesianPoint< T, 2 >::x ( ) const
inline

Returns a constant reference to the x co-ordinate.

Returns
const T& : x value.

Definition at line 399 of file cartesian_point.hpp.

## ◆ y() [1/2]

template<typename T >
 T ecl::CartesianPoint< T, 2 >::y ( )
inline

Returns a copy of the y co-ordinate.

Returns
T : y value.

Definition at line 417 of file cartesian_point.hpp.

## ◆ y() [2/2]

template<typename T >
 const T& ecl::CartesianPoint< T, 2 >::y ( ) const
inline

Returns a constant reference to the y co-ordinate.

Returns
const T& : y value.

Definition at line 405 of file cartesian_point.hpp.

## ◆ operator<<

template<typename T >
template<typename OutputStream , typename Type >
 OutputStream& operator<< ( OutputStream & ostream, const CartesianPoint< Type, 2 > & point )
friend

Insertion operator for sending the array to an output stream. This is raw, and has no formatting.

Parameters
 ostream : the output stream. point : the point to be inserted.
Returns
OutputStream : continue streaming with the updated output stream.

Definition at line 520 of file cartesian_point.hpp.

## ◆ elements

template<typename T >
 ecl::linear_algebra::Matrix ecl::CartesianPoint< T, 2 >::elements
private

Definition at line 504 of file cartesian_point.hpp.

The documentation for this class was generated from the following file:

ecl_geometry
Author(s): Daniel Stonier
autogenerated on Sun Aug 2 2020 03:12:16