vrsode::Shape Class Reference

Represents a Shape of an Object. More...

#include <Shape.h>

Inheritance diagram for vrsode::Shape:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Shape ()
 ctor.
virtual ~Shape ()
 dtor.
VRS::SO< VRS::SceneThing > debugNode ()
 get a debug node for a visual shape representation.
VRS::Vector offsetCenter ()
 get the offset from object center to bounding box center.
void setOffsetCenter (VRS::Vector)
 set the offset from object center to bounding box center.
VRS::SO< VRS::Rotation > offsetRotation ()
 get the rotation offset.
void setOffsetRotation (VRS::SO< VRS::Rotation >)
 set the rotation offset.
virtual CollisionShape collisionShape ()
 return the collision shape value for this object.
dGeomID geomId ()
 return the geomid for this object.
void activateDebugNode (bool=true)
 whether to activate the debug node
bool debugNodeActive ()
 whther to the debug node is active.

Protected Member Functions

virtual void createGeometry ()=0
 create an ode geometry.
virtual void createDebugNode ()=0
 create a debug geometry.
void setDebugNode (VRS::SO< VRS::SceneThing >)
void setCollisionShape (CollisionShape)
void setGeomId (dGeomID)

Private Attributes

CollisionShape m_collisionShape
VRS::SO< VRS::SceneThing > m_debugNode
VRS::Vector m_offsetCenter
VRS::SO< VRS::Rotation > m_offsetRotation
dGeomID m_geomId
bool m_debugNodeActive

Detailed Description

Represents a Shape of an Object.

Geometry objects are the fundamental objects in the collision system. A geom can represents a single rigid shape (such as a sphere or box).

Definition at line 22 of file Shape.h.


Constructor & Destructor Documentation

vrsode::Shape::Shape (  ) 

ctor.

Definition at line 7 of file Shape.cpp.

References vrsode::CS_None, m_debugNode, m_debugNodeActive, m_geomId, m_offsetRotation, and setCollisionShape().

Here is the call graph for this function:

vrsode::Shape::~Shape (  )  [virtual]

dtor.

Definition at line 16 of file Shape.cpp.


Member Function Documentation

VRS::SO< VRS::SceneThing > vrsode::Shape::debugNode (  ) 

get a debug node for a visual shape representation.

Definition at line 21 of file Shape.cpp.

References m_debugNode.

Referenced by vrsode::TrimeshShape::createDebugNode(), vrsode::SphereShape::createDebugNode(), vrsode::PlaneShape::createDebugNode(), vrsode::NoShape::createDebugNode(), vrsode::CylinderShape::createDebugNode(), and vrsode::BoxShape::createDebugNode().

Here is the caller graph for this function:

VRS::Vector vrsode::Shape::offsetCenter (  ) 

get the offset from object center to bounding box center.

Definition at line 33 of file Shape.cpp.

References m_offsetCenter.

Referenced by vrsode::SphereShape::createDebugNode(), vrsode::CylinderShape::createDebugNode(), and vrsode::BoxShape::createDebugNode().

Here is the caller graph for this function:

void vrsode::Shape::setOffsetCenter ( VRS::Vector   ) 

set the offset from object center to bounding box center.

Definition at line 39 of file Shape.cpp.

References m_offsetCenter.

Referenced by vrsode::BoxShape::BoxShape(), vrsode::BoxShape::setBounds(), and vrsode::SphereShape::SphereShape().

Here is the caller graph for this function:

VRS::SO< VRS::Rotation > vrsode::Shape::offsetRotation (  ) 

get the rotation offset.

Definition at line 45 of file Shape.cpp.

References m_offsetRotation.

Referenced by vrsode::CylinderShape::createDebugNode(), and vrsode::CylinderShape::createGeometry().

Here is the caller graph for this function:

void vrsode::Shape::setOffsetRotation ( VRS::SO< VRS::Rotation >   ) 

set the rotation offset.

Definition at line 51 of file Shape.cpp.

References m_offsetRotation.

CollisionShape vrsode::Shape::collisionShape (  )  [virtual]

return the collision shape value for this object.

Definition at line 63 of file Shape.cpp.

References m_collisionShape.

dGeomID vrsode::Shape::geomId (  ) 

return the geomid for this object.

Definition at line 75 of file Shape.cpp.

References m_geomId.

