TDME2
1.9.121
src
tdme
engine
physics
CollisionListener.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
tdme/tdme.h
>
4
#include <
tdme/engine/physics/fwd-tdme.h
>
5
6
using
tdme::engine::physics::Body
;
7
using
tdme::engine::physics::CollisionResponse
;
8
9
/**
10
* Collision listener
11
* @author Andreas Drewke
12
* @version $Id$
13
*/
14
struct
tdme::engine::physics::CollisionListener
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
};
tdme::engine::physics::Body
Dynamic rigid/static rigid/collision body class.
Definition:
Body.h:43
tdme::engine::physics::CollisionResponse
Collision response.
Definition:
CollisionResponse.h:28
fwd-tdme.h
tdme::engine::physics::CollisionListener
Collision listener.
Definition:
CollisionListener.h:15
tdme::engine::physics::CollisionListener::onCollision
virtual void onCollision(Body *body1, Body *body2, CollisionResponse &collisionResponse)=0
On collision Note: The collision response will only live while calling this method.
tdme::engine::physics::CollisionListener::onCollisionEnd
virtual void onCollisionEnd(Body *body1, Body *body2)=0
On collision end.
tdme::engine::physics::CollisionListener::~CollisionListener
virtual ~CollisionListener()
Destructor.
Definition:
CollisionListener.h:19
tdme::engine::physics::CollisionListener::onCollisionBegin
virtual void onCollisionBegin(Body *body1, Body *body2, CollisionResponse &collisionResponse)=0
On collision begin Note: The collision response will only live while calling this method.
tdme.h
Generated by
1.9.3