| MULTIBODY SIMULATION SOFTWARE - API documentation |
#include <CHframe.h>

Public Member Functions | |
| ChFrame (const ChVector< Real > &mv=VNULL, const ChQuaternion< Real > &mq=QUNIT) | |
| ChFrame (const ChVector< Real > &mv, ChMatrix33< Real > &ma) | |
| ChFrame (const ChCoordsys< Real > &mc) | |
| ChFrame (const ChFrame< Real > &other) | |
| ChFrame< Real > & | operator= (const ChFrame< Real > &other) |
| virtual bool | operator== (const ChFrame< Real > &other) const |
| virtual bool | operator!= (const ChFrame< Real > &other) const |
| ChFrame< Real > | operator>> (const ChFrame< Real > &Fb) const |
| ChFrame< Real > | operator* (const ChFrame< Real > &Fb) const |
| ChVector< Real > | operator* (const ChVector< Real > &V) const |
| ChVector< Real > | operator/ (const ChVector< Real > &V) const |
| ChFrame< Real > & | operator%= (const ChFrame< Real > &T) |
| ChFrame< Real > & | operator*= (const ChFrame< Real > &T) |
| ChCoordsys< Real > | GetCoord () |
| ChVector< Real > | GetPos () |
| ChQuaternion< Real > | GetRot () |
| ChMatrix33< Real > * | GetA () |
| ChVector< Real > | GetRotAxis () |
| double | GetRotAngle () |
| virtual void | SetCoord (const ChCoordsys< Real > &mcoord) |
| virtual void | SetCoord (const ChVector< Real > &mv, const ChQuaternion< Real > &mq) |
| virtual void | SetRot (const ChQuaternion< Real > &mrot) |
| virtual void | SetRot (ChMatrix33< Real > &mA) |
| virtual void | SetPos (const ChVector< Real > &mpos) |
| void | ConcatenatePreTransformation (const ChFrame< Real > &T) |
| void | ConcatenatePostTransformation (const ChFrame< Real > &T) |
| void | Move (const ChVector< Real > &V) |
| void | Move (ChCoordsys< Real > &VR) |
| virtual ChVector< Real > | TrasformLocalToParent (const ChVector< Real > &local) const |
| virtual ChVector< Real > | TrasformParentToLocal (const ChVector< Real > &parent) const |
| virtual void | TrasformLocalToParent (const ChFrame< Real > &local, ChFrame< Real > &parent) const |
| virtual void | TrasformParentToLocal (const ChFrame< Real > &parent, ChFrame< Real > &local) const |
| bool | Equals (const ChFrame< Real > &other) const |
| bool | Equals (const ChFrame< Real > &other, Real tol) const |
| void | Normalize () |
| virtual void | SetIdentity () |
| virtual void | Invert () |
| ChFrame< Real > | GetInverse () const |
| virtual void | StreamOUT (ChStreamOutAscii &mstream) |
| virtual void | StreamOUT (ChStreamOutBinary &mstream) |
| virtual void | StreamIN (ChStreamInBinary &mstream) |
Static Public Member Functions | |
| static void | SetMatrix_Fp (ChMatrixNM< Real, 3, 4 > &Fp, const ChQuaternion< Real > &mq) |
| static void | SetMatrix_Fm (ChMatrixNM< Real, 3, 4 > &Fm, const ChQuaternion< Real > &mq) |
| static void | SetMatrix_Gl (ChMatrixNM< Real, 3, 4 > &Gl, const ChQuaternion< Real > &mq) |
| static void | SetMatrix_Gw (ChMatrixNM< Real, 3, 4 > &Gw, const ChQuaternion< Real > &mq) |
| static ChVector< Real > | Gl_x_Quat (const ChQuaternion< Real > &mq, const ChQuaternion< Real > &qb) |
| static ChQuaternion< Real > | GlT_x_Vect (const ChQuaternion< Real > &mq, const ChVector< Real > &v) |
Public Attributes | |
| ChCoordsys< Real > | coord |
| ChMatrix33< Real > | Amatrix |
Friends | |
| ChVector< Real > | operator>> (const ChVector< Real > &V, const ChFrame< Real > &mframe) |
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 transfomed by the same coordinate frame.
| void chrono::ChFrame< Real >::ConcatenatePostTransformation | ( | const ChFrame< Real > & | T | ) |
Apply a transformation (rotation and translation) represented by another ChFrame T in local coordinate. This is equivalent to post-multiply this frame by the other frame T: this'= this * T; or this'= T >> this
| void chrono::ChFrame< Real >::ConcatenatePreTransformation | ( | const ChFrame< Real > & | T | ) |
Apply a transformation (rotation and translation) represented by another ChFrame T. This is equivalent to pre-multiply this frame by the other frame T: this'= T * this; or this' = this >> T
| ChCoordsys<Real> chrono::ChFrame< Real >::GetCoord | ( | ) |
Return both current rotation and translation as a coordsystem object, with vector and quaternion
| static ChVector<Real> chrono::ChFrame< Real >::Gl_x_Quat | ( | const ChQuaternion< Real > & | mq, |
| const ChQuaternion< Real > & | qb | ||
| ) | [static] |
Computes the product v=[Gl(mq)]*qb without the need of having the [Gl] matrix (just pass the mq quaternion, since Gl is function of mq)
| static ChQuaternion<Real> chrono::ChFrame< Real >::GlT_x_Vect | ( | const ChQuaternion< Real > & | mq, |
| const ChVector< Real > & | v | ||
| ) | [static] |
Computes the product q=[Gl(mq)]*v without the need of having the [Gl] matrix (just pass the mq quaternion, since Gl is function of mq)
| virtual void chrono::ChFrame< Real >::Invert | ( | ) | [virtual] |
The trasformation is inverted in place. That is if w=A*v, then A.Invert();v=A*w;
Reimplemented in chrono::ChFrameMoving< Real >, and chrono::ChFrameMoving< double >.
| void chrono::ChFrame< Real >::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 chrono::ChFrame< Real >::Move | ( | ChCoordsys< Real > & | VR | ) |
Apply both translation and rotation, assuming both expressed in parent coordinates, as a vector for translation and quaternion for rotation,
| ChFrame<Real>& chrono::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> chrono::ChFrame< Real >::operator* | ( | const ChFrame< Real > & | Fb | ) | const |
The '*' operator transforms a coordinate system, so transformations can be represented with this syntax: new_frame = tr_frame * old_frame; For a sequence of transformations, i.e. a chain of coordinate systems, you can also write this (just like you would do with a sequence of Denavitt-Hartemberg matrix multiplications!) new_frame = frame1to0 * frame2to1 * frame3to2 * old_frame; This operation is not commutative. NOTE: since c++ operator execution is from left to right, in case of multiple transformations like w=A*B*C*v, the >> operator performs faster, like w=v>>C>>B>>A;
| ChVector<Real> chrono::ChFrame< 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. a chain of coordinate systems, you can also write this (just like you would do with a sequence of Denavitt-Hartemberg matrix multiplications!) new_v = frame1to0 * frame2to1 * frame3to2 * old_v; This operation is not commutative. NOTE: since c++ operator execution is from left to right, in case of multiple transformations like w=A*B*C*v, the >> operator performs faster, like w=v>>C>>B>>A;
| ChFrame<Real>& chrono::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
| ChVector<Real> chrono::ChFrame< Real >::operator/ | ( | const ChVector< Real > & | V | ) | const |
The '/' is like the '*' operator (see), but uses the inverse transformation for A, in A/b. (with A ChFrame, b ChVector) That is: c=A*b ; b=A/c;
| ChFrame<Real> chrono::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. a chain of coordinate systems, you can also write this (like you would do with a sequence of Denavitt-Hartemberg matrix multiplications, but in the _opposite_ order...) new_frame = old_frame >> frame3to2 >> frame2to1 >> frame1to0; This operation is not commutative.
| virtual void chrono::ChFrame< Real >::SetCoord | ( | const ChCoordsys< Real > & | mcoord | ) | [virtual] |
Impose both translation and rotation as a single ChCoordsys. Note: the quaternion part must be already normalized!
| virtual void chrono::ChFrame< Real >::SetCoord | ( | const ChVector< Real > & | mv, |
| const ChQuaternion< Real > & | mq | ||
| ) | [virtual] |
Impose both translation and rotation. Note: the quaternion part must be already normalized!
| static void chrono::ChFrame< Real >::SetMatrix_Gl | ( | ChMatrixNM< Real, 3, 4 > & | Gl, |
| const ChQuaternion< Real > & | mq | ||
| ) | [static] |
Fast fill a 3x4 matrix [Gl(q)], as in local angular speed conversion Wl=[Gl]*q_dt (btw: [Gl(q)] = 2*[Fp(q')] = 2*[G] with G matrix as in Shabana)
| static void chrono::ChFrame< Real >::SetMatrix_Gw | ( | ChMatrixNM< Real, 3, 4 > & | Gw, |
| const ChQuaternion< Real > & | mq | ||
| ) | [static] |
Fast fill a 3x4 matrix [Gw(q)], as in absolute angular speed conversion Ww=[Gw]*q_dt (btw: [Gw(q)] = 2*[Fm(q')] = 2*[E] with E matrix as in Shabana)
| virtual void chrono::ChFrame< Real >::SetRot | ( | const ChQuaternion< Real > & | mrot | ) | [virtual] |
Impose the rotation as a quaternion. Note: the quaternion must be already normalized!
| virtual void chrono::ChFrame< Real >::SetRot | ( | ChMatrix33< Real > & | mA | ) | [virtual] |
Impose the rotation as a 3x3 matrix. Note: the rotation matrix must be already orthogonal!
| virtual void chrono::ChFrame< Real >::StreamIN | ( | ChStreamInBinary & | mstream | ) | [virtual] |
Operator to allow deserializing a persistent binary archive (ex: a file) into transient data.
Reimplemented in chrono::ChBody, chrono::ChFrameMoving< Real >, chrono::ChFrameMoving< double >, chrono::ChMarker, chrono::ChConveyor, chrono::ChBodyDEM, chrono::ChBodyAuxRef, chrono::ChBodyDEMMPI, and chrono::ChBodyMPI.
| virtual void chrono::ChFrame< Real >::StreamOUT | ( | ChStreamOutAscii & | mstream | ) | [virtual] |
Method to allow serializing transient data into in ascii as a readable item, for example "chrono::GetLog() << myobject;"
Reimplemented in chrono::ChBody, chrono::ChFrameMoving< Real >, chrono::ChFrameMoving< double >, and chrono::ChMarker.
| virtual void chrono::ChFrame< Real >::StreamOUT | ( | ChStreamOutBinary & | mstream | ) | [virtual] |
Method to allow serializing transient data into a persistent binary archive (ex: a file).
Reimplemented in chrono::ChBody, chrono::ChFrameMoving< Real >, chrono::ChFrameMoving< double >, chrono::ChMarker, chrono::ChConveyor, chrono::ChBodyDEM, chrono::ChBodyAuxRef, chrono::ChBodyDEMMPI, and chrono::ChBodyMPI.
| virtual ChVector<Real> chrono::ChFrame< Real >::TrasformLocalToParent | ( | const ChVector< Real > & | local | ) | const [virtual] |
This function transforms a point from the local frame coordinate system to the parent coordinate system. OPTIMIZED FOR SPEED. Since it will use the auxiliary rotation matrix of the ChFrame object, this function is about 50% faster than TrasformParentToLocal of a ChCoordsys.
| local | point to transform, given in local frame coordinates |
| virtual void chrono::ChFrame< Real >::TrasformLocalToParent | ( | const ChFrame< Real > & | local, |
| ChFrame< Real > & | parent | ||
| ) | const [virtual] |
This function transforms a frame from 'this' local coordinate system to parent frame coordinate system.
| local | frame to transform, given in local frame coordinates |
| parent | transformed frame, in parent coordinates, will be stored here |
| virtual ChVector<Real> chrono::ChFrame< Real >::TrasformParentToLocal | ( | const ChVector< Real > & | parent | ) | const [virtual] |
This function transforms a point from the parent coordinate system to local frame coordinate system. OPTIMIZED FOR SPEED. Since it will use the auxiliary rotation matrix of the ChFrame object, this function is about 50% faster than TrasformParentToLocal method of a ChCoordsys.
| parent | point to transform, given in parent coordinates |
| virtual void chrono::ChFrame< Real >::TrasformParentToLocal | ( | const ChFrame< Real > & | parent, |
| ChFrame< Real > & | local | ||
| ) | const [virtual] |
This function transforms a frame from the parent coordinate system to 'this' local frame coordinate system.
| parent | frame to transform, given in parent coordinates |
| local | transformed frame, in local coordinates, will be stored here |
| ChVector<Real> operator>> | ( | const ChVector< Real > & | V, |
| const ChFrame< Real > & | mframe | ||
| ) | [friend] |
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. a chain of coordinate systems, you can also write this (like you would do with a sequence of Denavitt-Hartemberg matrix multiplications, but in the opposite order...) new_v = old_v >> frame3to2 >> frame2to1 >> frame1to0; This operation is not commutative.
| ChMatrix33<Real> chrono::ChFrame< Real >::Amatrix |
Rotation as 3x3 orthogonal matrix (auxiliary, for faster transformation of many coordinates )
CHRONO::ENGINE