Referenced by vrsode::TrimeshShape::geometryChangeCallback(), vrsode::PlaneShape::setAnchor(), vrsode::SphereShape::setBounds(), vrsode::BoxShape::setBounds(), vrsode::PlaneShape::setNormal(), vrsode::PlaneShape::setNormalAndAnchor(), and vrsode::SphereShape::setRadius().

Here is the caller graph for this function:

void vrsode::Shape::activateDebugNode ( bool  = true  ) 

whether to activate the debug node

Definition at line 81 of file Shape.cpp.

References createDebugNode(), and m_debugNodeActive.

Here is the call graph for this function:

bool vrsode::Shape::debugNodeActive (  ) 

whther to the debug node is active.

Definition at line 90 of file Shape.cpp.

References m_debugNodeActive.

Referenced by vrsode::TrimeshShape::createDebugNode(), vrsode::SphereShape::createDebugNode(), vrsode::PlaneShape::createDebugNode(), vrsode::NoShape::createDebugNode(), vrsode::CylinderShape::createDebugNode(), vrsode::CapsuleShape::createDebugNode(), and vrsode::BoxShape::createDebugNode().

Here is the caller graph for this function:

virtual void vrsode::Shape::createGeometry (  )  [protected, pure virtual]

create an ode geometry.

Implemented in vrsode::BoxShape, vrsode::CapsuleShape, vrsode::CylinderShape, vrsode::NoShape, vrsode::PlaneShape, vrsode::SphereShape, and vrsode::TrimeshShape.

virtual void vrsode::Shape::createDebugNode (  )  [protected, pure virtual]

create a debug geometry.

Implemented in vrsode::BoxShape, vrsode::CapsuleShape, vrsode::CylinderShape, vrsode::NoShape, vrsode::PlaneShape, vrsode::SphereShape, and vrsode::TrimeshShape.

Referenced by activateDebugNode().

Here is the caller graph for this function:

void vrsode::Shape::setDebugNode ( VRS::SO< VRS::SceneThing >   )  [protected]

Definition at line 27 of file Shape.cpp.

References m_debugNode.

void vrsode::Shape::setCollisionShape ( CollisionShape   )  [protected]

Definition at line 57 of file Shape.cpp.

References m_collisionShape.

Referenced by vrsode::BoxShape::BoxShape(), vrsode::CapsuleShape::CapsuleShape(), vrsode::CylinderShape::CylinderShape(), vrsode::NoShape::NoShape(), vrsode::PlaneShape::PlaneShape(), Shape(), vrsode::SphereShape::SphereShape(), and vrsode::TrimeshShape::TrimeshShape().

Here is the caller graph for this function:

void vrsode::Shape::setGeomId ( dGeomID   )  [protected]

Definition at line 69 of file Shape.cpp.

References m_geomId.

Referenced by vrsode::TrimeshShape::createGeometry(), vrsode::SphereShape::createGeometry(), vrsode::PlaneShape::createGeometry(), vrsode::CylinderShape::createGeometry(), and vrsode::BoxShape::createGeometry().

Here is the caller graph for this function:


Member Data Documentation

CollisionShape vrsode::Shape::m_collisionShape [private]

Definition at line 24 of file Shape.h.

Referenced by collisionShape(), and setCollisionShape().

VRS::SO<VRS::SceneThing> vrsode::Shape::m_debugNode [private]

Definition at line 25 of file Shape.h.

Referenced by debugNode(), setDebugNode(), and Shape().

VRS::Vector vrsode::Shape::m_offsetCenter [private]

Definition at line 26 of file Shape.h.

Referenced by offsetCenter(), and setOffsetCenter().

VRS::SO<VRS::Rotation> vrsode::Shape::m_offsetRotation [private]

Definition at line 27 of file Shape.h.

Referenced by offsetRotation(), setOffsetRotation(), and Shape().

dGeomID vrsode::Shape::m_geomId [private]

Definition at line 28 of file Shape.h.

Referenced by geomId(), setGeomId(), and Shape().

bool vrsode::Shape::m_debugNodeActive [private]

Definition at line 29 of file Shape.h.

Referenced by activateDebugNode(), debugNodeActive(), and Shape().


The documentation for this class was generated from the following files:
Generated on Fri May 11 21:02:19 2007 for Random Racer by  doxygen 1.5.1