Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

oxygen::CCylinderCollider Class Reference

CCylinderCollider encapsulates an ODE capped cylinder geometry object. More...

#include <ccylindercollider.h>

Inheritance diagram for oxygen::CCylinderCollider:

Inheritance graph
[legend]
Collaboration diagram for oxygen::CCylinderCollider:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CCylinderCollider ()
void SetParams (float radius, float length)
 sets the parameters of the capped cylinder.
void SetRadius (float radius)
 sets the radius of the capped cylinder
void SetLength (float length)
 sets the length of the capped cylinder
void GetParams (float &radius, float &length)
 gets the radius and the length of the capped cylinder
float GetRadius ()
 returns the radius of the capped cylinder
float GetLength ()
 return the length of the capped cylinder
float GetPointDepth (const salt::Vector3f &pos)
 returns the depth of the given relative position in the managed capped cylinder geom.

Protected Member Functions

virtual bool ConstructInternal ()
 constructs a default capped cylinder with an radius of 1 and a length of 1

Detailed Description

CCylinderCollider encapsulates an ODE capped cylinder geometry object.

A capped cylinder is like a normal cylinder except it has half-sphere caps at its ends. This feature makes the internal collision detection code particularly fast and accurate.

Definition at line 35 of file ccylindercollider.h.


Constructor & Destructor Documentation

CCylinderCollider::CCylinderCollider  ) 
 

Definition at line 27 of file ccylindercollider.cpp.


Member Function Documentation

bool CCylinderCollider::ConstructInternal  )  [protected, virtual]
 

constructs a default capped cylinder with an radius of 1 and a length of 1

Reimplemented from zeitgeist::Object.

Definition at line 74 of file ccylindercollider.cpp.

References zeitgeist::Object::ConstructInternal(), and oxygen::Collider::mODEGeom.

Here is the call graph for this function:

float CCylinderCollider::GetLength  ) 
 

return the length of the capped cylinder

Definition at line 65 of file ccylindercollider.cpp.

References GetParams().

Referenced by SetRadius().

Here is the call graph for this function:

void CCylinderCollider::GetParams float &  radius,
float &  length
 

gets the radius and the length of the capped cylinder

Definition at line 47 of file ccylindercollider.cpp.

References oxygen::Collider::mODEGeom.

Referenced by GetLength(), and GetRadius().

float CCylinderCollider::GetPointDepth const salt::Vector3f pos  ) 
 

returns the depth of the given relative position in the managed capped cylinder geom.

Points inside the geom will have positive depth, points outside it will have negative depth, and points on the surface will have zero depth.

Definition at line 88 of file ccylindercollider.cpp.

References oxygen::BaseNode::GetWorldTransform(), and oxygen::Collider::mODEGeom.

Here is the call graph for this function:

float CCylinderCollider::GetRadius  ) 
 

returns the radius of the capped cylinder

Definition at line 56 of file ccylindercollider.cpp.

References GetParams().

Referenced by SetLength().

Here is the call graph for this function:

void CCylinderCollider::SetLength float  length  ) 
 

sets the length of the capped cylinder

Definition at line 41 of file ccylindercollider.cpp.

References GetRadius(), and SetParams().

Here is the call graph for this function:

void CCylinderCollider::SetParams float  radius,
float  length
 

sets the parameters of the capped cylinder.

Parameters:
radius is the radius of the caps, and of the cylinder itself
length is the height of the cylinder, not counting the caps

Definition at line 31 of file ccylindercollider.cpp.

References oxygen::Collider::mODEGeom.

Referenced by SetLength(), and SetRadius().

void CCylinderCollider::SetRadius float  radius  ) 
 

sets the radius of the capped cylinder

Definition at line 36 of file ccylindercollider.cpp.

References GetLength(), and SetParams().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Thu Apr 6 15:45:19 2006 for rcssserver3d by  doxygen 1.4.4