Mesh Class Reference

Mesh primitive. More...

#include <primitive.h>

Inherits lpzrobots::Primitive.

Collaboration diagram for Mesh:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Mesh (const std::string &filename, float scale)
virtual ~Mesh ()
virtual void init (const OdeHandle &odeHandle, double mass, const OsgHandle &osgHandle, char mode=Body|Geom|Draw)
 registers primitive in ODE and OSG.
virtual void update ()
 Updates the OSG nodes with ODE coordinates.
virtual OSGPrimitivegetOSGPrimitive ()
 returns the assoziated osg primitive if there or 0
virtual float getRadius ()
virtual void setMass (double mass)
 sets the mass of the body (uniform)
virtual void setBoundingShape (BoundingShape *boundingShape)
 Sets the BoundingShape externally (e.g.
virtual void setPose (const Pose &pose)
 set the pose of the primitive

Protected Attributes

OSGMeshosgmesh
const std::string filename
float scale
BoundingShapeboundshape
Pose poseWithoutBodyAndGeom

Detailed Description

Mesh primitive.


Constructor & Destructor Documentation

Mesh ( const std::string &  filename,
float  scale 
)
~Mesh (  )  [virtual]

Member Function Documentation

OSGPrimitive * getOSGPrimitive (  )  [virtual]

returns the assoziated osg primitive if there or 0

Implements Primitive.

float getRadius (  )  [virtual]
void init ( const OdeHandle odeHandle,
double  mass,
const OsgHandle osgHandle,
char  mode = Body|Geom|Draw 
) [virtual]

registers primitive in ODE and OSG.

Parameters:
osgHandle scruct with ODE variables inside (to specify space, world...)
mass Mass of the object in ODE (if withBody = true)
osgHandle scruct with OSG variables inside (scene node, color ...)
mode is a conjuction of Modes.

Implements Primitive.

void setBoundingShape ( BoundingShape boundingShape  )  [virtual]

Sets the BoundingShape externally (e.g.

XMLBoundingShape). Any existing BoundingShape will be deleted.

void setMass ( double  mass  )  [virtual]

sets the mass of the body (uniform)

Implements Primitive.

void setPose ( const Pose pose  )  [virtual]

set the pose of the primitive

Reimplemented from Primitive.

void update (  )  [virtual]

Updates the OSG nodes with ODE coordinates.

This function must be overloaded (usually calls setMatrix of OsgPrimitives)

Implements Primitive.


Member Data Documentation

BoundingShape* boundshape [protected]
const std::string filename [protected]
OSGMesh* osgmesh [protected]
float scale [protected]

The documentation for this class was generated from the following files:
Generated on Thu Jun 28 14:48:51 2012 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.6.3