MULTIBODY SIMULATION SOFTWARE - API documentation
Public Member Functions | Public Attributes
chrono::ChCoordsys< Real > Class Template Reference

#include <CHcoordsys.h>

List of all members.

Public Member Functions

 ChCoordsys (const ChVector< Real > mv, const ChQuaternion< Real > mq=QUNIT)
 ChCoordsys (const ChCoordsys< Real > &other)
ChCoordsys< Real > & operator= (const ChCoordsys< Real > &other)
bool operator<= (const ChCoordsys< Real > &other) const
bool operator>= (const ChCoordsys< Real > &other) const
bool operator== (const ChCoordsys< Real > &other) const
bool operator!= (const ChCoordsys< Real > &other) const
void Force2D ()
bool Equals (const ChCoordsys< Real > &other) const
bool Equals (const ChCoordsys< Real > &other, Real tol) const
void SetIdentity ()
ChVector< Real > TrasformParentToLocal (const ChVector< Real > &parent) const
ChVector< Real > TrasformLocalToParent (const ChVector< Real > &local) const
void StreamOUT (ChStreamOutAscii &mstream)
void StreamOUT (ChStreamOutBinary &mstream)
void StreamIN (ChStreamInBinary &mstream)

Public Attributes

ChVector< Real > pos
ChQuaternion< Real > rot

Detailed Description

template<class Real = double>
class chrono::ChCoordsys< Real >

COORDSYS:

This class contains both traslational variable (the origin of the axis) and the rotational variable (that is the unitary quaternion which represent the special-orthogonal transformation matrix). Basic features for point-coordinate transformations are provided. However, for more advanced features, the heavier classes ChFrame() or ChFrameMoving() may suit better. The coordsys object comes either with the template "ChCoordsys<type>" mode, either in the 'shortcut' flavour, that is "Coordsys", which assumes the type of the four scalars is double precision, so it is faster to type.


Member Function Documentation

template<class Real = double>
void chrono::ChCoordsys< Real >::StreamIN ( ChStreamInBinary mstream)

Operator to allow deserializing a persistent binary archive (ex: a file) into transient data.

template<class Real = double>
void chrono::ChCoordsys< Real >::StreamOUT ( ChStreamOutAscii mstream)

Method to allow serializing transient data into in ascii as a readable item, for example "chrono::GetLog() << myobject;"

template<class Real = double>
void chrono::ChCoordsys< Real >::StreamOUT ( ChStreamOutBinary mstream)

Method to allow serializing transient data into a persistent binary archive (ex: a file).

template<class Real = double>
ChVector<Real> chrono::ChCoordsys< Real >::TrasformLocalToParent ( const ChVector< Real > &  local) const

This function transforms a point from the local coordinate system to the parent coordinate system. Relative position of local respect to parent is given by this coordys, i.e. 'origin' translation and 'alignment' quaternion.

Returns:
The point in parent coordinate, as parent=origin +q*[0,(local)]*q'
Parameters:
localpoint to transform, given in local coordinates
template<class Real = double>
ChVector<Real> chrono::ChCoordsys< Real >::TrasformParentToLocal ( const ChVector< Real > &  parent) const

This function transforms a point from the parent coordinate system to a local coordinate system, whose relative position is given by this coodsys, i.e. 'origin' translation and 'alignment' quaternion.

Returns:
The point in local coordinate, as local=q'*[0,(parent-origin)]*q
Parameters:
parentpoint to transform, given in parent coordinates

CHRONO::ENGINE
C++ library for multibody simulation, (C) Alessandro Tasora
This API documentation has been generated on Tue Jul 10 2012 by Doxygen