cODEGenericBody Class Reference

This class implements an ODE dynamic object. More...

#include <CODEGenericBody.h>

Inheritance diagram for cODEGenericBody:

Public Member Functions

 cODEGenericBody (cODEWorld *a_world)
 Constructor of cODEGenericBody. More...
 
virtual ~cODEGenericBody ()
 Destructor of cODEGenericBody. More...
 
virtual void setLocalPos (const chai3d::cVector3d &a_position)
 This method sets the local position of object. More...
 
void setLocalPos (const double a_x=0.0, const double a_y=0.0, const double a_z=0.0)
 This method sets the local position of this object. More...
 
virtual void setLocalRot (const chai3d::cMatrix3d &a_rotation)
 This method sets the orientation of this object. More...
 
void updateBodyPosition (void)
 This method updates the position and orientation from the ODE model to CHAI3D model. More...
 
void addExternalForce (const chai3d::cVector3d &a_force)
 This method applies an external force at the center of mass of this object. More...
 
void addExternalTorque (const chai3d::cVector3d &a_torque)
 This method applies an external torque at the center of mass of of this object. More...
 
void addExternalForceAtPoint (const chai3d::cVector3d &a_force, const chai3d::cVector3d &a_pos)
 This method applies an external force at a given position described in global coordinates to this object. More...
 
void setMass (const double a_mass)
 This method assigns a value for the mass of this object. More...
 
double getMass () const
 This method returns the mass value for this object. More...
 
void enableDynamics ()
 This method enables dynamics for this object. More...
 
void disableDynamics ()
 This method disables dynamics for this object. More...
 
bool isStatic () const
 This method returns true if the object is dynamically static, false otherwise. More...
 
virtual void buildDynamicModel ()
 This method creates a dynamic model of the object for modeling collisions between objects. More...
 
void createDynamicBoundingBox (const bool a_staticObject=false)
 This method creates a dynamic box representation for modeling collisions between objects. More...
 
void createDynamicSphere (const double a_radius, const bool a_staticObject=false, const chai3d::cVector3d &a_offsetPos=chai3d::cVector3d(0.0, 0.0, 0.0), const chai3d::cMatrix3d &a_offsetRot=chai3d::cIdentity3d())
 This method creates a dynamic sphere representation for modeling collisions between objects. More...
 
void createDynamicBox (const double a_lengthX, const double a_lengthY, const double a_lengthZ, const bool a_staticObject=false, const chai3d::cVector3d &a_offsetPos=chai3d::cVector3d(0.0, 0.0, 0.0), const chai3d::cMatrix3d &a_offsetRot=chai3d::cIdentity3d())
 This method creates a dynamic box representation for modeling collisions between objects. More...
 
void createDynamicCapsule (const double a_radius, const double a_length, const bool a_staticObject=false, const chai3d::cVector3d &a_offsetPos=chai3d::cVector3d(0.0, 0.0, 0.0), const chai3d::cMatrix3d &a_offsetRot=chai3d::cIdentity3d())
 This method creates a dynamic capsule representation for modeling collisions between objects. More...
 
void createDynamicCylinder (const double a_radius, const double a_length, const bool a_staticObject=false, const chai3d::cVector3d &a_offsetPos=chai3d::cVector3d(0.0, 0.0, 0.0), const chai3d::cMatrix3d &a_offsetRot=chai3d::cIdentity3d())
 This method creates a dynamic caped cylinder representation for modeling collisions between objects. More...
 
void createStaticPlane (const chai3d::cVector3d &a_position, const chai3d::cVector3d &a_normal)
 This method creates a static plane representation for modeling collisions between objects. More...
 
void createDynamicMesh (const bool a_staticObject=false, const chai3d::cVector3d &a_offsetPos=chai3d::cVector3d(0.0, 0.0, 0.0), const chai3d::cMatrix3d &a_offsetRot=chai3d::cIdentity3d())
 This method creates a triangle mesh representation for modeling collisions between objects. More...
 
