TDME2 1.9.121
CollisionListener.h
Go to the documentation of this file.
1#pragma once
2
3#include <tdme/tdme.h>
5
8
9/**
10 * Collision listener
11 * @author Andreas Drewke
12 * @version $Id$
13 */
15{
16 /**
17 * Destructor
18 */
19 virtual ~CollisionListener() {}
20
21 /**
22 * On collision
23 * Note:
24 * The collision response will only live while calling this method.
25 * If you need it somewhere else you need to clone it
26 * @param body1 body 1
27 * @param body2 body 2
28 * @param collisionResponse collision response
29 */
30 virtual void onCollision(Body* body1, Body* body2, CollisionResponse& collisionResponse) = 0;
31
32 /**
33 * On collision begin
34 * Note:
35 * The collision response will only live while calling this method.
36 * If you need it somewhere else you need to clone it
37 * @param body1 body 1
38 * @param body2 body 2
39 * @param collisionResponse collision response
40 */
41 virtual void onCollisionBegin(Body* body1, Body* body2, CollisionResponse& collisionResponse) = 0;
42
43 /**
44 * On collision end
45 * @param body1 body 1
46 * @param body2 body 2
47 */
48 virtual void onCollisionEnd(Body* body1, Body* body2) = 0;
49
50};
Dynamic rigid/static rigid/collision body class.
Definition: Body.h:43
virtual void onCollision(Body *body1, Body *body2, CollisionResponse &collisionResponse)=0
On collision Note: The collision response will only live while calling this method.
virtual void onCollisionEnd(Body *body1, Body *body2)=0
On collision end.
virtual void onCollisionBegin(Body *body1, Body *body2, CollisionResponse &collisionResponse)=0
On collision begin Note: The collision response will only live while calling this method.