cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | List of all members
osaODEBody Class Reference

#include <osaODEBody.h>

Inheritance diagram for osaODEBody:
osaOSGBody

Classes

struct  State
 

Public Member Functions

 osaODEBody (const std::string &model, osaODEWorld *odeworld, const vctFrame4x4< double > &Rtwb, double scale=1.0, double alpha=1.0, const std::string &options=std::string(""), osaOSGWorld *osgworld=NULL, double simplify_ratio=0.0)
 Main constructor. More...
 
 osaODEBody (const std::string &model, osaODEWorld *odeworld, const vctFrm3 &Rtwb, double scale=1.0, double alpha=1.0, const std::string &options=std::string(""), osaOSGWorld *osgworld=NULL, double simplify_ratio=0.0)
 Constructor. More...
 
 osaODEBody (const std::string &model, osaODEWorld *odeWorld, const vctFrame4x4< double > &Rtwb, double m, const vctFixedSizeVector< double, 3 > &com, const vctFixedSizeMatrix< double, 3, 3 > &moit, double scale=1.0, double alpha=1.0, const std::string &options=std::string(""), osaOSGWorld *osgworld=NULL, double simplify_ratio=0.0)
 Main constructor. More...
 
 osaODEBody (const std::string &model, osaODEWorld *odeworld, const vctFrm3 &Rt, double m, const vctFixedSizeVector< double, 3 > &tbcom, const vctFixedSizeMatrix< double, 3, 3 > &moit, double scale=1.0, double alpha=1.0, const std::string &options=std::string(""), osaOSGWorld *osgworld=NULL, double simplify_ratio=0.0)
 Main constructor. More...
 
 osaODEBody (const std::string &model, osaODEWorld *odeworld, const vctFrame4x4< double > &Rt, double m, double scale=1.0, double alpha=1.0, const std::string &options=std::string(""), osaOSGWorld *osgworld=NULL, double simplify_ratio=0.0)
 Main constructor. More...
 
 osaODEBody (const std::string &model, osaODEWorld *odeworld, const vctFrm3 &Rt, double m, double scale=1.0, double alpha=1.0, const std::string &options=std::string(""), osaOSGWorld *osgworld=NULL, double simplify_ratio=0.0)
 Main constructor. More...
 
 ~osaODEBody ()
 Default destructor. More...
 
void Enable ()
 Enable the body in a simulation. More...
 
void Disable ()
 Disable the body in a simulation. More...
 
dBodyID GetBodyID () const
 Query the ID of the body. More...
 
dGeomID GetGeomID () const
 Query the ID of the body. More...
 
const std::string & GetUserData ()
 
void SetTransform (const vctFrame4x4< double > &Rt)
 Set the transform of the body. More...
 
vctFrm3 GetTransform () const
 
- Public Member Functions inherited from osaOSGBody
 osaOSGBody (osaOSGWorld *world, const vctFrame4x4< double > &Rt)
 OSG Body constructor. More...
 
 osaOSGBody (osaOSGBody *body, const vctFrame4x4< double > &Rt)
 
 osaOSGBody (const std::string &model, const vctFrame4x4< double > &Rt, double scale=1.0, double alpha=1.0, const vctFrame4x4< double > &Rtoffset=vctFrame4x4< double >(), const std::string &option=std::string(""))
 OSG Body constructor. More...
 
 osaOSGBody (const std::string &model, osaOSGWorld *world, const vctFrame4x4< double > &Rt, double scale=1.0, double alpha=1.0, const vctFrame4x4< double > &Rtoffset=vctFrame4x4< double >(), const std::string &option=std::string(""))
 OSG Body constructor. More...
 
 osaOSGBody (const std::string &model, osaOSGBody *world, const vctFrame4x4< double > &Rt, double scale=1.0, double alpha=1.0, const vctFrame4x4< double > &Rtoffset=vctFrame4x4< double >(), const std::string &option=std::string(""))
 OSG Body constructor. More...
 
 osaOSGBody (const std::string &model, osaOSGWorld *world, const vctFrm3 &Rt, double scale=1.0, double alpha=1.0, const std::string &option=std::string(""))
 OSG Body constructor. More...
 
 osaOSGBody (const vctDynamicMatrix< double > &pointcloud, osaOSGWorld *world, const vctFrm3 &Rt, const vctFixedSizeVector< unsigned char, 3 > &rgb=RGBDEFAULT, float size=3.0)
 Construcor for 3D point cloud. More...
 
 osaOSGBody ()
 
 ~osaOSGBody ()
 
