BoundingShape Class Reference

class for reading bounding shape description files (.bbox) and to create appropriate geoms More...

#include <boundingshape.h>

Collaboration diagram for BoundingShape:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BoundingShape (const std::string &filename, Mesh *parent)
 class for reading bounding shape description files (.bbox) and to create appropriate geoms File Format: Lines wise, every line stands for one primitive.
virtual ~BoundingShape ()
virtual bool init (const OdeHandle &odeHandle, const OsgHandle &osgHandle, double scale, char mode)
 tries to open the bbox file and greates all geoms
virtual bool isActive ()
virtual void setPose (const osg::Matrix &pose)
 updates all Primitives of the BoundingShape if only in geom mode (no Body)

Protected Attributes

std::string filename
bool active
Primitiveparent
bool attachedToParentBody
std::vector< Primitive * > boundingPrimitiveList
std::vector< osg::MatrixboundingPrimitivePoseList
OdeHandle odeHandle
dSpaceID parentSpace

Detailed Description

class for reading bounding shape description files (.bbox) and to create appropriate geoms

File Format: Lines wise, every line stands for one primitive.

Possible lines are:

(x,y,z) is the position vector and (alpha, beta, gamma) are the rotation angles about x,y,z axis respectively

Example:

cylinder 6.5 50 (0,0,25) (0,0,0)
cylinder 50 15 (0,0,28) (0,0,0)
cylinder 40 30 (0,0,50) (0,0,0)
cylinder 30 20 (0,0,75) (0,0,0)
cylinder 20 30 (0,0,100) (0,0,0)
cylinder 13 30 (0,0,125) (0,0,0)
cylinder 8 30 (0,0,150) (0,0,0)
cylinder 5 30 (0,0,175) (0,0,0)

Constructor & Destructor Documentation

BoundingShape ( const std::string &  filename,
Mesh parent 
)

class for reading bounding shape description files (.bbox) and to create appropriate geoms File Format: Lines wise, every line stands for one primitive.

Parameters:
filename path and name of bbox file. It is located using OsgDB search path
parent primitive to which the bbox is assoziated

Possible lines are: sphere radius (x,y,z) cylinder radius height (x,y,z) (alpha, beta, gamma) capsule radius height (x,y,z) (alpha, beta, gamma) box length width height (x,y,z) (alpha, beta, gamma) (x,y,z) is the position vector and (alpha, beta, gamma) are the rotation angles about x,y,z axis respectively

~BoundingShape (  )  [virtual]

Member Function Documentation

bool init ( const OdeHandle odeHandle,
const OsgHandle osgHandle,
double  scale,
char  mode 
) [virtual]

tries to open the bbox file and greates all geoms

bool isActive (  )  [virtual]
void setPose ( const osg::Matrix pose  )  [virtual]

updates all Primitives of the BoundingShape if only in geom mode (no Body)

Parameters:
pose 

Member Data Documentation

bool active [protected]
bool attachedToParentBody [protected]
std::vector<Primitive*> boundingPrimitiveList [protected]
std::vector<osg::Matrix> boundingPrimitivePoseList [protected]
std::string filename [protected]
OdeHandle odeHandle [protected]
Primitive* parent [protected]
dSpaceID parentSpace [protected]

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