Saga3D API Documentation
1.0-RC4
|
Go to the documentation of this file.
5 #ifndef __I_SCENE_NODE_ANIMATOR_COLLISION_RESPONSE_H_INCLUDED__
6 #define __I_SCENE_NODE_ANIMATOR_COLLISION_RESPONSE_H_INCLUDED__
15 class ISceneNodeAnimatorCollisionResponse;
89 virtual void setGravity(
const glm::vec3& gravity) = 0;
98 virtual void jump(
float jumpSpeed) = 0;
124 virtual void setWorld(ITriangleSelector* newWorld) = 0;
127 virtual ITriangleSelector*
getWorld()
const = 0;
Animates a scene node. Can animate position, rotation, material, and so on.
virtual void setGravity(const glm::vec3 &gravity)=0
Sets the gravity of the environment.
virtual ISceneNode * getTargetNode(void) const =0
Gets the single node that this animator is acting on.
Type for list of scene node animators.
virtual const glm::vec3 & getCollisionPoint() const =0
Returns the last point of collision.
virtual void setTargetNode(ISceneNode *node)=0
Set the single node that this animator will act on.
virtual bool getAnimateTarget() const =0
virtual void setWorld(ITriangleSelector *newWorld)=0
Sets a triangle selector holding all triangles of the world with which the scene node may collide.
virtual bool onCollision(const ISceneNodeAnimatorCollisionResponse &animator)=0
Will be called when a collision occurs.
virtual bool collisionOccurred() const =0
Returns true if a collision occurred during the last animateNode()
virtual ~ISceneNodeAnimatorCollisionResponse()
Destructor.
Special scene node animator for doing automatic collision detection and response.
virtual void setAnimateTarget(bool enable)=0
Should the Target react on collision (default = true)
virtual void setEllipsoidRadius(const glm::vec3 &radius)=0
Sets the radius of the ellipsoid for collision detection and response.
virtual const glm::vec3 & getCollisionResultPosition(void) const =0
Returns the position that the target node will be moved to, unless the collision is consumed in a cal...
virtual const core::triangle3df & getCollisionTriangle() const =0
Returns the last triangle that caused a collision.
virtual bool isFalling() const =0
Check if the attached scene node is falling.
virtual glm::vec3 getEllipsoidRadius() const =0
Returns the radius of the ellipsoid for collision detection and response.
virtual glm::vec3 getGravity() const =0
Callback interface for catching events of collisions.
virtual void setEllipsoidTranslation(const glm::vec3 &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 glm::vec3 getEllipsoidTranslation() const =0
Get the translation of the ellipsoid for collision detection.
3d triangle template class for doing collision detection and other things.
virtual void setCollisionCallback(ICollisionCallback *callback)=0
Sets a callback interface which will be called if a collision occurs.
virtual ISceneNode * getCollisionNode(void) const =0
Returns the node that was collided with.
virtual void jump(float jumpSpeed)=0
'Jump' the animator, by adding a jump speed opposite to its gravity