iLab Neuromorphic Robotics Toolkit  0.1
nrt::PointSSE< T > Class Template Reference

`#include <nrt/PointCloud2/PointCloud2PointSSE.H>`

### template<class T> class nrt::PointSSE< T >

An SSE capable point class for representing geometry.

This point contains four values, representing XYZ geometry and a fourth buffer coordinate to support SSE alignment, which can be considered to make the point homogenous. Note that there is no special care taken to ensure that this fourth coordinate remains valid, and in general will not be used aside from providing a buffer for alignment.

This point is defined with alignment requirements such that it can be easily optimized using SSE techniques.

Template Parameters
 T The underlying type to represent

Definition at line 59 of file PointCloud2PointSSE.H.

Inheritance diagram for nrt::PointSSE< T >:

## Public Types

typedef Eigen::Matrix< T, 3, 1 > Vector3

typedef Eigen::Matrix< T, 4, 1 > Vector4

## Public Member Functions

PointSSE ()
Construct a zero valued point with w set to 0.

PointSSE (T value, T w=0)
Constructs a point with all values set to value, optionally setting w.

PointSSE (T x, T y, T z, T w=0)
Construct a point by specifying the dimensions.

PointSSE (std::array< T, 3 > const &init)
Construct a point from an std::array (setting w to 1)

PointSSE (std::array< T, 4 > const &init)
Construct a point from an std::array.

PointSSE (Point< T, 4 > const &other)
Copy constructor.

PointSSE (Point< T, 3 > const &other)
Copy constructor, sets W to 0.

template<class U >
PointSSE (Point< U, 4 > const &other)
Conversion copy constructor.

template<class U >
PointSSE (Point< U, 3 > const &other)
Conversion copy constructor, sets W to 0.

T & x ()
Access the first element.

T const & x () const
Access the first element.

T & y ()
Access the second element.

T const & y () const
Access the second element.

T & z ()
Access the third element.

T const & z () const
Access the third element.

T & w ()
Access the fourth element.

T const & w () const
Access the fourth element.

bool isValid () const
Checks whether this point is composed of only finite values.

Eigen::Map< Vector4,
Eigen::Aligned >
getVectorMap ()
Return an eigen vector mapped to the internal contents of this point.

Eigen::Map< const Vector4,
Eigen::Aligned >
getVectorMap () const
Return a const eigen vector mapped to the internal contents of this point.

Eigen::Map< Vector3,
Eigen::Aligned >
getVector3Map ()
Return an eigen vector mapped to the internal contents of this point, ignoring the fourth component.

Eigen::Map< const Vector3,
Eigen::Aligned >
getVector3Map () const
Return a const eigen vector mapped to the internal contents of this point, ignoring the fourth component.

Public Member Functions inherited from nrt::Point< T, 4 >
Point ()
Construct an uninitialized point.

Point (S...args)
Construct a Point by specifying the value of each Dimension. More...

Point (std::array< T, Dimensions > const &init)
Construct a point from an std::array.

Point (Point< T, Dimensions > const &other)=default
Copy constructor.

Point (Point< T, Dimensions > &&other)=default
Move constructor.

Point (Point< U, Dimensions > const &other)
Conversion copy constructor, uses nrt::clamped_convert<T,U> internally.

Point< T, Dimensions > & operator= (Point< T, Dimensions > const &other)=default
Assignment.

Point< T, Dimensions > & operator= (Point< T, Dimensions > &&other)=default
Move assignment.

T & operator[] (size_t index)
Access a single dimension of the Point.

T const & operator[] (size_t index) const
Access a single dimension of the Point - const version.

double distanceTo (Point< U, Dimensions > const &other) const
Compute the Euclidian distance to another point.

double squaredDistanceTo (Point< U, Dimensions > const &other) const
Compute the squared Euclidian distance to another point.

double magnitude () const
Compute the magnitude (the Euclidian distance from the origin)

double manhattanDistanceTo (Point< U, Dimensions > const &other) const
Compute the Manhattan distance to another point.

T * begin ()
Access the beginning of the underlying array.

T const * begin () const
Access the beginning of the underlying array - const version.

T * end ()
Access the end of the underlying array.

T const * end () const
Access the end of the underlying array - const version.