![]() |
Public API Reference |
#include <movable.h>
Inheritance diagram for csMovable:
Public Methods | |
csMovable () | |
Create a default movable. More... | |
virtual | ~csMovable () |
Destructor. More... | |
void | SetMeshWrapper (csMeshWrapper *obj) |
Set mesh on which this movable operates. More... | |
csMeshWrapper * | GetMeshWrapper () |
Get the mesh wrapper on which we operate. More... | |
void | SetParent (iMovable *par) |
Set the parent movable. More... | |
iMovable * | GetParent () const |
Get the parent movable. More... | |
void | SetSector (iSector *sector) |
Initialize the list of sectors to one sector where this thing is. More... | |
void | ClearSectors () |
Clear the list of sectors. More... | |
iSectorList * | GetSectors () |
Get list of sectors for this entity. More... | |
bool | InSector () const |
Return true if we are placed in a sector. More... | |
void | SetPosition (iSector *home, const csVector3 &v) |
Set the transformation vector and sector to move to some position. More... | |
void | SetPosition (const csVector3 &v) |
Set the transformation vector for this object. More... | |
const csVector3 & | GetPosition () const |
Get the current local position. More... | |
const csVector3 | GetFullPosition () const |
Get the current position using the full transformation (using possible parent transformations). More... | |
void | SetTransform (const csMatrix3 &matrix) |
Set the transformation matrix for this entity. More... | |
void | SetTransform (const csReversibleTransform &t) |
Set the local world to object tranformation. More... | |
csReversibleTransform & | GetTransform () |
Get the local world to object tranformation. More... | |
const csReversibleTransform & | GetTransform () const |
Get the local world to object tranformation. More... | |
csReversibleTransform | GetFullTransform () const |
Construct the full world to object transformation given this transformation and possible parents transformations. More... | |
void | MovePosition (const csVector3 &v) |
Relative move. More... | |
void | Transform (const csMatrix3 &matrix) |
Relative transform. More... | |
void | UpdateMove () |
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... | |
void | AddListener (iMovableListener *listener) |
Add a listener to this movable. More... | |
void | RemoveListener (iMovableListener *listener) |
Remove a listener from this movable. More... | |
long | GetUpdateNumber () const |
A number which indicates if the movable has been updated. More... |
It has a list of sectors and a position (a list of sectors because an entity can overlap several sectors at the same time through portals). This class itself does not have geometry. It is only responsible for managing movement.
Definition at line 70 of file csengine/movable.h.
|
Create a default movable.
|
|
Destructor.
|
|
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 0. |
|
Get the current position using the full transformation (using possible parent transformations). @@ Currently not very efficient! Definition at line 181 of file csengine/movable.h. References GetFullTransform, and csTransform::GetOrigin. |
|
Construct the full world to object transformation given this transformation and possible parents transformations.
Referenced by GetFullPosition. |
|
Get the mesh wrapper on which we operate.
Definition at line 113 of file csengine/movable.h. |
|
Get the parent movable.
Definition at line 121 of file csengine/movable.h. |
|
Get the current local position.
Definition at line 174 of file csengine/movable.h. References csTransform::GetOrigin. |
|
Get list of sectors for this entity. This will return the sectors of the parent if there is a parent. Definition at line 142 of file csengine/movable.h. References iMovable::GetSectors, and csMovableSectorList::scfiSectorList. |
|
Get the local world to object tranformation.
Definition at line 204 of file csengine/movable.h. |
|
Get the local world to object tranformation.
Definition at line 199 of file csengine/movable.h. |
|
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. Definition at line 245 of file csengine/movable.h. |
|
Return true if we are placed in a sector.
Definition at line 151 of file csengine/movable.h. References csArray< iSector *, csRefArrayElementHandler< iSector * > >::Length. |
|
Relative move.
|
|
Remove a listener from this movable.
|
|
Set mesh on which this movable operates.
Definition at line 109 of file csengine/movable.h. |
|
Set the parent movable.
Definition at line 117 of file csengine/movable.h. |
|
Set the transformation vector for this object. Note that the sectors are unchanged. Definition at line 166 of file csengine/movable.h. References csTransform::SetOrigin. |
|
Set the transformation vector and sector to move to some position.
|
|
Initialize the list of sectors to one sector where this thing is. This is a convenience funcion. This function does not do anything if the parent is not 0. |
|
Set the local world to object tranformation.
Definition at line 194 of file csengine/movable.h. |
|
Set the transformation matrix for this entity.
|
|
Relative transform.
|
|
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! |