13 #ifndef __RDL_FRAME_POINT_HPP__ 14 #define __RDL_FRAME_POINT_HPP__ 173 this->
x() = point.
x();
174 this->
y() = point.
y();
175 this->
z() = point.
z();
189 double dx = this->
x() - point.
x();
190 double dy = this->
y() - point.
y();
191 double dz = this->
z() - point.
z();
192 return dx * dx + dy * dy + dz * dz;
218 return fabs(this->
x() - point.
x()) + fabs(this->
y() - point.
y()) + fabs(this->
z() - point.
z());
231 double dx = this->
x() - point.
x();
232 double dy = this->
y() - point.
y();
233 double dz = this->
z() - point.
z();
235 double tmp = fabs(dx) > fabs(dy) ? fabs(dx) : fabs(dy);
237 return tmp > fabs(dz) ? tmp : fabs(dz);
249 return fabs(this->
x() - point.
x()) < epsilon && fabs(this->
y() - point.
y()) < epsilon && fabs(this->
z() - point.
z()) < epsilon;
257 template <
typename T>
270 template <
typename T>
307 template <
typename T>
314 template <
typename T>
332 if (lhs.
x() != rhs.
x())
337 if (lhs.
y() != rhs.
y())
342 if (lhs.
z() != rhs.
z())
377 output <<
"ReferenceFrame = " << framePoint.
getReferenceFrame()->getName() << std::endl;
378 output <<
"x = " << framePoint.
x() <<
" y = " << framePoint.
y() <<
" z = " << framePoint.
z() << std::endl;
381 typedef std::vector<FramePoint, Eigen::aligned_allocator<FramePoint>>
FramePointV;
384 #endif // ifndef __RDL_FRAME_POINT_HPP__ EIGEN_STRONG_INLINE double & x()
void operator+=(const FrameVector &v)
std::vector< FramePoint, Eigen::aligned_allocator< FramePoint > > FramePointV
ReferenceFramePtr getReferenceFrame() const
Get a pointer to the reference frame this FrameObject is expressed in.
A FramePoint is a 3D point that is expressed in a ReferenceFrame. To change the ReferenceFrame a Fram...
double distanceSquared(const FramePoint &point) const
Calculate the distance squared between two FramePoints. .
ForceVector operator*(const SpatialTransform &X, ForceVector f)
Operator for transforming a ForceVector. Calls the ForceVector::transform method. ...
FramePoint(const FramePoint &framePoint)
Copy constructor.
Math::Point3d point() const
Get as point3d.
double distanceL1(const FramePoint &point) const
Calculate the L1 distance between two FramePoints by .
FramePoint(ReferenceFramePtr referenceFrame, const double x, const double y, const double z)
Constructor.
A custom exception for frame operations.
void operator-=(const FrameVector &v)
ReferenceFramePtr referenceFrame
FramePoint operator+(FramePoint p, const FrameVector &v)
bool epsilonEquals(const FramePoint &point, const double epsilon) const
Return true FramePoint argument is within epsilon of this, false otherwise.
double distanceLinf(const FramePoint &point) const
Calculate the LInfinity distance between two FramePoints by .
void checkReferenceFramesMatch(const FrameObject *frameObject) const
Check if two ReferenceFrameHolders hold the same ReferenceFrame.
FramePoint()
Empty constructor that creates a point with ReferencFrame=nullptr and (x,y,z)=(0,0,0)
EIGEN_STRONG_INLINE void setIncludingFrame(const Math::Vector3d &v, ReferenceFramePtr referenceFrame)
Set both the ReferenceFrame this object is expressed in as well as the (x,y,z) coordinates of the poi...
std::shared_ptr< ReferenceFrame > ReferenceFramePtr
virtual void changeFrame(ReferenceFramePtr desiredFrame)
Change the ReferenceFrame this FrameObject is expressed in.
FramePoint(ReferenceFramePtr referenceFrame, Math::Vector3d v)
Constructor.
FramePoint changeFrameAndCopy(ReferenceFramePtr referenceFrame) const
copy into new frame point and change the frame of that
A FrameVector is a 3D vector with a ReferenceFrame, and all operations between FrameVectors and other...
Math::TransformableGeometricObject * getTransformableGeometricObject()
Return a pointer to this as base class type Math::TransformableGeometricObject. See FrameObject::chan...
void setIncludingFrame(const Math::Point3d &point, ReferenceFramePtr referenceFrame)
Set both the ReferenceFrame the point is expressed in as well as the (x,y,z) coordinates.
std::ostream & operator<<(std::ostream &output, const FramePoint &framePoint)
FramePoint(ReferenceFramePtr referenceFrame)
Constructor that initializes to (x,y,z) = (0,0,0)
FramePoint operator-(FramePoint p, const FrameVector &v)
EIGEN_STRONG_INLINE double & y()
double distance(const FramePoint &point) const
Calculate the distance between two FramePoints. .
void operator*=(const T scale)
Overloaded *= operator, performs this = this*scala.
EIGEN_STRONG_INLINE double & z()
bool operator==(const Point3d &rhs)
void setIncludingFrame(const double x, const double y, const double z, ReferenceFramePtr referenceFrame)
Set both the ReferenceFrame the point is expressed in as well as the (x,y,z) coordinates.
void operator/=(const T scale)
Overloaded /= operator, performs this = this*scale.
An interface that objects with a ReferenceFrame extend to inherit the FrameObject::changeFrame method...
Namespace for all structures of the RobotDynamics library.
bool operator!=(const Point3d &rhs)
FramePoint(ReferenceFramePtr referenceFrame, const Math::Point3d &point)
Constructor.