void Initialize (double scale=1.0)
 
virtual void SetTransform (const vctFrm3 &Rt)
 
osg::ref_ptr
< osg::MatrixTransform > 
GetMatrixTransform ()
 
void ResetMatrixTransform ()
 
void SwitchOn ()
 Set the switch of the body. More...
 
void SwitchOff ()
 
void SetModeLine ()
 
void SetModePoint ()
 
void SetModeFill ()
 
void AddTransformCallback (void)
 
virtual vctDynamicMatrix< double > GetVertices ()
 

Additional Inherited Members

- Public Types inherited from osaOSGBody
enum  Switch { SWITCH_OFF, SWITCH_ON }
 
- Static Public Attributes inherited from osaOSGBody
static const
vctFixedSizeVector< unsigned
char, 3 > 
RGBDEFAULT
 
- Protected Member Functions inherited from osaOSGBody
virtual void UpdateSwitch ()
 This method is called from the switch callback. More...
 
void ReadModel (const std::string &fname, const std::string &options, double alpha)
 
void Read3DData (const vctDynamicMatrix< double > &pc, const vctFixedSizeVector< unsigned char, 3 > &RGB=RGBDEFAULT, float size=3.0)
 
- Protected Attributes inherited from osaOSGBody
osg::ref_ptr< UserDatauserdata
 
osg::ref_ptr
< osg::PositionAttitudeTransform > 
osgscale
 
osg::ref_ptr< TransformCallbacktransformcallback
 
vctFrame4x4< double > transform
 
vctFrame4x4< double > Rtoffset
 
osg::ref_ptr
< osg::MatrixTransform > 
osgtransform
 
osg::ref_ptr< SwitchCallbackswitchcallback
 
Switch onoff
 
osg::ref_ptr< osg::Switch > osgswitch
 
osg::ref_ptr< osg::Geode > osggeode
 

Constructor & Destructor Documentation

osaODEBody::osaODEBody ( const std::string &  model,
osaODEWorld odeworld,
const vctFrame4x4< double > &  Rtwb,
double  scale = 1.0,
double  alpha = 1.0,
const std::string &  options = std::string(""),
osaOSGWorld osgworld = NULL,
double  simplify_ratio = 0.0 
)

Main constructor.

This create an ODE body that can be inserted in an ODE world. This body does not have mass such that it cannot be moved (static object).

Parameters
modelThe file name of the body's geometry
odeworldThe world the body belongs to
RtwbThe position/orientation of the body
osgworldAn osg group to use. If NULL the root of odeworld is used
osaODEBody::osaODEBody ( const std::string &  model,
osaODEWorld odeworld,
const vctFrm3 Rtwb,
double  scale = 1.0,
double  alpha = 1.0,
const std::string &  options = std::string(""),
osaOSGWorld osgworld = NULL,
double  simplify_ratio = 0.0 
)

Constructor.

This create an ODE body that can be inserted in an ODE world. This body does not have mass such that it cannot be moved (static object). The space ID is defined to the world's space.