virtual bool computeCollisionDetection (const chai3d::cVector3d &a_segmentPointA, const chai3d::cVector3d &a_segmentPointB, chai3d::cCollisionRecorder &a_recorder, chai3d::cCollisionSettings &a_settings)
 This method computes all collisions between a segment passed as argument and the body image of this object. More...
 
void setImageModel (chai3d::cGenericObject *a_imageModel)
 This method sets a CHAI3D body image for this object. More...
 
chai3d::cGenericObject * getImageModel ()
 This method returns a pointer to the CHAI3D body image. More...
 
void setShowDynamicCollisionModel (const bool a_show)
 This method displays or hides the collision model. More...
 
bool getShowDynamicCollisionModel ()
 This method returns the display status of the collision model. More...
 
- Public Member Functions inherited from chai3d::cGenericObject
 cGenericObject ()
 
virtual ~cGenericObject ()
 
virtual void setEnabled (bool a_enabled, const bool a_affectChildren=false)
 
bool getEnabled () const
 
virtual cGenericObject * copy (const bool a_duplicateMaterialData=false, const bool a_duplicateTextureData=false, const bool a_duplicateMeshData=false, const bool a_buildCollisionDetector=true)
 
void setLocalPos (const double a_x=0.0, const double a_y=0.0, const double a_z=0.0)
 
cVector3d getLocalPos () const
 
cVector3d getGlobalPos () const
 
cMatrix3d getLocalRot () const
 
cMatrix3d getGlobalRot () const
 
void setLocalTransform (const cTransform &a_transform)
 
cTransform getLocalTransform ()
 
cTransform getGlobalTransform ()
 
void translate (const cVector3d &a_translation)
 
void translate (const double a_x, const double a_y, const double a_z=0.0)
 
void rotateAboutLocalAxisRad (const cVector3d &a_axis, const double a_angleRad)
 
void rotateAboutLocalAxisDeg (const cVector3d &a_axis, const double a_angleDeg)
 
void rotateAboutLocalAxisRad (const double a_axisX, const double a_axisY, const double a_axisZ, const double a_angleRad)
 
void rotateAboutLocalAxisDeg (const double a_axisX, const double a_axisY, const double a_axisZ, const double a_angleDeg)
 
void rotateAboutGlobalAxisRad (const cVector3d &a_axis, const double a_angleRad)
 
void rotateAboutGlobalAxisDeg (const cVector3d &a_axis, const double a_angleDeg)
 
void rotateAboutGlobalAxisRad (const double a_axisX, const double a_axisY, const double a_axisZ, const double a_angleRad)
 
void rotateAboutGlobalAxisDeg (const double a_axisX, const double a_axisY, const double a_axisZ, const double a_angleDeg)
 
void rotateExtrinsicEulerAnglesRad (const double &a_angleRad1, const double &a_angleRad2, const double &a_angleRad3, const cEulerOrder a_eulerOrder)
 
void rotateExtrinsicEulerAnglesDeg (const double &a_angleDeg1, const double &a_angleDeg2, const double &a_angleDeg3, const cEulerOrder a_eulerOrder)
 
void rotateIntrinsicEulerAnglesRad (const double &a_angleRad1, const double &a_angleRad2, const double &a_angleRad3, const cEulerOrder a_eulerOrder)
 
void rotateIntrinsicEulerAnglesDeg (const double &a_angleDeg1, const double &a_angleDeg2, const double &a_angleDeg3, const cEulerOrder a_eulerOrder)
 
virtual void computeGlobalPositions (const bool a_frameOnly=true, const cVector3d &a_globalPos=cVector3d(0.0, 0.0, 0.0), const cMatrix3d &a_globalRot=cIdentity3d())
 
void computeGlobalPositionsFromRoot (const bool a_frameOnly=true)
 
bool addEffect (cGenericEffect *a_effect)
 
bool removeEffect (cGenericEffect *a_effect)
 
void deleteAllEffects ()
 
bool createEffectMagnetic ()
 
bool deleteEffectMagnetic ()
 
bool createEffectStickSlip ()
 
bool deleteEffectStickSlip ()
 
