template<class Real = double>
class chrono::ChFrame< Real >
ChFrame: a class for coordinate systems in 3D space.
A 'frame' coordinate system has a translation and a rotation respect to a 'parent' coordinate system, usually the absolute (world) coordinates.
Differently from a simple ChCoordsys object, however, the ChFrame implements some optimizations because each ChFrame stores also a 3x3 rotation matrix, which can speed up coordinate transformations when a large amount of vectors must be transformed by the same coordinate frame.
Further info at the Coordinate transformations manual page.
|
| ChFrame (const ChVector< Real > &mv=ChVector< Real >(0, 0, 0), const ChQuaternion< Real > &mq=ChQuaternion< Real >(1, 0, 0, 0)) |
| Default constructor, or construct from pos and rot (as a quaternion)
|
|
| ChFrame (const ChVector< Real > &mv, const ChMatrix33< Real > &ma) |
| Construct from pos and rotation (as a 3x3 matrix)
|
|
| ChFrame (const ChCoordsys< Real > &mc) |
| Construct from a coordsys.
|
|
| ChFrame (const ChVector< Real > &mv, const Real alpha, const ChVector< Real > &mu) |
| Construct from position mv and rotation of angle alpha around unit vector mu.
|
|
| ChFrame (const ChFrame< Real > &other) |
| Copy constructor, build from another frame.
|
|
ChFrame< Real > & | operator= (const ChFrame< Real > &other) |
| Assignment operator: copy from another frame.
|
|
virtual bool | operator== (const ChFrame< Real > &other) const |
| Returns true for identical frames.
|
|
virtual bool | operator!= (const ChFrame< Real > &other) const |
| Returns true for different frames.
|
|
ChFrame< Real > | operator>> (const ChFrame< Real > &Fb) const |
| The '>>' operator transforms a coordinate system, so transformations can be represented with this syntax: new_frame = old_frame >> tr_frame; For a sequence of transformations, i.e. More...
|
|
ChFrame< Real > | operator* (const ChFrame< Real > &Fb) const |
| The '>>' operator transforms a vector, so transformations can be represented with this syntax: new_v = old_v >> tr_frame; For a sequence of transformations, i.e. More...
|
|
ChVector< Real > | operator* (const ChVector< Real > &V) const |
| The '*' operator transforms a vector, so transformations can be represented with this syntax: new_v = tr_frame * old_v; For a sequence of transformations, i.e. More...
|
|
ChVector< Real > | operator/ (const ChVector< Real > &V) const |
| The '/' is like the '*' operator (see), but uses the inverse transformation for A, in A/b. More...
|
|
ChFrame< Real > & | operator>>= (const ChFrame< Real > &T) |
| Performs pre-multiplication of this frame by another frame, for example: A>>=T means A'=T*A ; or A'=A >> T.
|
|
ChFrame< Real > & | operator%= (const ChFrame< Real > &T) |
| Performs pre-multiplication of this frame by another frame, for example: A%=T means A'=T*A ; or A'=A >> T Note: DEPRECATED, use >>= instead.
|
|
ChFrame< Real > & | operator*= (const ChFrame< Real > &T) |
| Performs post-multiplication of this frame by another frame, for example: A*=T means A'=A*T ; or A'=T >> A.
|
|
ChFrame< Real > & | operator>>= (const ChVector< Real > &D) |
| Performs pre-multiplication of this frame by a vector D, to 'move' by a displacement D:
|
|
ChFrame< Real > & | operator>>= (const ChQuaternion< Real > &R) |
| Performs pre-multiplication of this frame by a quaternion R, to 'rotate' it by R:
|
|
ChFrame< Real > & | operator>>= (const ChCoordsys< Real > &F) |
| Performs pre-multiplication of this frame by a ChCoordsys F, to transform it:
|
|
ChCoordsys< Real > & | GetCoord () |
| Return both current rotation and translation as a coordsystem object, with vector and quaternion.
|
|
const ChCoordsys< Real > & | GetCoord () const |
|
ChVector< Real > & | GetPos () |
| Return the current translation as a 3d vector.
|
|
const ChVector< Real > & | GetPos () const |
|
ChQuaternion< Real > & | GetRot () |
| Return the current rotation as a quaternion.
|
|
const ChQuaternion< Real > & | GetRot () const |
|
ChMatrix33< Real > & | GetA () |
| Return the current rotation as a 3x3 matrix.
|
|
const ChMatrix33< Real > & | GetA () const |
|
ChVector< Real > | GetRotAxis () |
| Get axis of finite rotation, in parent space.
|
|
Real | GetRotAngle () |
| Get angle of rotation about axis of finite rotation.
|
|
virtual void | SetCoord (const ChCoordsys< Real > &mcoord) |
| Impose both translation and rotation as a single ChCoordsys. More...
|
|
virtual void | SetCoord (const ChVector< Real > &mv, const ChQuaternion< Real > &mq) |
| Impose both translation and rotation. More...
|
|
virtual void | SetRot (const ChQuaternion< Real > &mrot) |
| Impose the rotation as a quaternion. More...
|
|
virtual void | SetRot (const ChMatrix33< Real > &mA) |
| Impose the rotation as a 3x3 matrix. More...
|
|
virtual void | SetPos (const ChVector< Real > &mpos) |
| Impose the translation.
|
|
void | ConcatenatePreTransformation (const ChFrame< Real > &T) |
| Apply a transformation (rotation and translation) represented by another ChFrame T. More...
|
|
void | ConcatenatePostTransformation (const ChFrame< Real > &T) |
| Apply a transformation (rotation and translation) represented by another ChFrame T in local coordinate. More...
|
|
void | Move (const ChVector< Real > &V) |
| An easy way to move the frame by the amount specified by vector V, (assuming V expressed in parent coordinates)
|
|
void | Move (const ChCoordsys< Real > &VR) |
| Apply both translation and rotation, assuming both expressed in parent coordinates, as a vector for translation and quaternion for rotation,.
|
|
virtual ChVector< Real > | TransformLocalToParent (const ChVector< Real > &local) const |
| This function transforms a point from the local frame coordinate system to the parent coordinate system. More...
|
|
virtual ChVector< Real > | TransformPointLocalToParent (const ChVector< Real > &local) const |
|
virtual ChVector< Real > | TransformParentToLocal (const ChVector< Real > &parent) const |
| This function transforms a point from the parent coordinate system to local frame coordinate system. More...
|
|
virtual ChVector< Real > | TransformPointParentToLocal (const ChVector< Real > &parent) const |
|
virtual void | TransformLocalToParent (const ChFrame< Real > &local, ChFrame< Real > &parent) const |
| This function transforms a frame from 'this' local coordinate system to parent frame coordinate system. More...
|
|
virtual void | TransformParentToLocal (const ChFrame< Real > &parent, ChFrame< Real > &local) const |
| This function transforms a frame from the parent coordinate system to 'this' local frame coordinate system. More...
|
|
virtual ChVector< Real > | TransformDirectionParentToLocal (const ChVector< Real > &mdirection) const |
| This function transforms a direction from 'this' local coordinate system to parent frame coordinate system. More...
|
|
virtual ChVector< Real > | TransformDirectionLocalToParent (const ChVector< Real > &mdirection) const |
| This function transforms a direction from the parent frame coordinate system to 'this' local coordinate system. More...
|
|
bool | Equals (const ChFrame< Real > &other) const |
| Returns true if coordsys is identical to other coordsys.
|
|
bool | Equals (const ChFrame< Real > &other, Real tol) const |
| Returns true if coordsys is equal to other coordsys, within a tolerance 'tol'.
|
|
void | Normalize () |
| Normalize the rotation, so that quaternion has unit length.
|
|
virtual void | SetIdentity () |
| Sets to no translation and no rotation.
|
|
virtual void | Invert () |
| The transformation is inverted in place. More...
|
|
ChFrame< Real > | GetInverse () const |
|
virtual void | ArchiveOUT (ChArchiveOut &marchive) |
| Method to allow serialization of transient data to archives.
|
|
virtual void | ArchiveIN (ChArchiveIn &marchive) |
| Method to allow de-serialization of transient data from archives.
|
|