SO3Engine
|
#include <SO3MaterialPair.h>
Public Member Functions | |
SMaterialPair (SScene *scene, SMaterialID *mat1, SMaterialID *mat2) | |
~SMaterialPair () | |
int | getID1 () |
int | getID2 () |
bool | GetContactCallbackActivated () |
void | SetContactCallbackActivated (const bool &state) |
bool | GetOverlapStartedCallbackActivated () |
void | SetOverlapStartedCallbackActivated (const bool &state) |
bool | GetOverlapEndedCallbackActivated () |
void | SetOverlapEndedCallbackActivated (const bool &state) |
void | SetDefaultSurfaceThickness (const Ogre::Real &value) |
void | SetDefaultElasticity (const Ogre::Real &value) |
void | SetDefaultFriction (const Ogre::Real &stat, const Ogre::Real &kin) |
void | SetDefaultSoftness (const Ogre::Real &value) |
void | SetDefaultCollidable (const bool &enable) |
SScene * | GetParentScene () |
virtual int | onAABBOverlap (OgreNewt::Body *body0, OgreNewt::Body *body1, int threadIndex) |
user-defined AABB-overlap function | |
virtual void | contactsProcess (OgreNewt::ContactJoint &contactJoint, Ogre::Real timeStep, int threadIndex) |
user-defined Process function | |
Protected Attributes | |
OgreNewt::MaterialPair * | O3MaterialPair |
SMaterialID * | mMat1 |
SMaterialID * | mMat2 |
SScene * | mScene |
Definition at line 42 of file SO3MaterialPair.h.
SO3::SMaterialPair::SMaterialPair | ( | SScene * | scene, |
SMaterialID * | mat1, | ||
SMaterialID * | mat2 | ||
) |
Definition at line 18 of file SO3MaterialPair.cpp.
SO3::SMaterialPair::~SMaterialPair | ( | ) |
Definition at line 38 of file SO3MaterialPair.cpp.
|
virtual |
user-defined Process function
user process function. it is called for each colliding pair of bodies. you can use the ContactJoint to iterate through all contact-points and change the "material" of each contact-point!
Reimplemented from OgreNewt::ContactCallback.
Definition at line 166 of file SO3MaterialPair.cpp.
bool SO3::SMaterialPair::GetContactCallbackActivated | ( | ) |
Definition at line 53 of file SO3MaterialPair.cpp.
int SO3::SMaterialPair::getID1 | ( | ) |
Definition at line 43 of file SO3MaterialPair.cpp.
int SO3::SMaterialPair::getID2 | ( | ) |
Definition at line 48 of file SO3MaterialPair.cpp.
bool SO3::SMaterialPair::GetOverlapEndedCallbackActivated | ( | ) |
Definition at line 73 of file SO3MaterialPair.cpp.
bool SO3::SMaterialPair::GetOverlapStartedCallbackActivated | ( | ) |
Definition at line 63 of file SO3MaterialPair.cpp.
SScene * SO3::SMaterialPair::GetParentScene | ( | ) |
Definition at line 109 of file SO3MaterialPair.cpp.
|
virtual |
user-defined AABB-overlap function
this function is called when 2 bodies AABB overlap. they have not yet collided, but may do so this loop. at this point, m_body0 and m_body1 are defined, but the contact isn't yet valid, so none of the member functions can be called yet. they must be called from the contacsProcess() function. return 0 to ignore the collision, 1 to allow it.
Reimplemented from OgreNewt::ContactCallback.
Definition at line 114 of file SO3MaterialPair.cpp.
void SO3::SMaterialPair::SetContactCallbackActivated | ( | const bool & | state | ) |
Definition at line 58 of file SO3MaterialPair.cpp.
void SO3::SMaterialPair::SetDefaultCollidable | ( | const bool & | enable | ) |
Definition at line 104 of file SO3MaterialPair.cpp.
void SO3::SMaterialPair::SetDefaultElasticity | ( | const Ogre::Real & | value | ) |
Definition at line 88 of file SO3MaterialPair.cpp.
void SO3::SMaterialPair::SetDefaultFriction | ( | const Ogre::Real & | stat, |
const Ogre::Real & | kin | ||
) |
Definition at line 93 of file SO3MaterialPair.cpp.
void SO3::SMaterialPair::SetDefaultSoftness | ( | const Ogre::Real & | value | ) |
Definition at line 99 of file SO3MaterialPair.cpp.
void SO3::SMaterialPair::SetDefaultSurfaceThickness | ( | const Ogre::Real & | value | ) |
Definition at line 83 of file SO3MaterialPair.cpp.
void SO3::SMaterialPair::SetOverlapEndedCallbackActivated | ( | const bool & | state | ) |
Definition at line 78 of file SO3MaterialPair.cpp.
void SO3::SMaterialPair::SetOverlapStartedCallbackActivated | ( | const bool & | state | ) |
Definition at line 68 of file SO3MaterialPair.cpp.
|
protected |
Definition at line 47 of file SO3MaterialPair.h.
|
protected |
Definition at line 48 of file SO3MaterialPair.h.
|
protected |
Definition at line 49 of file SO3MaterialPair.h.
|
protected |
Definition at line 46 of file SO3MaterialPair.h.