#include <movable.h>
Inheritance diagram for iMovable:
Public Methods | |
virtual iMovable* | GetParent () const=0 |
Get the parent movable. | |
virtual void | SetParent (iMovable *parent)=0 |
Set the parent movable. | |
virtual void | SetSector (iSector *sector)=0 |
Initialize the list of sectors to one sector where this thing is. More... | |
virtual void | ClearSectors ()=0 |
Clear the list of sectors. More... | |
virtual iSectorList* | GetSectors ()=0 |
Get list of sectors for this entity. More... | |
virtual bool | InSector () const=0 |
Return true if we are placed in a sector. | |
virtual void | SetPosition (iSector *home, const csVector3 &v)=0 |
Set the transformation vector and sector to move to some position. | |
virtual void | SetPosition (const csVector3 &v)=0 |
Set the transformation vector for this object. More... | |
virtual const csVector3& | GetPosition () const=0 |
Get the current position. | |
virtual const csVector3 | GetFullPosition () const=0 |
Get the current position but keep track of hierarchical transformations. | |
virtual void | SetTransform (const csMatrix3 &matrix)=0 |
Set the transformation matrix for this entity. | |
virtual void | SetTransform (const csReversibleTransform &t)=0 |
Set the world to object tranformation. | |
virtual csReversibleTransform& | GetTransform ()=0 |
Get the world to object tranformation. | |
virtual csReversibleTransform | GetFullTransform () const=0 |
Construct the full world to object transformation given this transformation and possible parents transformations. | |
virtual void | MovePosition (const csVector3 &v)=0 |
Relative move. | |
virtual void | Transform (const csMatrix3 &matrix)=0 |
Relative transform. | |
virtual void | AddListener (iMovableListener *listener, void *userdata)=0 |
Add a listener to this movable. More... | |
virtual void | RemoveListener (iMovableListener *listener)=0 |
Remove a listener from this movable. | |
virtual void | UpdateMove ()=0 |
After all movement has been done you need to call UpdateMove() to make the final changes to the entity that is controlled by this movable. More... | |
virtual long | GetUpdateNumber () const=0 |
A number which indicates if the movable has been updated. More... |
It is usually attached to some other geometrical object like a thing or mesh object.
|
Add a listener to this movable. This listener will be called whenever the movable changes or right before the movable is destroyed. |
|
Clear the list of sectors. This function does not do anything if the parent is not NULL. |
|
Get list of sectors for this entity. This will return the sectors of the parent if there is a parent. |
|
A number which indicates if the movable has been updated. One can use this number to see if the position of the object has changed since the last time it was checked. |
|
Set the transformation vector for this object. Note that the sectors are unchanged. |
|
Initialize the list of sectors to one sector where this thing is. This is a conveniance funcion. This function does not update the corresponding list in the sector. It only does a local update here. This function does not do anything if the parent is not NULL. |
|
After all movement has been done you need to call UpdateMove() to make the final changes to the entity that is controlled by this movable. This is very important! This function is responsible for calling all movement listeners. |