bool createEffectSurface ()
 
bool deleteEffectSurface ()
 
bool createEffectVibration ()
 
bool deleteEffectVibration ()
 
bool createEffectViscosity ()
 
bool deleteEffectViscosity ()
 
virtual void setHapticEnabled (const bool a_hapticEnabled, const bool a_affectChildren=true)
 
bool getHapticEnabled () const
 
virtual void setStiffness (const double a_stiffness, const bool a_affectChildren=true)
 
virtual void setFriction (double a_staticFriction, double a_dynamicFriction, const bool a_affectChildren=true)
 
virtual void setShowEnabled (const bool a_show, const bool a_affectChildren=true)
 
bool getShowEnabled () const
 
virtual void setWireMode (const bool a_showWireMode, const bool a_affectChildren=false)
 
bool getWireMode () const
 
virtual void setUseCulling (const bool a_useCulling, const bool a_affectChildren=false)
 
bool getUseCulling () const
 
virtual void setUseTransparency (const bool a_useTransparency, const bool a_affectChildren=false)
 
bool getUseTransparency () const
 
virtual void setTransparencyLevel (const float a_level, const bool a_applyToVertices=false, const bool a_applyToTextures=false, const bool a_affectChildren=false)
 
virtual void setUseDisplayList (const bool a_useDisplayList, const bool a_affectChildren=false)
 
bool getUseDisplayList () const
 
virtual void markForUpdate (const bool a_affectChildren=false)
 
virtual void setUseVertexColors (const bool a_useColors, const bool a_affectChildren=false)
 
bool getUseVertexColors () const
 
virtual void setUseMaterial (const bool a_useMaterial, const bool a_affectChildren=false)
 
bool getUseMaterial () const
 
virtual void setMaterial (cMaterialPtr a_material, const bool a_affectChildren=false)
 
virtual void setMaterial (cMaterial &a_material, const bool a_affectChildren=false)
 
virtual void backupMaterialColors (const bool a_affectChildren=false)
 
virtual void restoreMaterialColors (const bool a_affectChildren=false)
 
virtual void setUseTexture (const bool a_useTexture, const bool a_affectChildren=false)
 
bool getUseTexture () const
 
virtual void setTexture (cTexture1dPtr a_texture, const bool a_affectChildren=false)
 
virtual void setShaderProgram (cShaderProgramPtr a_shaderProgram, const bool a_affectChildren=false)
 
virtual cShaderProgramPtr getShaderProgram ()
 
virtual void setShowBoundaryBox (const bool a_showBoundaryBox, const bool a_affectChildren=false)
 
bool getShowBoundaryBox () const
 
cVector3d getBoundaryMin () const
 
cVector3d getBoundaryMax () const
 
cVector3d getBoundaryCenter () const
 
bool getBoundaryBoxEmpty ()
 
virtual void computeBoundaryBox (const bool a_includeChildren=true)
 
virtual void setShowFrame (const bool a_showFrame, const bool a_affectChildren=false)
 
bool getShowFrame (void) const
 
virtual void setFrameSize (const double a_size=1.0, const bool a_affectChildren=false)
 
double getFrameSize () const
 
void setCollisionDetector (cGenericCollision *a_collisionDetector)
 
cGenericCollision * getCollisionDetector () const
 
virtual void deleteCollisionDetector (const bool a_affectChildren=false)
 
virtual void setShowCollisionDetector (const bool a_showCollisionDetector, const bool a_affectChildren=false)
 
bool getShowCollisionDetector ()
 
virtual void setCollisionDetectorProperties (unsigned int a_displayDepth, cColorf &a_color, const bool a_affectChildren=false)
 
void setParent (cGenericObject *a_parent)
 
cGenericObject * getParent () const
 
void setOwner (cGenericObject *a_owner)
 
cGenericObject * getOwner ()
 
cGenericObject * getChild (const unsigned int a_index) const
 
bool addChild (cGenericObject *a_object)
 
bool removeChild (cGenericObject *a_object)
 
bool removeFromGraph ()
 
