8 #ifndef __RDL_FRAME_VECTOR_HPP__ 9 #define __RDL_FRAME_VECTOR_HPP__ 140 set(vector[0], vector[1], vector[2]);
154 return this->x() * frameVector.x() + this->y() * frameVector.y() + this->z() * frameVector.z();
166 return FrameVector(this->
referenceFrame, this->y() * vector.z() - this->z() * vector.y(), vector.x() * this->z() - vector.z() * this->x(),
167 this->x() * vector.y() - this->y() * vector.x());
177 return RobotDynamics::Math::Vector3d::cross(vector);
189 return acos(std::max(-1., std::min(this->
dot(frameVector) / (this->norm() * frameVector.norm()), 1.)));
240 template <
typename T>
249 template <
typename T>
256 template <
typename T>
300 typedef std::vector<FrameVector, Eigen::aligned_allocator<FrameVector>>
FrameVectorV;
304 #endif // ifndef __RDL_FRAME_VECTOR_HPP__ void operator+=(const FrameVector &v)
Plus euals operator that performs runtime frame checks, .
Math::TransformableGeometricObject * getTransformableGeometricObject()
Return pointer to this object as type TransformableGeometricObject. See FrameObject::changeFrame for ...
void operator*=(const T scale)
Times euals operator that performs runtime frame checks, .
void operator+=(const Vector3d &v)
ForceVector operator*(const SpatialTransform &X, ForceVector f)
Operator for transforming a ForceVector. Calls the ForceVector::transform method. ...
A custom exception for frame operations.
void setToZero()
Set x, y, and z components to 0.
virtual ~FrameVector()
Destructor.
ReferenceFramePtr referenceFrame
Vector3d cross(const Vector3d &vector) const
Cross product, i.e. .
FrameVector changeFrameAndCopy(ReferenceFramePtr referenceFrame) const
copy into new frame vector and change the frame of that
FramePoint operator+(FramePoint p, const FrameVector &v)
void setIncludingFrame(const Eigen::Vector3d &vector, ReferenceFramePtr referenceFrame)
Set the x, y, and z components and the ReferenceFrame these components are expressed in...
void checkReferenceFramesMatch(const FrameObject *frameObject) const
Check if two ReferenceFrameHolders hold the same ReferenceFrame.
FrameVector cross(const FrameVector &vector) const
Cross product between two FrameVectors, i.e. .
std::shared_ptr< ReferenceFrame > ReferenceFramePtr
FrameVector(ReferenceFramePtr referenceFrame, const Eigen::Vector3d &vector)
Constructor.
virtual void changeFrame(ReferenceFramePtr desiredFrame)
Change the ReferenceFrame this FrameObject is expressed in.
void setIncludingFrame(const double x, const double y, const double z, ReferenceFramePtr referenceFrame)
Set the x, y, and z components and the ReferenceFrame these components are expressed in...
A FrameVector is a 3D vector with a ReferenceFrame, and all operations between FrameVectors and other...
void operator-=(const FrameVector &v)
Minus euals operator that performs runtime frame checks, .
FrameVector()
Default constructor. Initializes its ReferenceFrame to nullptr.
FramePoint operator-(FramePoint p, const FrameVector &v)
std::vector< FrameVector, Eigen::aligned_allocator< FrameVector > > FrameVectorV
double dot(const FrameVector &frameVector) const
Dot product between two FrameVectors, i.e. .
FrameVector(ReferenceFramePtr referenceFrame)
Constructor.
An interface that objects with a ReferenceFrame extend to inherit the FrameObject::changeFrame method...
Namespace for all structures of the RobotDynamics library.
void operator-=(const Vector3d &v)
double getAngleBetweenVectors(const FrameVector &frameVector) const
Computer the angle between two FrameVectors, .
FrameVector(ReferenceFramePtr referenceFrame, const double &x, const double &y, const double &z)
Constructor.