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

oxygen::PlaneCollider Class Reference

PlaneCollider encapsulates an ODE plane geometry object. More...

#include <planecollider.h>

Inheritance diagram for oxygen::PlaneCollider:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PlaneCollider ()
void SetParams (float a, float b, float c, float d)
 sets the parameters of the plane equation a*x+b*y+c*z = d , all parameters are given in global coordinates
void SetParams (const salt::Vector3f &pos, salt::Vector3f normal)
 set the parameters of the plane given a position and a normal vector; all parameters are given in global coordinates
float GetPointDepth (const salt::Vector3f &pos)
 returns the depth of the given relative position in the managed plane.
virtual void SetPosition (const salt::Vector3f &pos)
 this is a stub method that does not nothing, as a plane is a non placeable geom.
virtual void SetRotation (const salt::Matrix &rot)
 this is a stub method that does nothing, as a plane is a non placeable geom

Protected Member Functions

virtual bool ConstructInternal ()
 constructs a default plane with normal pointing up, going through the origin

Detailed Description

PlaneCollider encapsulates an ODE plane geometry object.

Planes are non-placeable geoms, i.e. unlike placeable geoms, planes do not have an assigned position and rotation. This means that the parameters (a,b,c,d) are always in global coordinates. In other words it is assumed that the plane is always part of the static environment and not tied to any movable object.

Definition at line 37 of file planecollider.h.


Constructor & Destructor Documentation

PlaneCollider::PlaneCollider  ) 
 

Definition at line 27 of file planecollider.cpp.


Member Function Documentation

bool PlaneCollider::ConstructInternal  )  [protected, virtual]
 

constructs a default plane with normal pointing up, going through the origin

Reimplemented from zeitgeist::Object.

Definition at line 46 of file planecollider.cpp.

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

Here is the call graph for this function:

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

returns the depth of the given relative position in the managed plane.

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 80 of file planecollider.cpp.

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

Here is the call graph for this function:

void PlaneCollider::SetParams const salt::Vector3f pos,
salt::Vector3f  normal
 

set the parameters of the plane given a position and a normal vector; all parameters are given in global coordinates

Definition at line 60 of file planecollider.cpp.

References salt::TVector< DATATYPE, ELEMENTS, TYPE >::Dot(), oxygen::Collider::mODEGeom, salt::TVector< DATATYPE, ELEMENTS, TYPE >::Normalize(), salt::TVector3< DATATYPE, TYPE >::x(), salt::TVector3< DATATYPE, TYPE >::y(), and salt::TVector3< DATATYPE, TYPE >::z().

Here is the call graph for this function:

void PlaneCollider::SetParams float  a,
float  b,
float  c,
float  d
 

sets the parameters of the plane equation a*x+b*y+c*z = d , all parameters are given in global coordinates

Definition at line 31 of file planecollider.cpp.

References oxygen::Collider::mODEGeom.

void PlaneCollider::SetPosition const salt::Vector3f pos  )  [virtual]
 

this is a stub method that does not nothing, as a plane is a non placeable geom.

Reimplemented from oxygen::Collider.

Definition at line 68 of file planecollider.cpp.

void PlaneCollider::SetRotation const salt::Matrix rot  )  [virtual]
 

this is a stub method that does nothing, as a plane is a non placeable geom

Reimplemented from oxygen::Collider.

Definition at line 74 of file planecollider.cpp.


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