bool deleteChild (cGenericObject *a_object)
 
void clearAllChildren ()
 
void deleteAllChildren ()
 
unsigned int getNumChildren ()
 
unsigned int getNumDescendants (bool a_includeCurrentObject=false)
 
void setGhostEnabled (bool a_ghostEnabled)
 
bool getGhostEnabled ()
 
virtual void scale (const double &a_scaleFactor, const bool a_affectChildren=true)
 
virtual void renderSceneGraph (cRenderOptions &a_options)
 
virtual void adjustCollisionSegment (cVector3d &a_segmentPointA, cVector3d &a_segmentPointAadjusted)
 
virtual cVector3d computeInteractions (const cVector3d &a_toolPos, const cVector3d &a_toolVel, const unsigned int a_IDN, cInteractionRecorder &a_interactions)
 
- Public Member Functions inherited from chai3d::cGenericType
 cGenericType ()
 
virtual ~cGenericType ()
 

Public Attributes

cODEWorld * m_ODEWorld
 Parent world. More...
 
chai3d::cGenericObject * m_imageModel
 Object used to represent the geometry and graphical properties of the object. More...
 
dBodyID m_ode_body
 ODE body. More...
 
dGeomID m_ode_geom
 ODE body geometry. More...
 
chai3d::cColorf m_colorDynamicCollisionModel
 Color used to render collision model. More...
 
- Public Attributes inherited from chai3d::cGenericObject
std::string m_name
 
cMaterialPtr m_material
 
cTexture1dPtr m_texture
 
cNormalMapPtr m_normalMap
 
int m_userTag
 
void * m_userData
 
std::string m_userName
 
cGenericObject * m_userExternalObject
 
cVector3d m_interactionPoint
 
cVector3d m_interactionNormal
 
bool m_interactionInside
 

Protected Member Functions

virtual void updateGlobalPositions (const bool a_frameOnly)
 This method updates the global position frame of this object. More...
 
virtual void render (chai3d::cRenderOptions &a_options)
 This method renders the object graphically using OpenGL. More...
 
int buildMeshTable (chai3d::cMultiMesh *a_multiMesh)
 This method builds table of triangles and vertices for ODE multiMesh representation. More...
 
int buildMeshTable (chai3d::cMesh *a_mesh)
 This method builds table of triangles and vertices for ODE mesh representation. More...
 
void initialize (cODEWorld *a_world)
 This method initializes the ODE object. More...
 
- Protected Member Functions inherited from chai3d::cGenericObject
virtual void updateBoundaryBox ()
 
virtual void scaleObject (const double &a_scaleFactor)
 
virtual void computeLocalInteraction (const cVector3d &a_toolPos, const cVector3d &a_toolVel, const unsigned int a_IDN)
 
virtual cVector3d computeOtherInteractions (const cVector3d &a_toolPos, const cVector3d &a_toolVel, const unsigned int a_IDN, cInteractionRecorder &a_interactions)
 
virtual bool computeOtherCollisionDetection (cVector3d &a_segmentPointA, cVector3d &a_segmentPointB, cCollisionRecorder &a_recorder, cCollisionSettings &a_settings)
 
void copyGenericObjectProperties (cGenericObject *a_objDest, const bool a_duplicateMaterialData, const bool a_duplicateTextureData, const bool a_duplicateMeshData, const bool a_buildCollisionDetector)
 

Protected Attributes

bool m_static
 if true then ODE object is static and does not move. More...
 
dMass m_ode_mass
 ODE body mass matrix. More...
 
double m_mass
 Mass of object units: [kg]. More...
 
float * m_vertices
 ODE vertices (for triangle mesh models) - Do not use doubles since not supported under ODE! More...
 
int * m_vertexIndices
 ODE indices (for triangle mesh models). More...
 
double m_prevTransform [16]
 ODE previous tri mesh position and orientation. More...
 
dTriMeshDataID m_ode_triMeshDataID
 ODE triangle mesh ID. More...
 
bool m_showDynamicCollisionModel
 Enable/Disable graphical representation of collision model. More...
 
