Public Member Functions | Private Attributes | Friends
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>

List of all members.

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW HomogeneousPoint (const T &value=T())
 Default constructor - sets all elements to the same value.
 HomogeneousPoint (const ecl::linear_algebra::Matrix< T, 3, 1 > &vec)
 Initialises with the specified eigen style vector.
 HomogeneousPoint (const ecl::linear_algebra::Matrix< T, 4, 1 > &vec)
 Initialises with the specified eigen style vector in homogeneous format.
 HomogeneousPoint (const T &x_i, const T &y_i, const T &z_i)
 Initialises the point with the specified values.
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.
const
ecl::linear_algebra::Matrix< T, 4, 1 > & 
positionVector () const
 Representation of the position vector in const eigen vector format.
const T & x () const
 Returns a constant reference to the x co-ordinate.
x ()
 Returns a copy of the x co-ordinate.
void x (const T &value)
 Sets the x-coordinate.
const T & y () const
 Returns a constant reference to the y co-ordinate.
y ()
 Returns a copy of the y co-ordinate.
void y (const T &value)
 Sets the y-coordinate.
const T & z () const
 Returns a constant reference to the z co-ordinate.
z ()
 Returns a copy of the z co-ordinate.
void z (const T &value)
 Sets the z-coordinate.
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 56 of file homogeneous_point.hpp.


Constructor & Destructor Documentation

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 62 of file homogeneous_point.hpp.

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 74 of file homogeneous_point.hpp.

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 85 of file homogeneous_point.hpp.

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 95 of file homogeneous_point.hpp.

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

Definition at line 99 of file homogeneous_point.hpp.


Member Function Documentation

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 117 of file homogeneous_point.hpp.

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 128 of file homogeneous_point.hpp.

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 137 of file homogeneous_point.hpp.

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 144 of file homogeneous_point.hpp.

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 162 of file homogeneous_point.hpp.

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

Sets the x-coordinate.

Definition at line 176 of file homogeneous_point.hpp.

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 150 of file homogeneous_point.hpp.

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 168 of file homogeneous_point.hpp.

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

Sets the y-coordinate.

Definition at line 177 of file homogeneous_point.hpp.

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 156 of file homogeneous_point.hpp.

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 174 of file homogeneous_point.hpp.

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

Sets the z-coordinate.

Definition at line 178 of file homogeneous_point.hpp.


Friends And Related Function Documentation

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 201 of file homogeneous_point.hpp.


Member Data Documentation

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 184 of file homogeneous_point.hpp.


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


ecl_geometry
Author(s): Daniel Stonier
autogenerated on Wed Aug 26 2015 11:27:46