Project

General

Profile

SO3Engine
OgreNewt::ContactCallback Class Reference

custom contact behavior More...

#include <OgreNewt_ContactCallback.h>

Inheritance diagram for OgreNewt::ContactCallback:
SO3::SMaterialPair

Public Member Functions

 ContactCallback ()
 constructor
 
virtual ~ContactCallback ()
 destructor
 
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
 

Detailed Description

custom contact behavior

this class is for creating custom behavior between material GroupIDs. this class must be inherited, and the user functions created, and then added to a MaterialPair class.

Definition at line 30 of file OgreNewt_ContactCallback.h.

Constructor & Destructor Documentation

◆ ContactCallback()

OgreNewt::ContactCallback::ContactCallback ( )

constructor

Definition at line 9 of file OgreNewt_ContactCallback.cpp.

◆ ~ContactCallback()

OgreNewt::ContactCallback::~ContactCallback ( )
virtual

destructor

Definition at line 13 of file OgreNewt_ContactCallback.cpp.

Member Function Documentation

◆ contactsProcess()

virtual void OgreNewt::ContactCallback::contactsProcess ( OgreNewt::ContactJoint contactJoint,
Ogre::Real  timeStep,
int  threadIndex 
)
inlinevirtual

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 in SO3::SMaterialPair.

Definition at line 54 of file OgreNewt_ContactCallback.h.

◆ onAABBOverlap()

virtual int OgreNewt::ContactCallback::onAABBOverlap ( OgreNewt::Body body0,
OgreNewt::Body body1,
int  threadIndex 
)
inlinevirtual

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 in SO3::SMaterialPair.

Definition at line 47 of file OgreNewt_ContactCallback.h.


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