cODEDynamicModelType m_typeDynamicCollisionModel
 Dynamic model type. More...
 
double m_paramDynColModel0
 
double m_paramDynColModel1
 
double m_paramDynColModel2
 
chai3d::cVector3d m_posOffsetDynColModel
 
chai3d::cMatrix3d m_rotOffsetDynColModel
 
- Protected Attributes inherited from chai3d::cGenericObject
cGenericObject * m_parent
 
cGenericObject * m_owner
 
std::vector< cGenericObject * > m_children
 
cVector3d m_localPos
 
cVector3d m_globalPos
 
cMatrix3d m_localRot
 
cMatrix3d m_globalRot
 
cVector3d m_prevGlobalPos
 
cMatrix3d m_prevGlobalRot
 
cVector3d m_boundaryBoxMin
 
cVector3d m_boundaryBoxMax
 
bool m_boundaryBoxEmpty
 
double m_frameSize
 
double m_frameThicknessScale
 
bool m_enabled
 
bool m_showEnabled
 
bool m_hapticEnabled
 
bool m_ghostEnabled
 
bool m_showFrame
 
bool m_showBoundaryBox
 
bool m_showCollisionDetector
 
bool m_useTextureMapping
 
bool m_useMaterialProperty
 
bool m_useVertexColors
 
bool m_useDisplayList
 
cDisplayList m_displayList
 
int m_triangleMode
 
bool m_useTransparency
 
bool m_cullingEnabled
 
cShaderProgramPtr m_shaderProgram
 
cTransform m_frameGL
 
cGenericCollision * m_collisionDetector
 
std::vector< cGenericEffect * > m_effects
 

Additional Inherited Members

- Static Public Attributes inherited from chai3d::cGenericObject
static cColorf s_boundaryBoxColor
 
- Static Protected Attributes inherited from chai3d::cGenericObject
static cMaterialPtr s_defaultMaterial
 

Detailed Description

cODEGenericBody is a base class for modeling any ODE dynamic body.

Constructor & Destructor Documentation

cODEGenericBody::cODEGenericBody ( cODEWorld *  a_world)
inline
virtual cODEGenericBody::~cODEGenericBody ( )
inlinevirtual

Member Function Documentation

void cODEGenericBody::setLocalPos ( const chai3d::cVector3d &  a_position)
virtual

This method assigns a desired position to the object.

Parameters
a_positionNew desired position.

Reimplemented from chai3d::cGenericObject.

void cODEGenericBody::setLocalPos ( const double  a_x = 0.0,
const double  a_y = 0.0,
const double  a_z = 0.0 
)
inline
void cODEGenericBody::setLocalRot ( const chai3d::cMatrix3d &  a_rotation)
virtual

This method assigns a desired rotation to the object.

Parameters
a_rotationNew desired orientation.

Reimplemented from chai3d::cGenericObject.

void cODEGenericBody::updateBodyPosition ( void  )

This method updates the position and orientation data from the ODE representation to the CHAI3D representation.

void cODEGenericBody::addExternalForce ( const chai3d::cVector3d &  a_force)

This method applies an external force at the center of mass of the object.

Parameters
a_forceForce vector.
void cODEGenericBody::addExternalTorque ( const chai3d::cVector3d &  a_torque)

This method applies an external torque at the center of mass of the object.

Parameters
a_torqueTorque vector.
void cODEGenericBody::addExternalForceAtPoint ( const chai3d::cVector3d &  a_force,
const chai3d::cVector3d &  a_pos 
)

This method applies an external force to the object at a given position. the position and force are expressed in global coordinates.

Parameters
a_forceForce vector.
a_posPosition (in global coordinates) where force is applied.
void cODEGenericBody::setMass ( const double  a_mass)

This method assigns a mass value to the current object.

Parameters
a_massmass value.
double cODEGenericBody::getMass ( ) const
inline
void cODEGenericBody::enableDynamics ( )

This method enables the object from being updated within the dynamics simulation.

void cODEGenericBody::disableDynamics ( )

