Loading...
Searching...
No Matches
ISceneNodeAnimatorCollisionResponse.h
Go to the documentation of this file.
// Copyright (C) 2002-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __I_SCENE_NODE_ANIMATOR_COLLISION_RESPONSE_H_INCLUDED__
#define __I_SCENE_NODE_ANIMATOR_COLLISION_RESPONSE_H_INCLUDED__
#include "ISceneNode.h"
namespace irr
{
namespace scene
{
class ISceneNodeAnimatorCollisionResponse;
class ICollisionCallback : public virtual IReferenceCounted
{
public:
virtual bool onCollision(const ISceneNodeAnimatorCollisionResponse& animator) = 0;
};
class ISceneNodeAnimatorCollisionResponse : public ISceneNodeAnimator
{
public:
virtual ~ISceneNodeAnimatorCollisionResponse() {}
virtual bool isFalling() const = 0;
virtual void setEllipsoidRadius(const core::vector3df& radius) = 0;
virtual core::vector3df getEllipsoidRadius() const = 0;
virtual void setGravity(const core::vector3df& gravity) = 0;
virtual core::vector3df getGravity() const = 0;
virtual void jump(f32 jumpSpeed) = 0;
virtual void setAnimateTarget ( bool enable ) = 0;
virtual bool getAnimateTarget () const = 0;
virtual void setEllipsoidTranslation(const core::vector3df &translation) = 0;
virtual core::vector3df getEllipsoidTranslation() const = 0;
virtual void setWorld(ITriangleSelector* newWorld) = 0;
virtual ITriangleSelector* getWorld() const = 0;
virtual void setTargetNode(ISceneNode * node) = 0;
virtual ISceneNode* getTargetNode(void) const = 0;
virtual bool collisionOccurred() const = 0;
virtual const core::vector3df & getCollisionPoint() const = 0;
virtual const core::triangle3df & getCollisionTriangle() const = 0;
virtual const core::vector3df & getCollisionResultPosition(void) const = 0;
virtual ISceneNode* getCollisionNode(void) const = 0;
virtual void setCollisionCallback(ICollisionCallback* callback) = 0;
};
} // end namespace scene
} // end namespace irr
#endif
ISceneNode.h
irr::IReferenceCounted::IReferenceCounted
IReferenceCounted()
Constructor.
Definition IReferenceCounted.h:46
irr::scene::ICollisionCallback
Callback interface for catching events of collisions.
Definition ISceneNodeAnimatorCollisionResponse.h:23
irr::scene::ICollisionCallback::onCollision
virtual bool onCollision(const ISceneNodeAnimatorCollisionResponse &animator)=0
Will be called when a collision occurrs.
irr::scene::ISceneNodeAnimatorCollisionResponse
Special scene node animator for doing automatic collision detection and response.
Definition ISceneNodeAnimatorCollisionResponse.h:54
irr::scene::ISceneNodeAnimatorCollisionResponse::getGravity
virtual core::vector3df getGravity() const =0
irr::scene::ISceneNodeAnimatorCollisionResponse::getTargetNode
virtual ISceneNode * getTargetNode(void) const =0
Gets the single node that this animator is acting on.
irr::scene::ISceneNodeAnimatorCollisionResponse::setEllipsoidTranslation
virtual void setEllipsoidTranslation(const core::vector3df &translation)=0
Set translation of the collision ellipsoid.
irr::scene::ISceneNodeAnimatorCollisionResponse::setCollisionCallback
virtual void setCollisionCallback(ICollisionCallback *callback)=0
Sets a callback interface which will be called if a collision occurs.
irr::scene::ISceneNodeAnimatorCollisionResponse::getWorld
virtual ITriangleSelector * getWorld() const =0
Get the current triangle selector containing all triangles for collision detection.
irr::scene::ISceneNodeAnimatorCollisionResponse::setAnimateTarget
virtual void setAnimateTarget(bool enable)=0
Should the Target react on collision ( default = true ).
irr::scene::ISceneNodeAnimatorCollisionResponse::jump
virtual void jump(f32 jumpSpeed)=0
'Jump' the animator, by adding a jump speed opposite to its gravity
irr::scene::ISceneNodeAnimatorCollisionResponse::setWorld
virtual void setWorld(ITriangleSelector *newWorld)=0
Sets a triangle selector holding all triangles of the world with which the scene node may collide.
irr::scene::ISceneNodeAnimatorCollisionResponse::getCollisionPoint
virtual const core::vector3df & getCollisionPoint() const =0
Returns the last point of collision.
irr::scene::ISceneNodeAnimatorCollisionResponse::setTargetNode
virtual void setTargetNode(ISceneNode *node)=0
Set the single node that this animator will act on.
irr::scene::ISceneNodeAnimatorCollisionResponse::isFalling
virtual bool isFalling() const =0
Check if the attached scene node is falling.
irr::scene::ISceneNodeAnimatorCollisionResponse::setEllipsoidRadius
virtual void setEllipsoidRadius(const core::vector3df &radius)=0
Sets the radius of the ellipsoid for collision detection and response.
irr::scene::ISceneNodeAnimatorCollisionResponse::getCollisionNode
virtual ISceneNode * getCollisionNode(void) const =0
Returns the node that was collided with.
irr::scene::ISceneNodeAnimatorCollisionResponse::getCollisionResultPosition
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...
irr::scene::ISceneNodeAnimatorCollisionResponse::collisionOccurred
virtual bool collisionOccurred() const =0
Returns true if a collision occurred during the last animateNode().
irr::scene::ISceneNodeAnimatorCollisionResponse::getEllipsoidRadius
virtual core::vector3df getEllipsoidRadius() const =0
Returns the radius of the ellipsoid for collision detection and response.
irr::scene::ISceneNodeAnimatorCollisionResponse::~ISceneNodeAnimatorCollisionResponse
virtual ~ISceneNodeAnimatorCollisionResponse()
Destructor.
Definition ISceneNodeAnimatorCollisionResponse.h:58
irr::scene::ISceneNodeAnimatorCollisionResponse::getAnimateTarget
virtual bool getAnimateTarget() const =0
irr::scene::ISceneNodeAnimatorCollisionResponse::getCollisionTriangle
virtual const core::triangle3df & getCollisionTriangle() const =0
Returns the last triangle that caused a collision.
irr::scene::ISceneNodeAnimatorCollisionResponse::setGravity
virtual void setGravity(const core::vector3df &gravity)=0
Sets the gravity of the environment.
irr::scene::ISceneNodeAnimatorCollisionResponse::getEllipsoidTranslation
virtual core::vector3df getEllipsoidTranslation() const =0
Get the translation of the ellipsoid for collision detection.
irr::scene::ISceneNodeAnimator
Animates a scene node. Can animate position, rotation, material, and so on.
Definition ISceneNodeAnimator.h:31
irr::scene::ISceneNode
Scene node interface.
Definition ISceneNode.h:41
irr::scene::ITriangleSelector
Interface to return triangles with specific properties.
Definition ITriangleSelector.h:29
irr::core::vector3df
vector3d< f32 > vector3df
Typedef for a f32 3d vector.
Definition vector3d.h:445
irr::core::triangle3df
triangle3d< f32 > triangle3df
Typedef for a f32 3d triangle.
Definition triangle3d.h:270
irr::scene
All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees a...
Definition CDynamicMeshBuffer.h:16
irr
Everything in the Irrlicht Engine can be found in this namespace.
Definition aabbox3d.h:13
irr::f32
float f32
32 bit floating point variable.
Definition irrTypes.h:104
- Irrlicht Engine Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on for Irrlicht 3D Engine by Doxygen 1.15.0