CollisionShapeCylinder Class Reference

#include <rimCollisionShapeCylinder.h>

Inheritance diagram for CollisionShapeCylinder:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 CollisionShapeCylinder (const Vector3 &startingPoint, const Vector3 &endingPoint, Real radius)
 Construct a cylinder with a starting point, ending point, and radius.
 CollisionShapeCylinder (const Vector3 &startingPoint, const Vector3 &endingPoint, Real radius, const CollisionShapeMaterial &material)
 Construct a cylinder with starting and ending points, radius, and a custom material.
 CollisionShapeCylinder (const Vector3 &startingPoint, const Vector3 &endingPoint, Real startingRadius, Real endingRadius)
 Construct a cylinder with starting and ending points, starting and ending radii.
 CollisionShapeCylinder (const Vector3 &startingPoint, const Vector3 &endingPoint, Real startingRadius, Real endingRadius, const CollisionShapeMaterial &material)
 Construct a cylinder 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 cylinder's shaft.
void setHeight (Real newHeight)
 Set the height of the cylinder's shaft. This value is clamped to [0,infinity).
Real getStartingRadius () const
 Get the starting radius of the cylinder shape.
void setStartingRadius (Real newStartingRadius)
 Set the starting radius of the cylinder. This value is clamped to [0,infinity).
Real getEndingRadius () const
 Get the ending radius of the cylinder shape.
void setEndingRadius (Real newEndingRadius)
 Set the ending radius of the cylinder. 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 cylinder 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 cylinder shape class.

Private Member Functions

void updateDependentQuantities ()

Private Attributes

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

Static Private Attributes

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


Constructor & Destructor Documentation

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

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

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

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

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

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

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

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


Member Function Documentation

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

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

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

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

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

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

Real CollisionShapeCylinder::getHeight (  )  const [inline]

Get the height of the cylinder's shaft.

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

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

Real CollisionShapeCylinder::getStartingRadius (  )  const [inline]

Get the starting radius of the cylinder shape.

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

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

Real CollisionShapeCylinder::getEndingRadius (  )  const [inline]

Get the ending radius of the cylinder shape.

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

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

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

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

Implements CollisionShape.

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

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

Implements CollisionShape.

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

Create a new instance of this cylinder shape.

Implements CollisionShape.

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

Get a reference for the type of this shape.

Implements CollisionShape.

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

Get the static type object for this cylinder shape class.

void CollisionShapeCylinder::updateDependentQuantities (  )  [private]


Member Data Documentation

Vector3 CollisionShapeCylinder::point1 [private]

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

Vector3 CollisionShapeCylinder::point2 [private]

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

Vector3 CollisionShapeCylinder::axis [private]

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

Real CollisionShapeCylinder::height [private]

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

Real CollisionShapeCylinder::radius1 [private]

The radius of the cylinder at its starting point.

Real CollisionShapeCylinder::radius2 [private]

The radius of the cylinder at its ending point.

Vector3 CollisionShapeCylinder::centerOfMass [private]

The center of mass of the cylinder.

Matrix3 CollisionShapeCylinder::inertiaTensor [private]

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

RIM_PHYSICS_NAMESPACE_START const CollisionShapeType CollisionShapeCylinder::shapeType = "Cylinder" [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