This method disables the object from being updated within the dynamics simulation.

bool cODEGenericBody::isStatic ( ) const
inline
virtual void cODEGenericBody::buildDynamicModel ( )
inlinevirtual
void cODEGenericBody::createDynamicBoundingBox ( const bool  a_staticObject = false)

This method uses the bounding box of the geometric representation of the object to generate a box that is used for collision detection.

Parameters
a_staticObjectIf true then object is defined as static.
void cODEGenericBody::createDynamicSphere ( const double  a_radius,
const bool  a_staticObject = false,
const chai3d::cVector3d &  a_offsetPos = chai3d::cVector3d(0.0, 0.0, 0.0),
const chai3d::cMatrix3d &  a_offsetRot = chai3d::cIdentity3d() 
)

This method creates an ODE dynamic sphere model that is used for collision detection. It is possible to visualize the actual ODE physical model by calling setShowDynamicCollisionModel() method.

Parameters
a_radiusRadius of sphere.
a_staticObjectIf true then object is defined as static.
a_offsetPosPosition offset.
a_offsetRotRotation offset.
void cODEGenericBody::createDynamicBox ( const double  a_lengthX,
const double  a_lengthY,
const double  a_lengthZ,
const bool  a_staticObject = false,
const chai3d::cVector3d &  a_offsetPos = chai3d::cVector3d(0.0, 0.0, 0.0),
const chai3d::cMatrix3d &  a_offsetRot = chai3d::cIdentity3d() 
)

This method creates an ODE dynamic box model. It is possible to visualize the actual ODE physical model by calling setShowDynamicCollisionModel() method.

Parameters
a_lengthXSize of box along the x axis.
a_lengthYSize of box along the y axis.
a_lengthZSize of box along the z axis.
a_staticObjectIf true then object is defined as static.
a_offsetPosPosition offset.
a_offsetRotRotation offset.
void cODEGenericBody::createDynamicCapsule ( const double  a_radius,
const double  a_length,
const bool  a_staticObject = false,
const chai3d::cVector3d &  a_offsetPos = chai3d::cVector3d(0.0, 0.0, 0.0),
const chai3d::cMatrix3d &  a_offsetRot = chai3d::cIdentity3d() 
)

This method creates an ODE dynamic cylinder model (capsule). It is possible to visualize the actual ODE physical model by calling setShowDynamicCollisionModel() method.

Parameters
a_radiusRadius of capsule.
a_lengthLength of capsule.
a_staticObjectIf true then object is defined as static.
a_offsetPosPosition offset.
a_offsetRotRotation offset.
void cODEGenericBody::createDynamicCylinder ( const double  a_radius,
const double  a_length,
const bool  a_staticObject = false,
const chai3d::cVector3d &  a_offsetPos = chai3d::cVector3d(0.0, 0.0, 0.0),
const chai3d::cMatrix3d &  a_offsetRot = chai3d::cIdentity3d() 
)

This method Create an ODE dynamic cylinder model. It is possible to visualize the actual ODE physical model by calling setShowDynamicCollisionModel() method.

Parameters
a_radiusRadius of capsule.
a_lengthLength of capsule.
a_staticObjectIf true then object is defined as static.
a_offsetPosPosition offset.
a_offsetRotRotation offset.
void cODEGenericBody::createStaticPlane ( const chai3d::cVector3d &  a_position,
const chai3d::cVector3d &  a_normal 
)

This method creates an ODE static model of a plane. It is possible to visualize the actual ODE physical model by calling setShowDynamicCollisionModel() method.

Parameters
a_positionPosition of a point located on the plane.
a_normalSurface normal of the plane.
void cODEGenericBody::createDynamicMesh ( const bool  a_staticObject = false,
const chai3d::cVector3d &  a_offsetPos = chai3d::cVector3d(0.0, 0.0, 0.0),
const chai3d::cMatrix3d &  a_offsetRot = chai3d::cIdentity3d() 
)

This method creates an ODE dynamic model of a mesh. This model requires the body image to be a mesh and uses it triangles to build its physical model.