Parameters
modelThe file name of the body's geometry
odeWorldThe world the body belongs to
RtwbThe position/orientation of the body
osgworldAn osg group to use. If NULL the root of odeworld is used
osaODEBody::osaODEBody ( const std::string &  model,
osaODEWorld odeWorld,
const vctFrame4x4< double > &  Rtwb,
double  m,
const vctFixedSizeVector< double, 3 > &  com,
const vctFixedSizeMatrix< double, 3, 3 > &  moit,
double  scale = 1.0,
double  alpha = 1.0,
const std::string &  options = std::string(""),
osaOSGWorld osgworld = NULL,
double  simplify_ratio = 0.0 
)

Main constructor.

This create an ODE body that can be inserted in an ODE world. This body has a mass such that it can be moved.

Parameters
modelThe file name of the body's geometry
odeWorldThe world the body belongs to
RtwbThe position/orientation of the body
mThe mass of the body
comThe center of mass of the body
moitThe moment of inertia tensor
osgworldAn osg group to use. If NULL the root of odeworld is used
osaODEBody::osaODEBody ( const std::string &  model,
osaODEWorld odeworld,
const vctFrm3 Rt,
double  m,
const vctFixedSizeVector< double, 3 > &  tbcom,
const vctFixedSizeMatrix< double, 3, 3 > &  moit,
double  scale = 1.0,
double  alpha = 1.0,
const std::string &  options = std::string(""),
osaOSGWorld osgworld = NULL,
double  simplify_ratio = 0.0 
)

Main constructor.

This create an ODE body that can be inserted in an ODE world. This body has a mass such that it can be moved.

Parameters
modelThe file name of the body's geometry
odeWorldThe world the body belongs to
RtwbThe position/orientation of the body
mThe mass of the body
comThe center of mass of the body
moitThe moment of inertia tensor
osgworldAn osg group to use. If NULL the root of odeworld is used
osaODEBody::osaODEBody ( const std::string &  model,
osaODEWorld odeworld,
const vctFrame4x4< double > &  Rt,
double  m,
double  scale = 1.0,
double  alpha = 1.0,
const std::string &  options = std::string(""),
osaOSGWorld osgworld = NULL,
double  simplify_ratio = 0.0 
)

Main constructor.

This create an ODE body that can be inserted in an ODE world. This body has a mass such that it can be moved. The center of mass is set to zero and the tensor to identity and space ID set to the world's space.

Parameters
modelThe file name of the body's geometry
odeWorldThe world the body belongs to
RtwbThe position/orientation of the body
mThe mass of the body
osgworldAn osg group to use. If NULL the root of odeworld is used
osaODEBody::osaODEBody ( const std::string &  model,
osaODEWorld odeworld,
const vctFrm3 Rt,
double  m,
double  scale = 1.0,
double  alpha = 1.0,
const std::string &  options = std::string(""),
osaOSGWorld osgworld = NULL,
double  simplify_ratio = 0.0 
)

Main constructor.

This create an ODE body that can be inserted in an ODE world. This body has a mass such that it can be moved. The center of mass is set to zero and the tensor to identity and space ID set to the world's space.

Parameters
modelThe file name of the body's geometry
odeWorldThe world the body belongs to
RtwbThe position/orientation of the body
mThe mass of the body
osgworldAn osg group to use. If NULL the root of odeworld is used
osaODEBody::~osaODEBody ( )

Default destructor.

Member Function Documentation

void osaODEBody::Disable ( )

Disable the body in a simulation.

void osaODEBody::Enable ( )

Enable the body in a simulation.

dBodyID osaODEBody::GetBodyID ( ) const
inline

Query the ID of the body.

dGeomID osaODEBody::GetGeomID ( ) const
inline

Query the ID of the body.

vctFrm3 osaODEBody::GetTransform ( ) const
virtual

Reimplemented from osaOSGBody.

const std::string& osaODEBody::GetUserData ( )
void osaODEBody::SetTransform ( const vctFrame4x4< double > &  Rt)
virtual

Set the transform of the body.

Reimplemented from osaOSGBody.


The documentation for this class was generated from the following file: