CollisionShapeSphere Class Reference

#include <rimCollisionShapeSphere.h>

Inheritance diagram for CollisionShapeSphere:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 CollisionShapeSphere (const Vector3 &position, Real radius)
 Construct a sphere with the specified position, radius, and default material object.
 CollisionShapeSphere (const Vector3 &position, Real radius, const CollisionShapeMaterial &material)
 Construct a sphere with a position, radius, and custom material object.
const Vector3getPosition () const
 Get the position of the sphere shape in object space coordinates.
void setPosition (const Vector3 &newPosition)
 Set the position of the sphere shape in object space coordinates.
Real getRadius () const
 Get the radius of the sphere shape.
void setRadius (Real newRadius)
 Set the radius of the sphere shape. This value is clamped to [0,infinity).
virtual Matrix3 getInertiaTensor () const
 Get the inertia tensor of the shape in object space, relative to it's center of mass.
virtual Vector3 getCenterOfMass () const
 Get the center of mass of the shape in object space.
virtual CollisionShapeInstancegetInstance () const
 Create a new instance of this sphere 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 sphere shape class.

Private Attributes

Vector3 position
 The position of the sphere in object space.
Real radius
 The radius of the sphere.

Static Private Attributes

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


Constructor & Destructor Documentation

CollisionShapeSphere::CollisionShapeSphere ( const Vector3 position,
Real  radius 
)

Construct a sphere with the specified position, radius, and default material object.

CollisionShapeSphere::CollisionShapeSphere ( const Vector3 position,
Real  radius,
const CollisionShapeMaterial material 
)

Construct a sphere with a position, radius, and custom material object.


Member Function Documentation

const Vector3& CollisionShapeSphere::getPosition (  )  const [inline]

Get the position of the sphere shape in object space coordinates.

void CollisionShapeSphere::setPosition ( const Vector3 newPosition  )  [inline]

Set the position of the sphere shape in object space coordinates.

Real CollisionShapeSphere::getRadius (  )  const [inline]

Get the radius of the sphere shape.

void CollisionShapeSphere::setRadius ( Real  newRadius  )  [inline]

Set the radius of the sphere shape. This value is clamped to [0,infinity).

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

Get the inertia tensor of the shape in object space, relative to it's center of mass.

Implements CollisionShape.

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

Get the center of mass of the shape in object space.

Implements CollisionShape.

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

Create a new instance of this sphere shape.

Implements CollisionShape.

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

Get a reference for the type of this shape.

Implements CollisionShape.

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

Get the static type object for this sphere shape class.


Member Data Documentation

Vector3 CollisionShapeSphere::position [private]

The position of the sphere in object space.

Real CollisionShapeSphere::radius [private]

The radius of the sphere.

RIM_PHYSICS_NAMESPACE_START const CollisionShapeType CollisionShapeSphere::shapeType = "Sphere" [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:19 2008 for Rim Physics by  doxygen 1.5.4