Special scene node animator for doing automatic collision detection and response.
More...
|
|
virtual | ~ISceneNodeAnimatorCollisionResponse () |
| | Destructor.
|
| 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 core::vector3df | getEllipsoidRadius () const =0 |
| | Returns the radius of the ellipsoid for collision detection and response.
|
| virtual void | setGravity (const core::vector3df &gravity)=0 |
| | Sets the gravity of the environment.
|
| virtual core::vector3df | getGravity () const =0 |
| virtual void | jump (f32 jumpSpeed)=0 |
| | 'Jump' the animator, by adding a jump speed opposite to its gravity
|
|
virtual void | setAnimateTarget (bool enable)=0 |
| | Should the Target react on collision ( default = true ).
|
|
virtual bool | getAnimateTarget () const =0 |
| virtual void | setEllipsoidTranslation (const core::vector3df &translation)=0 |
| | Set translation of the collision ellipsoid.
|
| virtual core::vector3df | getEllipsoidTranslation () const =0 |
| | Get the translation of the ellipsoid for collision detection.
|
| virtual void | setWorld (ITriangleSelector *newWorld)=0 |
| | Sets a triangle selector holding all triangles of the world with which the scene node may collide.
|
|
virtual ITriangleSelector * | getWorld () const =0 |
| | Get the current triangle selector containing all triangles for collision detection.
|
| virtual void | setTargetNode (ISceneNode *node)=0 |
| | Set the single node that this animator will act on.
|
| virtual ISceneNode * | getTargetNode (void) const =0 |
| | Gets the single node that this animator is acting on.
|
|
virtual bool | collisionOccurred () const =0 |
| | Returns true if a collision occurred during the last animateNode().
|
|
virtual const core::vector3df & | getCollisionPoint () const =0 |
| | Returns the last point of collision.
|
|
virtual const core::triangle3df & | getCollisionTriangle () const =0 |
| | Returns the last triangle that caused a 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 callback.
|
|
virtual ISceneNode * | getCollisionNode (void) const =0 |
| | Returns the node that was collided with.
|
| virtual void | setCollisionCallback (ICollisionCallback *callback)=0 |
| | Sets a callback interface which will be called if a collision occurs.
|
| virtual void | animateNode (ISceneNode *node, u32 timeMs)=0 |
| | Animates a scene node.
|
| virtual ISceneNodeAnimator * | createClone (ISceneNode *node, ISceneManager *newManager=0)=0 |
| | Creates a clone of this animator.
|
| virtual bool | isEventReceiverEnabled () const |
| | Returns true if this animator receives events.
|
| virtual bool | OnEvent (const SEvent &event) |
| | Event receiver, override this function for camera controlling animators.
|
|
virtual ESCENE_NODE_ANIMATOR_TYPE | getType () const |
| | Returns type of the scene node animator.
|
| virtual bool | hasFinished (void) const |
| | Returns if the animator has finished.
|
| virtual void | serializeAttributes (io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const |
| | Writes attributes of the object.
|
| virtual void | deserializeAttributes (io::IAttributes *in, io::SAttributeReadWriteOptions *options=0) |
| | Reads attributes of the object.
|
|
| IReferenceCounted () |
| | Constructor.
|
|
virtual | ~IReferenceCounted () |
| | Destructor.
|
| void | grab () const |
| | Grabs the object. Increments the reference counter by one.
|
| bool | drop () const |
| | Drops the object. Decrements the reference counter by one.
|
| s32 | getReferenceCount () const |
| | Get the reference count.
|
| const c8 * | getDebugName () const |
| | Returns the debug name of the object.
|
|
virtual | ~IEventReceiver () |
| | Destructor.
|
Special scene node animator for doing automatic collision detection and response.
This scene node animator can be attached to any single scene node and will then prevent it from moving through specified collision geometry (e.g. walls and floors of the) world, as well as having it fall under gravity. This animator provides a simple implementation of first person shooter cameras. Attach it to a camera, and the camera will behave as the player control in a first person shooter game: The camera stops and slides at walls, walks up stairs, falls down if there is no floor under it, and so on.
The animator will treat any change in the position of its target scene node as movement, including a setPosition(), as movement. If you want to teleport the target scene node manually to a location without it being effected by collision geometry, then call setTargetNode(node) after calling node->setPosition().