Container storing a homogenous point. More...
#include <homogeneous_point.hpp>
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. | |
T | 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. | |
T | 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. | |
T | 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) |
Container storing a homogenous point.
Stores float x-y-z triples and a fourth element set to 1.0.
T | : the underlying element type - must be float. |
Definition at line 56 of file homogeneous_point.hpp.
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.
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).
vec | : input three dimensional eigen style vector. |
Definition at line 74 of file homogeneous_point.hpp.
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.
vec | : input three dimensional eigen style vector. |
Definition at line 85 of file homogeneous_point.hpp.
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.
x_i | : x co-ordinate. |
y_i | : y co-ordinate. |
z_i | : z co-ordinate. |
Definition at line 95 of file homogeneous_point.hpp.
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.
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;
value | : the first of three points + last point must be 1.0. |
Definition at line 117 of file homogeneous_point.hpp.
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.
Definition at line 128 of file homogeneous_point.hpp.
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.
Definition at line 137 of file homogeneous_point.hpp.
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.
Definition at line 144 of file homogeneous_point.hpp.
T ecl::HomogeneousPoint< T, typename ecl::enable_if< ecl::is_float< T > >::type >::x | ( | ) | [inline] |
Returns a copy of the x co-ordinate.
Definition at line 162 of file homogeneous_point.hpp.
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.
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.
Definition at line 150 of file homogeneous_point.hpp.
T ecl::HomogeneousPoint< T, typename ecl::enable_if< ecl::is_float< T > >::type >::y | ( | ) | [inline] |
Returns a copy of the y co-ordinate.
Definition at line 168 of file homogeneous_point.hpp.
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.
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.
Definition at line 156 of file homogeneous_point.hpp.
T ecl::HomogeneousPoint< T, typename ecl::enable_if< ecl::is_float< T > >::type >::z | ( | ) | [inline] |
Returns a copy of the z co-ordinate.
Definition at line 174 of file homogeneous_point.hpp.
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.
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.
ostream | : the output stream. |
point | : the point to be inserted. |
Definition at line 201 of file homogeneous_point.hpp.
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.