Parameters
a_staticObjectIf true then object is defined as static.
a_offsetPosPosition offset.
a_offsetRotRotation offset.
bool cODEGenericBody::computeCollisionDetection ( const chai3d::cVector3d &  a_segmentPointA,
const chai3d::cVector3d &  a_segmentPointB,
chai3d::cCollisionRecorder &  a_recorder,
chai3d::cCollisionSettings &  a_settings 
)
virtual

This method checks if a given line segment intersects this object.

Parameters
a_segmentPointAInitial point of segment.
a_segmentPointBEnd point of segment.
a_recorderRecorder which stores all collision events.
a_settingsStructure which contains some rules about how the collision detection should be performed.
Returns
true if collision occurred, false otherwise.

Reimplemented from chai3d::cGenericObject.

void cODEGenericBody::setImageModel ( chai3d::cGenericObject *  a_imageModel)

This method assigns a generic object such as a mesh or a shape that is used to model the geometry of this current ODE object.

Parameters
a_imageModelCHAI3D graphical image model.
chai3d::cGenericObject* cODEGenericBody::getImageModel ( )
inline
void cODEGenericBody::setShowDynamicCollisionModel ( const bool  a_show)
inline
bool cODEGenericBody::getShowDynamicCollisionModel ( )
inline
void cODEGenericBody::updateGlobalPositions ( const bool  a_frameOnly)
protectedvirtual

This method updates globalPos and globalRot given the localPos and localRot of this object and its parents.
If a_frameOnly is set to false, additional global positions such as vertex positions are computed (which can be time-consuming).

Parameters
a_frameOnlyIf __true___ then only frame is computed.

Reimplemented from chai3d::cGenericObject.

void cODEGenericBody::render ( chai3d::cRenderOptions &  a_options)
protectedvirtual

This method renders the object graphically using OpenGL.

Parameters
a_optionsRendering options.

Reimplemented from chai3d::cGenericObject.

int cODEGenericBody::buildMeshTable ( chai3d::cMultiMesh *  a_multiMesh)
protected

This method creates an ODE list of vertices and vertex indices from a multimesh object.

Parameters
a_multiMeshMultimesh object.
int cODEGenericBody::buildMeshTable ( chai3d::cMesh *  a_mesh)
protected

This method creates an ODE list of vertices and vertex indices from a mesh and its children.

Parameters
a_meshMesh to be added to ODE vertex and triangle list.
Returns
Number of triangle added to ODE list
void cODEGenericBody::initialize ( cODEWorld *  a_world)
protected

This method initializes the ODE model.

Parameters
a_worldODE world to which this new object belongs to.

Member Data Documentation

cODEWorld* cODEGenericBody::m_ODEWorld
chai3d::cGenericObject* cODEGenericBody::m_imageModel
dBodyID cODEGenericBody::m_ode_body
dGeomID cODEGenericBody::m_ode_geom
chai3d::cColorf cODEGenericBody::m_colorDynamicCollisionModel
bool cODEGenericBody::m_static
protected
dMass cODEGenericBody::m_ode_mass
protected
double cODEGenericBody::m_mass
protected
float* cODEGenericBody::m_vertices
protected
int* cODEGenericBody::m_vertexIndices
protected
double cODEGenericBody::m_prevTransform[16]
protected
dTriMeshDataID cODEGenericBody::m_ode_triMeshDataID
protected
bool cODEGenericBody::m_showDynamicCollisionModel
protected
cODEDynamicModelType cODEGenericBody::m_typeDynamicCollisionModel
protected
double cODEGenericBody::m_paramDynColModel0
protected

Variables which store the parameters of the collision model. Depending of the dynamic model type, these value correspond to lengths or radius.

double cODEGenericBody::m_paramDynColModel1
protected
double cODEGenericBody::m_paramDynColModel2
protected
chai3d::cVector3d cODEGenericBody::m_posOffsetDynColModel
protected
chai3d::cMatrix3d cODEGenericBody::m_rotOffsetDynColModel
protected

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