Robot Dynamics Library
Public Member Functions | Protected Attributes | List of all members
RobotDynamics::Math::Point3d Class Reference

#include <Point3.hpp>

Inheritance diagram for RobotDynamics::Math::Point3d:
Inheritance graph
[legend]
Collaboration diagram for RobotDynamics::Math::Point3d:
Collaboration graph
[legend]

Public Member Functions

 Point3d (const double x, const double y, const double z)
 
 Point3d (const Point3d &point)
 
 Point3d (const Vector3d &vector)
 
EIGEN_STRONG_INLINE Point3d ()
 
virtual ~Point3d ()
 
void transform (const Math::SpatialTransform &X)
 Performs in place point transform. Given a point, $p$, this performs $ p = -X.E X.r + X.E p $. More...
 
Point3d transform_copy (const Math::SpatialTransform &X) const
 
EIGEN_STRONG_INLINE void set (const std::vector< double > &vector)
 
EIGEN_STRONG_INLINE void set (const Point3d &point)
 
void set (const Math::Vector3d &v)
 
void set (const double x, const double y, const double z)
 
EIGEN_STRONG_INLINE void setToZero ()
 
EIGEN_STRONG_INLINE bool epsilonEquals (const Point3d &point, const double epsilon) const
 
void clampMin (const double min)
 clamp any values that are less than min to min More...
 
void clampMax (const double max)
 clamp any values that are greater than make to max More...
 
void clampMinMax (const double min, const double max)
 clamp any values greater than max to max, and any value less than min to min More...
 
void absoluteValue ()
 Set each element to the absolute value. More...
 
double distance2DSquared (const Point3d &point, int plane=2) const
 Square of the 2d distance between two points. More...
 
double distanceSquared (const Point3d &point) const
 Square of the distance between two points, $ x^2 + y^2 + z^2 $. More...
 
double distance2D (const Point3d &point, int plane=2) const
 
double distance (const Point3d &point) const
 
double distanceL1 (const Point3d &point) const
 L1 norm of two points. More...
 
Vector3d cross (const Vector3d &v)
 Cross product between a point and vector. More...
 
double distanceLinf (const Point3d &point) const
 
EIGEN_STRONG_INLINE double & x ()
 
EIGEN_STRONG_INLINE double x () const
 
EIGEN_STRONG_INLINE double & y ()
 
EIGEN_STRONG_INLINE double y () const
 
EIGEN_STRONG_INLINE double & z ()
 
EIGEN_STRONG_INLINE double z () const
 
EIGEN_STRONG_INLINE double * data ()
 
EIGEN_STRONG_INLINE Math::Vector3d vec () const
 
Point3doperator= (const Point3d &other)
 
template<typename T >
void operator*= (const T scale)
 
template<typename T >
void operator/= (const T scale)
 
bool operator== (const Point3d &rhs)
 
bool operator!= (const Point3d &rhs)
 
void operator+= (const Vector3d &v)
 
void operator-= (const Vector3d &v)
 

Protected Attributes

double point [3]
 

Constructor & Destructor Documentation

◆ Point3d() [1/4]

RobotDynamics::Math::Point3d::Point3d ( const double  x,
const double  y,
const double  z 
)
inline

◆ Point3d() [2/4]

RobotDynamics::Math::Point3d::Point3d ( const Point3d point)
inline

◆ Point3d() [3/4]

RobotDynamics::Math::Point3d::Point3d ( const Vector3d vector)
inlineexplicit

◆ Point3d() [4/4]

EIGEN_STRONG_INLINE RobotDynamics::Math::Point3d::Point3d ( )
inline

◆ ~Point3d()

virtual RobotDynamics::Math::Point3d::~Point3d ( )
inlinevirtual

Member Function Documentation

◆ absoluteValue()

void RobotDynamics::Math::Point3d::absoluteValue ( )
inline

Set each element to the absolute value.

◆ clampMax()

void RobotDynamics::Math::Point3d::clampMax ( const double  max)
inline

clamp any values that are greater than make to max

Parameters
max

◆ clampMin()

void RobotDynamics::Math::Point3d::clampMin ( const double  min)
inline

clamp any values that are less than min to min

Parameters
min

◆ clampMinMax()

void RobotDynamics::Math::Point3d::clampMinMax ( const double  min,
const double  max 
)
inline

clamp any values greater than max to max, and any value less than min to min

Parameters
min
max

◆ cross()

Vector3d RobotDynamics::Math::Point3d::cross ( const Vector3d v)
inline

Cross product between a point and vector.

Parameters
v
Returns

◆ data()

EIGEN_STRONG_INLINE double* RobotDynamics::Math::Point3d::data ( )
inline

◆ distance()

