Public Member Functions | Private Attributes | Friends | List of all members
ecl::HomogeneousPoint< T, typename ecl::enable_if< ecl::is_float< T > >::type > Class Template Reference

Container storing a homogenous point. More...

#include <homogeneous_point.hpp>

Public Member Functions

 HomogeneousPoint (const ecl::linear_algebra::Matrix< T, 3, 1 > &vec)
 Initialises with the specified eigen style vector. More...
 
 HomogeneousPoint (const ecl::linear_algebra::Matrix< T, 4, 1 > &vec)
 Initialises with the specified eigen style vector in homogeneous format. More...
 
EIGEN_MAKE_ALIGNED_OPERATOR_NEW HomogeneousPoint (const T &value=T())
 Default constructor - sets all elements to the same value. More...
 
 HomogeneousPoint (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, 4, 1 > > operator<< (const T &value)
 
ecl::linear_algebra::Matrix< T, 4, 1 > & positionVector ()
 Representation of the position vector in eigen vector format. More...
 
const ecl::linear_algebra::Matrix< T, 4, 1 > & positionVector () const
 Representation of the position vector in const eigen vector format. 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 ~HomogeneousPoint ()
 

Private Attributes

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

Friends

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

Detailed Description

template<typename T>
class ecl::HomogeneousPoint< T, typename ecl::enable_if< ecl::is_float< T > >::type >

Container storing a homogenous point.

Stores float x-y-z triples and a fourth element set to 1.0.

Template Parameters
T: the underlying element type - must be float.

Definition at line 62 of file homogeneous_point.hpp.

Constructor & Destructor Documentation

◆ HomogeneousPoint() [1/4]

template<typename T >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW ecl::HomogeneousPoint< T, typename ecl::enable_if< ecl::is_float< T > >::type >::HomogeneousPoint ( const T &  value = T())
inline

Default constructor - sets all elements to the same value.

Definition at line 68 of file homogeneous_point.hpp.

◆ HomogeneousPoint() [2/4]

template<typename T >
ecl::HomogeneousPoint< T, typename ecl::enable_if< ecl::is_float< T > >::type >::HomogeneousPoint ( const ecl::linear_algebra::Matrix< T, 3, 1 > &  vec)
inline

Initialises with the specified eigen style vector.

This only uses a partial vector (the remaining element gets automatically filled in as 1.0).

Parameters
vec: input three dimensional eigen style vector.

Definition at line 80 of file homogeneous_point.hpp.

◆ HomogeneousPoint() [3/4]

template<typename T >
ecl::HomogeneousPoint< T, typename ecl::enable_if< ecl::is_float< T > >::type >::HomogeneousPoint ( const ecl::linear_algebra::Matrix< T, 4, 1 > &  vec)
inline

Initialises with the specified eigen style vector in homogeneous format.

Takes the full vector in this case - last element must always be 1.0.

Parameters
vec: input three dimensional eigen style vector.

Definition at line 91 of file homogeneous_point.hpp.

◆ HomogeneousPoint() [4/4]

template<typename T >
ecl::HomogeneousPoint< T, typename ecl::enable_if< ecl::is_float< T > >::type >::HomogeneousPoint ( 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 101 of file homogeneous_point.hpp.

◆ ~HomogeneousPoint()

template<typename T >
virtual ecl::HomogeneousPoint< T, typename ecl::enable_if< ecl::is_float< T > >::type >::~HomogeneousPoint ( )
inlinevirtual

Definition at line 105 of file homogeneous_point.hpp.

Member Function Documentation

◆ operator<<()

template<typename T >
ecl::linear_algebra::CommaInitializer< ecl::linear_algebra::Matrix<T,4,1> > ecl::HomogeneousPoint< T, typename ecl::enable_if< ecl::is_float< T > >::type >::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.

HomogeneousPoint<double> point; // At this point it is initialised with default values.
point << 1.0,2.0,3.0,1.0;
Parameters
value: the first of three points + last point must be 1.0.
Returns
CommaInitialiser : eigen's comma initialiser mechanism.

Definition at line 123 of file homogeneous_point.hpp.

◆ positionVector() [1/2]

template<typename T >
ecl::linear_algebra::Matrix<T,4,1>& ecl::HomogeneousPoint< T, typename ecl::enable_if< ecl::is_float< T > >::type >::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,4,1> : a reference to the underlying storage container.

Definition at line 134 of file homogeneous_point.hpp.

◆ positionVector() [2/2]

template<typename T >
const ecl::linear_algebra::Matrix<T,4,1>& ecl::HomogeneousPoint< T, typename ecl::enable_if< ecl::is_float< T > >::type >::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,4,1> : a reference to the underlying storage container.

Definition at line 143 of file homogeneous_point.hpp.

◆ x() [1/2]

template<typename T >
T ecl::HomogeneousPoint< T, typename ecl::enable_if< ecl::is_float< T > >::type >::x ( )
inline

Returns a copy of the x co-ordinate.

Returns
T : x value.

Definition at line 168 of file homogeneous_point.hpp.

◆ x() [2/2]

template<typename T >
const T& ecl::HomogeneousPoint< T, typename ecl::enable_if< ecl::is_float< T > >::type >::x ( ) const
inline

Returns a constant reference to the x co-ordinate.

Returns
const T& : x value.

Definition at line 150 of file homogeneous_point.hpp.

◆ y() [1/2]

template<typename T >
T ecl::HomogeneousPoint< T, typename ecl::enable_if< ecl::is_float< T > >::type >::y ( )
inline

Returns a copy of the y co-ordinate.

Returns
T : y value.

Definition at line 174 of file homogeneous_point.hpp.

◆ y() [2/2]

template<typename T >
const T& ecl::HomogeneousPoint< T, typename ecl::enable_if< ecl::is_float< T > >::type >::y ( ) const
inline

Returns a constant reference to the y co-ordinate.

Returns
const T& : y value.

Definition at line 156 of file homogeneous_point.hpp.

◆ z() [1/2]

template<typename T >
T ecl::HomogeneousPoint< T, typename ecl::enable_if< ecl::is_float< T > >::type >::z ( )
inline

Returns a copy of the z co-ordinate.

Returns
T : z value.

Definition at line 180 of file homogeneous_point.hpp.

◆ z() [2/2]

template<typename T >
const T& ecl::HomogeneousPoint< T, typename ecl::enable_if< ecl::is_float< T > >::type >::z ( ) const
inline

Returns a constant reference to the z co-ordinate.

Returns
const T& : z value.

Definition at line 162 of file homogeneous_point.hpp.

Friends And Related Function Documentation

◆ operator<<

template<typename T >
template<typename OutputStream , typename Type >
OutputStream& operator<< ( OutputStream &  ostream,
const HomogeneousPoint< Type > &  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 207 of file homogeneous_point.hpp.

Member Data Documentation

◆ elements

template<typename T >
ecl::linear_algebra::Matrix<T,4,1> ecl::HomogeneousPoint< T, typename ecl::enable_if< ecl::is_float< T > >::type >::elements
private

Definition at line 190 of file homogeneous_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