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

oxygen::ContactJointHandler Class Reference

CollisionHandler that creates an ODE contact joint between the two bodies associated with the two affected collision geoms. More...

#include <contactjointhandler.h>

Inheritance diagram for oxygen::ContactJointHandler:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ContactJointHandler ()
virtual ~ContactJointHandler ()
virtual void HandleCollision (boost::shared_ptr< Collider > collidee, dContact &contact)
 Check if the collidee also has a ContactJoint handler registered to it.
virtual bool IsSymmetricHandler ()
 the ContactJointHandler is not a symmetric handler.
void SetSurfaceParameter (const dSurfaceParameters &surface)
 sets the surface parameters for the contact joints that the CollisionHandler creates
void SetContactMode (int mode, bool set)
 sets or resets a contact mode flag in the surface parameter
void SetContactBounceMode (bool set)
 sets or resets the dContactBounce mode flag
void SetBounceValue (float bounce)
 sets the bounce value
void SetMinBounceVel (float vel)
 sets the mininum incoming velocity necessary for bounce
void SetContactSoftERPMode (bool set)
 sets or resets the error reduction parameter (ERP) mode, useful to make surfaces soft
void SetContactSoftERP (float erp)
 sets the contact normal error reduction parameter (ERP)
void SetContactSoftCFMMode (bool set)
 sets or resets the constraint force mixing mode (CFM), useful to make surfaces soft
void SetContactSoftCFM (float cfm)
 sets the constraint force mixing parameter (CFM)
void SetContactSlipMode (bool set)
 sets or resets the force dependent contact slip mode (FDS)
void SetContactSlip (float slip)
 sets the force dependent slip (FDS)
void SetContactMu (float mu)
 sets the Coulomb friction coefficient

Protected Member Functions

f_inline float MixValues (const float v1, const float v2, const int n) const
void CalcSurfaceParam (dSurfaceParameters &surface, const dSurfaceParameters &collideeParam)

Protected Attributes

dSurfaceParameters mSurfaceParameter
 the ODE surface parameters of the created contact joint

Detailed Description

CollisionHandler that creates an ODE contact joint between the two bodies associated with the two affected collision geoms.

Definition at line 34 of file contactjointhandler.h.


Constructor & Destructor Documentation

ContactJointHandler::ContactJointHandler  ) 
 

Definition at line 32 of file contactjointhandler.cpp.

References mSurfaceParameter.

ContactJointHandler::~ContactJointHandler  )  [virtual]
 

Definition at line 41 of file contactjointhandler.cpp.


Member Function Documentation

void ContactJointHandler::CalcSurfaceParam dSurfaceParameters &  surface,
const dSurfaceParameters &  collideeParam
[protected]
 

Definition at line 70 of file contactjointhandler.cpp.

References MixValues(), and mSurfaceParameter.

Here is the call graph for this function:

virtual void oxygen::ContactJointHandler::HandleCollision boost::shared_ptr< Collider collidee,
dContact &  contact
[virtual]
 

Check if the collidee also has a ContactJoint handler registered to it.

If yes, create a contact joint between the bodies corresponding to our Collider and the collidee's geom using the surface parameters stored in the mSurfaceParameter member.

Parameters:
collidee is the geom ID of the colliders collision partner
holds the contact points between the two affected geoms as returned from the ODE dCollide function

Implements oxygen::CollisionHandler.

virtual bool oxygen::ContactJointHandler::IsSymmetricHandler  )  [inline, virtual]
 

the ContactJointHandler is not a symmetric handler.

See CollisionHandler::IsSymmetricHandler for an explanation

Reimplemented from oxygen::CollisionHandler.

Definition at line 58 of file contactjointhandler.h.

float ContactJointHandler::MixValues const float  v1,
const float  v2,
const int  n
const [protected]
 

Definition at line 46 of file contactjointhandler.cpp.

Referenced by CalcSurfaceParam().

void ContactJointHandler::SetBounceValue float  bounce  ) 
 

sets the bounce value

Definition at line 196 of file contactjointhandler.cpp.

References mSurfaceParameter.

void ContactJointHandler::SetContactBounceMode bool  set  ) 
 

sets or resets the dContactBounce mode flag

Definition at line 184 of file contactjointhandler.cpp.

References SetContactMode().

Here is the call graph for this function:

void ContactJointHandler::SetContactMode int  mode,
bool  set
 

sets or resets a contact mode flag in the surface parameter

Definition at line 172 of file contactjointhandler.cpp.

References mSurfaceParameter.

Referenced by SetContactBounceMode(), SetContactSlipMode(), SetContactSoftCFMMode(), and SetContactSoftERPMode().

void ContactJointHandler::SetContactMu float  mu  ) 
 

sets the Coulomb friction coefficient

Definition at line 238 of file contactjointhandler.cpp.

References mSurfaceParameter.

void ContactJointHandler::SetContactSlip float  slip  ) 
 

sets the force dependent slip (FDS)

Definition at line 232 of file contactjointhandler.cpp.

References mSurfaceParameter.

void ContactJointHandler::SetContactSlipMode bool  set  ) 
 

sets or resets the force dependent contact slip mode (FDS)

Definition at line 226 of file contactjointhandler.cpp.

References SetContactMode().

Here is the call graph for this function:

void ContactJointHandler::SetContactSoftCFM float  cfm  ) 
 

sets the constraint force mixing parameter (CFM)

Definition at line 221 of file contactjointhandler.cpp.

References mSurfaceParameter.

void ContactJointHandler::SetContactSoftCFMMode bool  set  ) 
 

sets or resets the constraint force mixing mode (CFM), useful to make surfaces soft

Definition at line 215 of file contactjointhandler.cpp.

References SetContactMode().

Here is the call graph for this function:

void ContactJointHandler::SetContactSoftERP float  erp  ) 
 

sets the contact normal error reduction parameter (ERP)

Definition at line 208 of file contactjointhandler.cpp.

References salt::gClamp(), and mSurfaceParameter.

Here is the call graph for this function:

void ContactJointHandler::SetContactSoftERPMode bool  set  ) 
 

sets or resets the error reduction parameter (ERP) mode, useful to make surfaces soft

Definition at line 202 of file contactjointhandler.cpp.

References SetContactMode().

Here is the call graph for this function:

void ContactJointHandler::SetMinBounceVel float  vel  ) 
 

sets the mininum incoming velocity necessary for bounce

Definition at line 190 of file contactjointhandler.cpp.

References mSurfaceParameter.

void ContactJointHandler::SetSurfaceParameter const dSurfaceParameters &  surface  ) 
 

sets the surface parameters for the contact joints that the CollisionHandler creates

Definition at line 166 of file contactjointhandler.cpp.

References mSurfaceParameter.


Member Data Documentation

dSurfaceParameters oxygen::ContactJointHandler::mSurfaceParameter [protected]
 

the ODE surface parameters of the created contact joint

Definition at line 113 of file contactjointhandler.h.

Referenced by CalcSurfaceParam(), ContactJointHandler(), SetBounceValue(), SetContactMode(), SetContactMu(), SetContactSlip(), SetContactSoftCFM(), SetContactSoftERP(), SetMinBounceVel(), and SetSurfaceParameter().


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