double RobotDynamics::Math::Point3d::distance ( const Point3d point) const
inline

brief Distance between two points, $ \sqrt{x^2 + y^2 + z^2} $

Parameters
point
Returns
Distance

◆ distance2D()

double RobotDynamics::Math::Point3d::distance2D ( const Point3d point,
int  plane = 2 
) const
inline

brief 2D Distance between two points

Parameters
point
plane,2= z, 1 = y, 0 = x. Defaults to 2 which is the z = 0 plane
Returns
Distance

◆ distance2DSquared()

double RobotDynamics::Math::Point3d::distance2DSquared ( const Point3d point,
int  plane = 2 
) const
inline

Square of the 2d distance between two points.

Parameters
point
plane,2= z, 1 = y, 0 = x. Defaults to 2 which is the z = 0 plane
Returns
Distance squared

◆ distanceL1()

double RobotDynamics::Math::Point3d::distanceL1 ( const Point3d point) const
inline

L1 norm of two points.

Parameters
point
Returns
L1 norm

◆ distanceLinf()

double RobotDynamics::Math::Point3d::distanceLinf ( const Point3d point) const
inline

L-infinity norm

Parameters
point
Returns

◆ distanceSquared()

double RobotDynamics::Math::Point3d::distanceSquared ( const Point3d point) const
inline

Square of the distance between two points, $ x^2 + y^2 + z^2 $.

Parameters
point
Returns
Distance squared

◆ epsilonEquals()

EIGEN_STRONG_INLINE bool RobotDynamics::Math::Point3d::epsilonEquals ( const Point3d point,
const double  epsilon 
) const
inline

Compares if two points are within epsilon of each other

Parameters
point
epsilon
Returns
true if they are within epsilon, false otherwise

◆ operator!=()

bool RobotDynamics::Math::Point3d::operator!= ( const Point3d rhs)
inline

◆ operator*=()

template<typename T >
void RobotDynamics::Math::Point3d::operator*= ( const T  scale)
inline

◆ operator+=()

void RobotDynamics::Math::Point3d::operator+= ( const Vector3d v)
inline

◆ operator-=()

void RobotDynamics::Math::Point3d::operator-= ( const Vector3d v)
inline

◆ operator/=()

template<typename T >
void RobotDynamics::Math::Point3d::operator/= ( const T  scale)
inline

◆ operator=()

Point3d& RobotDynamics::Math::Point3d::operator= ( const Point3d other)
inline

◆ operator==()

bool RobotDynamics::Math::Point3d::operator== ( const Point3d rhs)
inline

◆ set() [1/4]

void RobotDynamics::Math::Point3d::set ( const double  x,
const double  y,
const double  z 
)
inline

◆ set() [2/4]

void RobotDynamics::Math::Point3d::set ( const Math::Vector3d v)
inline

◆ set() [3/4]

EIGEN_STRONG_INLINE void RobotDynamics::Math::Point3d::set ( const Point3d point)
inline

◆ set() [4/4]

EIGEN_STRONG_INLINE void RobotDynamics::Math::Point3d::set ( const std::vector< double > &  vector)
inline

◆ setToZero()

EIGEN_STRONG_INLINE void RobotDynamics::Math::Point3d::setToZero ( )
inline

◆ transform()

void RobotDynamics::Math::Point3d::transform ( const Math::SpatialTransform X)
inlinevirtual

Performs in place point transform. Given a point, $p$, this performs $ p = -X.E X.r + X.E p $.

Parameters
X

Implements RobotDynamics::Math::TransformableGeometricObject.

◆ transform_copy()

Point3d RobotDynamics::Math::Point3d::transform_copy ( const Math::SpatialTransform X) const
inline

◆ vec()

EIGEN_STRONG_INLINE Math::Vector3d RobotDynamics::Math::Point3d::vec ( ) const
inline

◆ x() [1/2]

EIGEN_STRONG_INLINE double& RobotDynamics::Math::Point3d::x ( )
inline

◆ x() [2/2]

EIGEN_STRONG_INLINE double RobotDynamics::Math::Point3d::x ( ) const
inline

◆ y() [1/2]

EIGEN_STRONG_INLINE double& RobotDynamics::Math::Point3d::y ( )
inline

◆ y() [2/2]

EIGEN_STRONG_INLINE double RobotDynamics::Math::Point3d::y ( ) const
inline

◆ z() [1/2]

EIGEN_STRONG_INLINE double& RobotDynamics::Math::Point3d::z ( )
inline

◆ z() [2/2]

EIGEN_STRONG_INLINE double RobotDynamics::Math::Point3d::z ( ) const
inline

Member Data Documentation

◆ point

double RobotDynamics::Math::Point3d::point[3]
protected

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