CollisionShape Class Reference

#include <rimCollisionShape.h>

Inheritance diagram for CollisionShape:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~CollisionShape ()
const Vector3getBoundingSpherePosition () const
 Get the position of the bounding sphere of this shape in its parent coordinate system.
Real getBoundingSphereRadius () const
 Get the radius of this shape's bounding sphere.
const AABB3getAABB () const
 Get the axis-aligned bounding box of this shape in its parent coordinate system.
const CollisionShapeMaterialgetMaterial () const
CollisionShapeMaterialgetMaterial ()
void setMaterial (const CollisionShapeMaterial &newMaterial)
Real getVolume () const
 Get the volume of the collision shape, calculated from its shape.
Real getMass () const
 Get the mass of the collision shape calculated from its volume and density.
virtual Matrix3 getInertiaTensor () const =0
 Get the inertia tensor of the shape in it's parent coordinate system (object space).
virtual Vector3 getCenterOfMass () const =0
 Get the center of mass of the shape in it's parent coordinate system (object space).
virtual CollisionShapeInstancegetInstance () const =0
 Create a new instance of this base collision shape polymorphically.
virtual const CollisionShapeTypegetType () const =0
 Get the polymorphic type of the collision shape.
Hash getTypeID () const
 Get the type ID of this collision shape. This is its type's unique identifier.

Protected Member Functions

 CollisionShape (const CollisionShapeType &type)
 CollisionShape (const CollisionShapeType &type, const CollisionShapeMaterial &newMaterial)
void setVolume (Real newVolume)
void setBoundingSphereRadius (Real newBoundingSphereRadius)
void setBoundingSpherePosition (const Vector3 &newBoundingSpherePosition)
void setAABB (const AABB3 &newAABB)

Private Attributes

Real volume
 The volume.
CollisionShapeMaterial material
Vector3 boundingSpherePosition
Real boundingSphereRadius
AABB3 axisAlignedBoundingBox
Hash typeID


Constructor & Destructor Documentation

virtual CollisionShape::~CollisionShape (  )  [inline, virtual]

CollisionShape::CollisionShape ( const CollisionShapeType type  )  [inline, protected]

CollisionShape::CollisionShape ( const CollisionShapeType type,
const CollisionShapeMaterial newMaterial 
) [inline, protected]


Member Function Documentation

const Vector3& CollisionShape::getBoundingSpherePosition (  )  const [inline]

Get the position of the bounding sphere of this shape in its parent coordinate system.

Real CollisionShape::getBoundingSphereRadius (  )  const [inline]

Get the radius of this shape's bounding sphere.

const AABB3& CollisionShape::getAABB (  )  const [inline]

Get the axis-aligned bounding box of this shape in its parent coordinate system.

const CollisionShapeMaterial& CollisionShape::getMaterial (  )  const [inline]

CollisionShapeMaterial& CollisionShape::getMaterial (  )  [inline]

void CollisionShape::setMaterial ( const CollisionShapeMaterial newMaterial  )  [inline]

Real CollisionShape::getVolume (  )  const [inline]

Get the volume of the collision shape, calculated from its shape.

Real CollisionShape::getMass (  )  const [inline]

Get the mass of the collision shape calculated from its volume and density.

virtual Matrix3 CollisionShape::getInertiaTensor (  )  const [pure virtual]

Get the inertia tensor of the shape in it's parent coordinate system (object space).

Implemented in CollisionShapeBox, CollisionShapeCapsule, CollisionShapeContainer, CollisionShapeCylinder, and CollisionShapeSphere.

virtual Vector3 CollisionShape::getCenterOfMass (  )  const [pure virtual]

Get the center of mass of the shape in it's parent coordinate system (object space).

Implemented in CollisionShapeBox, CollisionShapeCapsule, CollisionShapeContainer, CollisionShapeCylinder, and CollisionShapeSphere.

virtual CollisionShapeInstance* CollisionShape::getInstance (  )  const [pure virtual]

Create a new instance of this base collision shape polymorphically.

Implemented in CollisionShapeBox, CollisionShapeCapsule, CollisionShapeContainer, CollisionShapeCylinder, and CollisionShapeSphere.

virtual const CollisionShapeType& CollisionShape::getType (  )  const [pure virtual]

Get the polymorphic type of the collision shape.

Implemented in CollisionShapeBox, CollisionShapeCapsule, CollisionShapeContainer, CollisionShapeCylinder, and CollisionShapeSphere.

Hash CollisionShape::getTypeID (  )  const [inline]

Get the type ID of this collision shape. This is its type's unique identifier.

void CollisionShape::setVolume ( Real  newVolume  )  [inline, protected]

void CollisionShape::setBoundingSphereRadius ( Real  newBoundingSphereRadius  )  [inline, protected]

void CollisionShape::setBoundingSpherePosition ( const Vector3 newBoundingSpherePosition  )  [inline, protected]

void CollisionShape::setAABB ( const AABB3 newAABB  )  [inline, protected]


Member Data Documentation

Real CollisionShape::volume [private]

The volume.

CollisionShapeMaterial CollisionShape::material [private]

Vector3 CollisionShape::boundingSpherePosition [private]

Real CollisionShape::boundingSphereRadius [private]

AABB3 CollisionShape::axisAlignedBoundingBox [private]

Hash CollisionShape::typeID [private]


The documentation for this class was generated from the following file:
Generated on Tue Aug 26 00:03:18 2008 for Rim Physics by  doxygen 1.5.4