Project

General

Profile

SO3Engine
OgreNewt_ContactCallback.h
Go to the documentation of this file.
1/*
2 OgreNewt Library
3
4 Ogre implementation of Newton Game Dynamics SDK
5
6 OgreNewt basically has no license, you may use any or all of the library however you desire... I hope it can help you in any way.
7
8 by Walaber
9 some changes by melven
10
11*/
12#ifndef _INCLUDE_OGRENEWT_CONTACTCALLBACK
13#define _INCLUDE_OGRENEWT_CONTACTCALLBACK
14
15
18
19// OgreNewt namespace. all functions and classes use this namespace.
20namespace OgreNewt
21{
22
23
25
30class _OgreNewtExport ContactCallback
31{
32public:
33
36
38 virtual ~ContactCallback();
39
41
47 virtual int onAABBOverlap( OgreNewt::Body* body0, OgreNewt::Body* body1, int threadIndex ) { return 1; }
48
50
54 virtual void contactsProcess( OgreNewt::ContactJoint &contactJoint, Ogre::Real timeStep, int threadIndex ) { }
55};
56
57
58} // end NAMESPACE OgreNewt
59
60#endif
61// _INCLUDE_OGRENEWT_CONTACTCALLBACK
62
main class for all Rigid Bodies in the system.
virtual void contactsProcess(OgreNewt::ContactJoint &contactJoint, Ogre::Real timeStep, int threadIndex)
user-defined Process function
virtual int onAABBOverlap(OgreNewt::Body *body0, OgreNewt::Body *body1, int threadIndex)
user-defined AABB-overlap function
with this class you can iterate through all contacts