Jimcpp 2.1.0
Jimcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
ISceneNodeAnimatorCollisionResponse.hpp
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in jimcpp/jimcpp.hpp
4
5#ifndef JPP_I_SCENE_NODE_ANIMATOR_COLLISION_RESPONSE_HPP_INCLUDED
6#define JPP_I_SCENE_NODE_ANIMATOR_COLLISION_RESPONSE_HPP_INCLUDED
7
8#include <jimcpp/core/engine/ISceneNode.hpp>
9
10namespace jpp
11{
12namespace scene
13{
14
15 class ISceneNodeAnimatorCollisionResponse;
16
18
23 {
24 public:
25
27
36 virtual bool onCollision(const ISceneNodeAnimatorCollisionResponse& animator) = 0;
37 };
38
40
54 {
55 public:
56
59
61
66 virtual bool isFalling() const = 0;
67
69
77 virtual void setEllipsoidRadius(const core::vector3df& radius) = 0;
78
80
82
84
89 virtual void setGravity(const core::vector3df& gravity) = 0;
90
93 virtual core::vector3df getGravity() const = 0;
94
96
98 virtual void jump(f32 jumpSpeed) = 0;
99
101 virtual void setAnimateTarget ( bool enable ) = 0;
102 virtual bool getAnimateTarget () const = 0;
103
105
111 virtual void setEllipsoidTranslation(const core::vector3df &translation) = 0;
112
114
120
122
124 virtual void setWorld(ITriangleSelector* newWorld) = 0;
125
127 virtual ITriangleSelector* getWorld() const = 0;
128
130
133 virtual void setTargetNode(ISceneNode * node) = 0;
134
136
137 virtual ISceneNode* getTargetNode(void) const = 0;
138
140 virtual bool collisionOccurred() const = 0;
141
143 virtual const core::vector3df & getCollisionPoint() const = 0;
144
146 virtual const core::triangle3df & getCollisionTriangle() const = 0;
147
149
153 virtual const core::vector3df & getCollisionResultPosition(void) const = 0;
154
156 virtual ISceneNode* getCollisionNode(void) const = 0;
157
159
162 virtual void setCollisionCallback(ICollisionCallback* callback) = 0;
163
164 };
165
166
167} // end namespace scene
168} // end namespace jpp
169
170#endif
Base class of most objects of the Jimcpp Engine.
Definition IReferenceCounted.hpp:46
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.hpp:22
Callback interface for catching events of collisions.
Definition ISceneNodeAnimatorCollisionResponse.hpp:23
virtual bool onCollision(const ISceneNodeAnimatorCollisionResponse &animator)=0
Will be called when a collision occurs.
Special scene node animator for doing automatic collision detection and response.
Definition ISceneNodeAnimatorCollisionResponse.hpp:54
virtual void setCollisionCallback(ICollisionCallback *callback)=0
Sets a callback interface which will be called if a collision occurs.
virtual ISceneNode * getTargetNode(void) const =0
Gets the single node that this animator is acting on.
virtual const core::triangle3df & getCollisionTriangle() const =0
Returns the last triangle that caused a collision.
virtual void setAnimateTarget(bool enable)=0
Should the Target react on collision ( default = true )
virtual core::vector3df getEllipsoidTranslation() const =0
Get the translation of the ellipsoid for collision detection.
virtual const core::vector3df & getCollisionPoint() const =0
Returns the last point of collision.
virtual const core::vector3df & getCollisionResultPosition(void) const =0
Returns the position that the target node will be moved to, unless the collision is consumed in a cal...
virtual void jump(f32 jumpSpeed)=0
'Jump' the animator, by adding a jump speed opposite to its gravity
virtual void setTargetNode(ISceneNode *node)=0
Set the single node that this animator will act on.
virtual core::vector3df getGravity() const =0
virtual void setEllipsoidTranslation(const core::vector3df &translation)=0
Set translation of the collision ellipsoid.
virtual ITriangleSelector * getWorld() const =0
Get the current triangle selector containing all triangles for collision detection.
virtual core::vector3df getEllipsoidRadius() const =0
Returns the radius of the ellipsoid for collision detection and response.
virtual bool isFalling() const =0
Check if the attached scene node is falling.
virtual void setEllipsoidRadius(const core::vector3df &radius)=0
Sets the radius of the ellipsoid for collision detection and response.
virtual bool collisionOccurred() const =0
Returns true if a collision occurred during the last animateNode()
virtual ~ISceneNodeAnimatorCollisionResponse()
Destructor.
Definition ISceneNodeAnimatorCollisionResponse.hpp:58
virtual void setWorld(ITriangleSelector *newWorld)=0
Sets a triangle selector holding all triangles of the world with which the scene node may collide.
virtual ISceneNode * getCollisionNode(void) const =0
Returns the node that was collided with.
virtual void setGravity(const core::vector3df &gravity)=0
Sets the gravity of the environment.
Animates a scene node. Can animate position, rotation, material, and so on.
Definition ISceneNodeAnimator.hpp:32
Scene node interface.
Definition ISceneNode.hpp:43
Interface to return triangles with specific properties.
Definition ITriangleSelector.hpp:74
As of Jimcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
float f32
32 bit floating point variable.
Definition irrTypes.hpp:110

Jimcpp    @cppfx.xyz

K