Geom Class Reference

#include <Geom.hh>

Inheritance diagram for Geom:

Entity BoxGeom CylinderGeom HeightmapGeom PlaneGeom RayGeom SphereGeom TrimeshGeom

List of all members.

Detailed Description

Base class for all geoms

name of the mesh

std::string meshName
double dblMass

Public Member Functions

 Geom (Body *body)
virtual ~Geom ()
virtual void Load (XMLConfigNode *node)
void SetGeom (dGeomID geomId, bool placeable)
void Update ()
virtual void UpdateChild ()
dGeomID GetGeomId () const
dGeomID GetTransId () const
int GetGeomClass () const
bool IsPlaceable () const
void SetPose (const Pose3d &pose, bool updateCoM=true)
Pose3d GetPose () const
void SetPosition (const Vector3 &pos)
void SetRotation (const Quatern &rot)
void AttachMesh (const std::string &meshName)
void AttachObject (Ogre::MovableObject *obj)
void ScaleMesh (const Vector3 &scale)
void SetCastShadows (bool enable)
void SetMeshMaterial (const std::string &materialName)
void SetCategoryBits (unsigned int bits)
void SetCollideBits (unsigned int bits)
const dMass * GetBodyMassMatrix ()
void SetLaserFiducialId (int id)
int GetLaserFiducialId () const
void SetLaserRetro (float retro)
float GetLaserRetro () const

Public Attributes


Protected Member Functions

virtual void LoadChild (XMLConfigNode *node)=0

Protected Attributes

Ogre::MovableObject * ogreObj
Ogre::MovableObject * odeObj
dGeomID transId
dGeomID geomId
dMass mass
dMass bodyMass
Quatern extraRotation

Constructor & Destructor Documentation

Geom ( Body body  ) 


virtual ~Geom (  )  [virtual]


Member Function Documentation

virtual void Load ( XMLConfigNode node  )  [virtual]

Load the geom

virtual void LoadChild ( XMLConfigNode node  )  [protected, pure virtual]

Load child class

Implemented in BoxGeom, CylinderGeom, HeightmapGeom, PlaneGeom, RayGeom, SphereGeom, and TrimeshGeom.

void SetGeom ( dGeomID  geomId,
bool  placeable 

Set the encapsulated geometry object

void Update (  ) 

Update function for geoms

Reimplemented in RayGeom.

virtual void UpdateChild (  )  [inline, virtual]

Update child class

Reimplemented in HeightmapGeom, and TrimeshGeom.

dGeomID GetGeomId (  )  const

Return the geom id

The geom id

dGeomID GetTransId (  )  const

Return the transform id

The transform id

int GetGeomClass (  )  const

Get the ODE geom class

bool IsPlaceable (  )  const

Return whether this geom is placeable

void SetPose ( const Pose3d pose,
bool  updateCoM = true 

Set the pose

pose New pose
updateCoM True to update the bodies Center of Mass

Pose3d GetPose (  )  const

Return the pose of the geom

void SetPosition ( const Vector3 pos  ) 

Set the position

pos Vector3 position

void SetRotation ( const Quatern rot  ) 

Set the rotation

rot Quaternion rotation

void AttachMesh ( const std::string &  meshName  ) 

Attach a mesh to the geom

meshName Name of the mesh

void AttachObject ( Ogre::MovableObject *  obj  ) 

Attach a moveable object to the node

obj The moveable object

void ScaleMesh ( const Vector3 scale  ) 

Set the scale of the mesh

scale New scale of the mesh

void SetCastShadows ( bool  enable  ) 

Set whether the mesh casts shadows

enable True=cast shadows

void SetMeshMaterial ( const std::string &  materialName  ) 

Set the material to apply to the mesh

void SetCategoryBits ( unsigned int  bits  ) 

Set the category bits, used during collision detection

bits The bits

void SetCollideBits ( unsigned int  bits  ) 

Set the collide bits, used during collision detection

bits The bits

const dMass* GetBodyMassMatrix (  ) 

Get the mass of the geom

void SetLaserFiducialId ( int  id  ) 

Set the laser fiducial integer id

int GetLaserFiducialId (  )  const

Get the laser fiducial integer id

void SetLaserRetro ( float  retro  ) 

Set the laser retro reflectiveness

float GetLaserRetro (  )  const

Get the laser retro reflectiveness

Member Data Documentation

Contact parameters

Body* body [protected]

The body this geom belongs to

Ogre::MovableObject* ogreObj [protected]

Ogre Object

Ogre::MovableObject* odeObj [protected]

ODE object

dGeomID transId [protected]

ID for the transform geom

dGeomID geomId [protected]

ID for the sub-geom

dMass mass [protected]

Mass of this geometry

dMass bodyMass [protected]

mass of the body

Quatern extraRotation [protected]

Extra rotation, used for cylinders

double dblMass [protected]

Mass as a double

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

Last updated Aug 04 2007