iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nrt::Point3D< T > Class Template Reference

#include <nrt/Core/Geometry/Point.H>

template<class T>
class nrt::Point3D< T >

A 3-Dimensional Point Class.

See Also
Point

Definition at line 192 of file Point.H.

Inheritance diagram for nrt::Point3D< T >:
nrt::Point< T, 3 >

Public Member Functions

 Point3D ()
 Construct an uninitialized Point.
 
 Point3D (T x, T y, T z)
 Construct a Point by specifying the x,y,z dimensions.
 
 Point3D (std::array< T, 3 > const &init)
 Construct a Point from an std::array.
 
 Point3D (Point< T, 3 > const &other)
 Copy constructor.
 
 Point3D (Point< T, 3 > &&other)
 Move constructor.
 
template<class U >
 Point3D (Point< U, 3 > const &other)
 Conversion copy constructor.
 
T & x ()
 Access the first dimension of this Point.
 
T const & x () const
 Access the first dimension of this Point - const version.
 
T & y ()
 Access the second dimension of this Point.
 
T const & y () const
 Access the second dimension of this Point - const version.
 
T & z ()
 Access the third dimension of this Point.
 
T const & z () const
 Access the third dimension of this Point - const version.
 
- Public Member Functions inherited from nrt::Point< T, 3 >
 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.
 

Additional Inherited Members

- Protected Member Functions inherited from nrt::Point< T, 3 >
void serialize (Archive &ar)
 Serialization.
 
- Protected Attributes inherited from nrt::Point< T, 3 >
std::array< T, Dimensions > itsData
 

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