Physics::SurfaceParams Class Reference

Surface parameters can define a surface or the way two surfaces interact when in contact. More...

#include <SurfaceParams.h>

List of all members.

Public Types

enum  ESurfaceMode {
  NONE = 0, MU2 = dContactMu2, FDIR1 = dContactFDir1, BOUNCE = dContactBounce,
  SOFT_ERP = dContactSoftERP, SOFT_CFM = dContactSoftCFM, MOTION1 = dContactMotion1, MOTION2 = dContactMotion2,
  MOTION_N = dContactMotionN, SLIP1 = dContactSlip1, SLIP2 = dContactSlip2, APPROX1_1 = dContactApprox1_1,
  APPROX1_2 = dContactApprox1_2, APPROX1 = dContactApprox1
}

Public Member Functions

 SurfaceParams ()
 SurfaceParams (int mode, dReal mu, dReal mu2=0, dReal bounce=0, dReal bounce_vel=0, dReal soft_erp=0, dReal soft_cfm=0, dReal motion1=0, dReal motion2=0, dReal motionN=0, dReal slip1=0, dReal slip2=0)
PVLE_EXPORT void mergeInto (const SurfaceParams &s1, const SurfaceParams &s2)
 Merges two surface parameters into this one.

Static Protected Member Functions

static SurfaceParamsasSurfaceParams (dSurfaceParameters &sp)
 Dev note : This method is used to cast ODE to PVLE (forced downcast). If using a simple cast (It's illegal from a pure C++ point of view), this class must NOT DEFINE ANY MEMBER (cast from dSurfaceParameters to SurfaceParams should be always ok).
static const SurfaceParamsasSurfaceParams (const dSurfaceParameters &sp)

Friends

class Contact


Detailed Description

Surface parameters can define a surface or the way two surfaces interact when in contact.

Definition at line 41 of file SurfaceParams.h.


Member Enumeration Documentation

Enumerator:
NONE 
MU2 
FDIR1 
BOUNCE 
SOFT_ERP 
SOFT_CFM 
MOTION1 
MOTION2 
MOTION_N 
SLIP1 
SLIP2 
APPROX1_1 
APPROX1_2 
APPROX1 

Definition at line 43 of file SurfaceParams.h.


Constructor & Destructor Documentation

Physics::SurfaceParams::SurfaceParams (  )  [inline]

Definition at line 60 of file SurfaceParams.h.

References Physics::PHY_INFINITY.

Physics::SurfaceParams::SurfaceParams ( int  mode,
dReal  mu,
dReal  mu2 = 0,
dReal  bounce = 0,
dReal  bounce_vel = 0,
dReal  soft_erp = 0,
dReal  soft_cfm = 0,
dReal  motion1 = 0,
dReal  motion2 = 0,
dReal  motionN = 0,
dReal  slip1 = 0,
dReal  slip2 = 0 
) [inline]

Definition at line 61 of file SurfaceParams.h.


Member Function Documentation

static const SurfaceParams& Physics::SurfaceParams::asSurfaceParams ( const dSurfaceParameters &  sp  )  [inline, static, protected]

Definition at line 75 of file SurfaceParams.h.

static SurfaceParams& Physics::SurfaceParams::asSurfaceParams ( dSurfaceParameters &  sp  )  [inline, static, protected]

Dev note : This method is used to cast ODE to PVLE (forced downcast). If using a simple cast (It's illegal from a pure C++ point of view), this class must NOT DEFINE ANY MEMBER (cast from dSurfaceParameters to SurfaceParams should be always ok).

Definition at line 74 of file SurfaceParams.h.

Referenced by Physics::Contact::getSurfaceParams().

void Physics::SurfaceParams::mergeInto ( const SurfaceParams s1,
const SurfaceParams s2 
)

Merges two surface parameters into this one.

Marging is the way surface parameters are computed for a contact. For example, some parameters are summed, other are minimized, etc.

Todo:
Needs a lot of testing and debugging : this small method is error prone (because effects are not easily detected).

Todo:
if not set, use the parameters (such as CFM / ERP) from the world (instead of using the other's value)

Definition at line 33 of file SurfaceParams.cpp.

References APPROX1_1, APPROX1_2, BOUNCE, MOTION1, MOTION2, MU2, Physics::PHY_INFINITY, SLIP1, SLIP2, SOFT_CFM, SOFT_ERP, and THROW_TRACED_EXCEPTION.

Referenced by Physics::NearCallback::operator()().


Friends And Related Function Documentation

friend class Contact [friend]

Definition at line 71 of file SurfaceParams.h.


The documentation for this class was generated from the following files:

Generated on Sun Jan 17 11:39:36 2010 for PVLE (Pro-Vocation Light Engine) by  doxygen 1.5.9