CollisionShapeCapsule Class Reference

#include <rimCollisionShapeCapsule.h>

Inheritance diagram for CollisionShapeCapsule:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 CollisionShapeCapsule (const Vector3 &startingPoint, const Vector3 &endingPoint, Real radius)
 Construct a capsule with a starting point, ending point, and radius.
 CollisionShapeCapsule (const Vector3 &startingPoint, const Vector3 &endingPoint, Real radius, const CollisionShapeMaterial &material)
 Construct a capsule with starting and ending points, radius, and a custom material.
 CollisionShapeCapsule (const Vector3 &startingPoint, const Vector3 &endingPoint, Real startingRadius, Real endingRadius)
 Construct a capsule with starting and ending points, starting and ending radii.
 CollisionShapeCapsule (const Vector3 &startingPoint, const Vector3 &endingPoint, Real startingRadius, Real endingRadius, const CollisionShapeMaterial &material)
 Construct a capsule with starting and ending points and radii, and a custom material.
const Vector3getStartingPoint () const
void setStartingPoint (const Vector3 &newStartingPoint)
const Vector3getEndingPoint () const
void setEndingPoint (const Vector3 &newEndingPoint)
const Vector3getAxis () const
void setAxis (const Vector3 &newAxis)
Real getHeight () const
 Get the height of the capsule's shaft.
void setHeight (Real newHeight)
 Set the height of the capsule's shaft. This value is clamped to [0,infinity).
Real getStartingRadius () const
 Get the starting radius of the capsule shape.
void setStartingRadius (Real newStartingRadius)
 Set the starting radius of the capsule. This value is clamped to [0,infinity).
Real getEndingRadius () const
 Get the ending radius of the capsule shape.
void setEndingRadius (Real newEndingRadius)
 Set the ending radius of the capsule. This value is clamped to [0,infinity).
virtual Matrix3 getInertiaTensor () const
 Get the inertia tensor of the shape in object space, relative to origin.
virtual Vector3 getCenterOfMass () const
 Get the center of mass of the shape in object space, relative to origin.
virtual CollisionShapeInstancegetInstance () const
 Create a new instance of this capsule shape.
virtual const CollisionShapeTypegetType () const
 Get a reference for the type of this shape.

Static Public Member Functions

static const CollisionShapeTypegetStaticType ()
 Get the static type object for this capsule shape class.

Private Member Functions

void updateDependentQuantities ()

Private Attributes

Vector3 point1
 The position of the capsule's starting point in object space.
Vector3 point2
 The position of the capsule's ending point in object space.
Vector3 axis
 The normalized vector from the capsule's starting point to ending point.
Real height
 The distance from the capsule's starting point to its ending point.
Real radius1
 The radius of the capsule at its starting point.
Real radius2
 The radius of the capsule at its ending point.
Vector3 centerOfMass
 The center of mass of the capsule.
Matrix3 inertiaTensor
 The inertia tensor of the capsule at the capsule's center of mass.

Static Private Attributes

static const CollisionShapeType shapeType = "Capsule"
 The shape type object for all sphere collision shapes.


Constructor & Destructor Documentation

CollisionShapeCapsule::CollisionShapeCapsule ( const Vector3 startingPoint,
const Vector3 endingPoint,
Real  radius 
)

Construct a capsule with a starting point, ending point, and radius.

CollisionShapeCapsule::CollisionShapeCapsule ( const Vector3 startingPoint,
const Vector3 endingPoint,
Real  radius,
const CollisionShapeMaterial material 
)

Construct a capsule with starting and ending points, radius, and a custom material.

CollisionShapeCapsule::CollisionShapeCapsule ( const Vector3 startingPoint,
const Vector3 endingPoint,
Real  startingRadius,
Real  endingRadius 
)

Construct a capsule with starting and ending points, starting and ending radii.

CollisionShapeCapsule::CollisionShapeCapsule ( const Vector3 startingPoint,
const Vector3 endingPoint,
Real  startingRadius,
Real  endingRadius,
const CollisionShapeMaterial material 
)

Construct a capsule with starting and ending points and radii, and a custom material.


Member Function Documentation

const Vector3& CollisionShapeCapsule::getStartingPoint (  )  const [inline]

void CollisionShapeCapsule::setStartingPoint ( const Vector3 newStartingPoint  )  [inline]

const Vector3& CollisionShapeCapsule::getEndingPoint (  )  const [inline]

void CollisionShapeCapsule::setEndingPoint ( const Vector3 newEndingPoint  )  [inline]

const Vector3& CollisionShapeCapsule::getAxis (  )  const [inline]

void CollisionShapeCapsule::setAxis ( const Vector3 newAxis  )  [inline]

Real CollisionShapeCapsule::getHeight (  )  const [inline]

Get the height of the capsule's shaft.

void CollisionShapeCapsule::setHeight ( Real  newHeight  )  [inline]

Set the height of the capsule's shaft. This value is clamped to [0,infinity).

Real CollisionShapeCapsule::getStartingRadius (  )  const [inline]

Get the starting radius of the capsule shape.

void CollisionShapeCapsule::setStartingRadius ( Real  newStartingRadius  )  [inline]

Set the starting radius of the capsule. This value is clamped to [0,infinity).

Real CollisionShapeCapsule::getEndingRadius (  )  const [inline]

Get the ending radius of the capsule shape.

void CollisionShapeCapsule::setEndingRadius ( Real  newEndingRadius  )  [inline]

Set the ending radius of the capsule. This value is clamped to [0,infinity).

virtual Matrix3 CollisionShapeCapsule::getInertiaTensor (  )  const [inline, virtual]

Get the inertia tensor of the shape in object space, relative to origin.

Implements CollisionShape.

virtual Vector3 CollisionShapeCapsule::getCenterOfMass (  )  const [inline, virtual]

Get the center of mass of the shape in object space, relative to origin.

Implements CollisionShape.

CollisionShapeInstance * CollisionShapeCapsule::getInstance (  )  const [virtual]

Create a new instance of this capsule shape.

Implements CollisionShape.

virtual const CollisionShapeType& CollisionShapeCapsule::getType (  )  const [inline, virtual]

Get a reference for the type of this shape.

Implements CollisionShape.

static const CollisionShapeType& CollisionShapeCapsule::getStaticType (  )  [inline, static]

Get the static type object for this capsule shape class.

void CollisionShapeCapsule::updateDependentQuantities (  )  [private]


Member Data Documentation

Vector3 CollisionShapeCapsule::point1 [private]

The position of the capsule's starting point in object space.

Vector3 CollisionShapeCapsule::point2 [private]

The position of the capsule's ending point in object space.

Vector3 CollisionShapeCapsule::axis [private]

The normalized vector from the capsule's starting point to ending point.

Real CollisionShapeCapsule::height [private]

The distance from the capsule's starting point to its ending point.

Real CollisionShapeCapsule::radius1 [private]

The radius of the capsule at its starting point.

Real CollisionShapeCapsule::radius2 [private]

The radius of the capsule at its ending point.

Vector3 CollisionShapeCapsule::centerOfMass [private]

The center of mass of the capsule.

Matrix3 CollisionShapeCapsule::inertiaTensor [private]

The inertia tensor of the capsule at the capsule's center of mass.

RIM_PHYSICS_NAMESPACE_START const CollisionShapeType CollisionShapeCapsule::shapeType = "Capsule" [static, private]

The shape type object for all sphere collision shapes.


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