Public Member Functions | Private Attributes | Friends | List of all members
ecl::CartesianPoint< T, 3 > Class Template Reference

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

#include <cartesian_point.hpp>

Public Member Functions

 CartesianPoint (const ecl::linear_algebra::Matrix< T, 3, 1 > &vec)
 Initialises with the specified eigen style 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, const T &z_i)
 Initialises the point with the specified values. More...
 
ecl::linear_algebra::CommaInitializer< ecl::linear_algebra::Matrix< T, 3, 1 > > operator<< (const T &value)
 
ecl::linear_algebra::Matrix< T, 3, 1 > & positionVector ()
 Representation of the position vector in eigen vector format. More...
 
const ecl::linear_algebra::Matrix< T, 3, 1 > & positionVector () const
 Representation of the position vector in const eigen vector format. More...
 
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...
 
z ()
 Returns a copy of the z co-ordinate. More...
 
const T & z () const
 Returns a constant reference to the z co-ordinate. More...
 
virtual ~CartesianPoint ()
 

Private Attributes

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

Friends

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

Detailed Description

template<typename T>
class ecl::CartesianPoint< T, 3 >

Specialisation for a cartesian point of dimension 3.

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.
See also
CartesianPoint3d, CartesianPoint3f, CartesianPoint3i.

Definition at line 150 of file cartesian_point.hpp.

Constructor & Destructor Documentation

◆ CartesianPoint() [1/3]

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

Default constructor - sets all elements to the same value.

Definition at line 157 of file cartesian_point.hpp.

◆ CartesianPoint() [2/3]

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

Initialises with the specified eigen style vector.

Parameters
vec: input three dimensional eigen style vector.

Definition at line 163 of file cartesian_point.hpp.

◆ CartesianPoint() [3/3]

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

Initialises the point with the specified values.

Parameters
x_i: x co-ordinate.
y_i: y co-ordinate.
z_i: z co-ordinate.

Definition at line 171 of file cartesian_point.hpp.

◆ ~CartesianPoint()

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

Definition at line 175 of file cartesian_point.hpp.

Member Function Documentation

◆ operator<<()

template<typename T >
ecl::linear_algebra::CommaInitializer< ecl::linear_algebra::Matrix<T,3,1> > ecl::CartesianPoint< T, 3 >::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.

CartesianPoint<double,3> point; // At this point it is initialised with default values.
point << 1.0,2.0,3.0;
Parameters
value: the first of three points to enter.
Returns
CommaInitialiser : eigen's comma initialiser mechanism.

Definition at line 193 of file cartesian_point.hpp.

◆ positionVector() [1/2]

template<typename T >
ecl::linear_algebra::Matrix<T,3,1>& ecl::CartesianPoint< T, 3 >::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,3,1> : a reference to the underlying storage container.

Definition at line 204 of file cartesian_point.hpp.

◆ positionVector() [2/2]

template<typename T >
const ecl::linear_algebra::Matrix<T,3,1>& ecl::CartesianPoint< T, 3 >::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,3,1> : a reference to the underlying storage container.

Definition at line 213 of file cartesian_point.hpp.

◆ size()

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

Size/dimension of the cartesian point.

Size/dimension of the cartesian point.

Returns
unsigned int : size/dimension.

Definition at line 222 of file cartesian_point.hpp.

◆ x() [1/2]

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

Returns a copy of the x co-ordinate.

Returns
T : x value.

Definition at line 247 of file cartesian_point.hpp.

◆ x() [2/2]

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

Returns a constant reference to the x co-ordinate.

Returns
const T& : x value.

Definition at line 229 of file cartesian_point.hpp.

◆ y() [1/2]

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

Returns a copy of the y co-ordinate.

Returns
T : y value.

Definition at line 253 of file cartesian_point.hpp.

◆ y() [2/2]

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

Returns a constant reference to the y co-ordinate.

Returns
const T& : y value.

Definition at line 235 of file cartesian_point.hpp.

◆ z() [1/2]

template<typename T >
T ecl::CartesianPoint< T, 3 >::z ( )
inline

Returns a copy of the z co-ordinate.

Returns
T : z value.

Definition at line 259 of file cartesian_point.hpp.

◆ z() [2/2]

template<typename T >
const T& ecl::CartesianPoint< T, 3 >::z ( ) const
inline

Returns a constant reference to the z co-ordinate.

Returns
const T& : z value.

Definition at line 241 of file cartesian_point.hpp.

Friends And Related Function Documentation

◆ operator<<

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

Insertion operator for sending the point 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 285 of file cartesian_point.hpp.

Member Data Documentation

◆ elements

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

Definition at line 269 of file cartesian_point.hpp.


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


ecl_geometry
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:39