SO3Engine
|
SO3MaterialPair.cpp
Go to the documentation of this file.
20 O3MaterialPair = new OgreNewt::MaterialPair(scene->GetPhysicsWorld()->GetPhysicWorld(), mat1->getOgreNewtMaterialID(), mat2->getOgreNewtMaterialID());
166void SMaterialPair::contactsProcess(OgreNewt::ContactJoint &contactJoint, Ogre::Real timeStep, int threadIndex)
201 world->AddBodyPair(b0->GetParentNode()->GetName() + "|" + b1->GetParentNode()->GetName(), bpair);
202 world->AddContactOverlapStart(b0->GetParentNode()->GetName() + "|" + b1->GetParentNode()->GetName(), mCollResult);
211 for (OgreNewt::Contact contact = contactJoint.getFirstContact(); contact && nbcontact < maxcontact; contact = contact.getNext())
const Ogre::Any & getUserData() const
retrieve pointer to previously set user data.
Definition OgreNewt_Body.h:118
with the methods from this class you can set the behavior of each contac-point
Definition OgreNewt_ContactJoint.h:78
Contact getNext() const
get the next contact from the parent contact-joint
Definition OgreNewt_ContactJoint.cpp:54
with this class you can iterate through all contacts
Definition OgreNewt_ContactJoint.h:33
void setDefaultSoftness(Ogre::Real softness) const
set default softness for the material pair.
Definition OgreNewt_MaterialPair.h:51
void setDefaultCollidable(int state) const
set default collision for the material pair.
Definition OgreNewt_MaterialPair.h:57
void setDefaultElasticity(Ogre::Real elasticity) const
set default elasticity for the material pair.
Definition OgreNewt_MaterialPair.h:54
void setContactCallback(OgreNewt::ContactCallback *callback)
assign a custom collision callback.
Definition OgreNewt_MaterialPair.cpp:22
void setDefaultSurfaceThickness(float thickness) const
set the default thickness for this material pair
Definition OgreNewt_MaterialPair.h:60
void setDefaultFriction(Ogre::Real stat, Ogre::Real kinetic) const
set default friction for the material pair.
Definition OgreNewt_MaterialPair.h:63
Definition SO3Body.h:43
OgreNewt::Body * getOgreNewtBodyPointer()
Definition SO3Body.cpp:340
Definition SO3MaterialID.h:45
OgreNewt::MaterialID * getOgreNewtMaterialID()
Definition SO3MaterialID.cpp:32
SMaterialPair(SScene *scene, SMaterialID *mat1, SMaterialID *mat2)
Definition SO3MaterialPair.cpp:18
void SetContactCallbackActivated(const bool &state)
Definition SO3MaterialPair.cpp:58
virtual int onAABBOverlap(OgreNewt::Body *body0, OgreNewt::Body *body1, int threadIndex)
user-defined AABB-overlap function
Definition SO3MaterialPair.cpp:114
bool GetOverlapStartedCallbackActivated()
Definition SO3MaterialPair.cpp:63
void SetOverlapStartedCallbackActivated(const bool &state)
Definition SO3MaterialPair.cpp:68
void SetDefaultSoftness(const Ogre::Real &value)
Definition SO3MaterialPair.cpp:99
virtual void contactsProcess(OgreNewt::ContactJoint &contactJoint, Ogre::Real timeStep, int threadIndex)
user-defined Process function
Definition SO3MaterialPair.cpp:166
OgreNewt::MaterialPair * O3MaterialPair
Definition SO3MaterialPair.h:46
void SetDefaultElasticity(const Ogre::Real &value)
Definition SO3MaterialPair.cpp:88
void SetOverlapEndedCallbackActivated(const bool &state)
Definition SO3MaterialPair.cpp:78
bool GetOverlapEndedCallbackActivated()
Definition SO3MaterialPair.cpp:73
void SetDefaultFriction(const Ogre::Real &stat, const Ogre::Real &kin)
Definition SO3MaterialPair.cpp:93
bool GetContactCallbackActivated()
Definition SO3MaterialPair.cpp:53
void SetDefaultSurfaceThickness(const Ogre::Real &value)
Definition SO3MaterialPair.cpp:83
void SetDefaultCollidable(const bool &enable)
Definition SO3MaterialPair.cpp:104
Definition SO3NodeScol.h:43
Definition SO3Physics.h:100
void AddBodyPair(std::string name, SBody **pair)
Definition SO3Physics.cpp:624
void SetContactActivated(SBody *b0, SBody *b1, MCOLL *coll)
Definition SO3Physics.cpp:755
bool GetBodyPairExist(SBody *b0, SBody *b1)
Definition SO3Physics.cpp:611
void AddContactOverlapStart(std::string name, MCOLL *coll)
Definition SO3Physics.cpp:733
Definition SO3Scene.h:125
Definition SO3DataScol.h:38
Definition SO3Physics.h:46
Generated by 1.9.8