#include <movable.h>
Inheritance diagram for csMovable:
Public Methods | |
csMovable () | |
Create a default movable. | |
virtual | ~csMovable () |
Destructor. | |
void | SetMeshWrapper (csMeshWrapper *obj) |
Set mesh on which this movable operates. | |
csMeshWrapper* | GetMeshWrapper () |
Get the mesh wrapper on which we operate. | |
void | SetParent (iMovable *par) |
Set the parent movable. | |
iMovable* | GetParent () const |
Get the parent movable. | |
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. | |
void | SetPosition (iSector *home, const csVector3 &v) |
Set the transformation vector and sector to move to some position. | |
void | SetPosition (const csVector3 &v) |
Set the transformation vector for this object. More... | |
const csVector3& | GetPosition () const |
Get the current local position. | |
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. | |
void | SetTransform (const csReversibleTransform &t) |
Set the local world to object tranformation. | |
csReversibleTransform& | GetTransform () |
Get the local world to object tranformation. | |
const csReversibleTransform& | GetTransform () const |
Get the local world to object tranformation. | |
csReversibleTransform | GetFullTransform () const |
Construct the full world to object transformation given this transformation and possible parents transformations. | |
void | MovePosition (const csVector3 &v) |
Relative move. | |
void | Transform (const csMatrix3 &matrix) |
Relative transform. | |
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, void *userdata) |
Add a listener to this movable. More... | |
void | RemoveListener (iMovableListener *listener) |
Remove a listener from this movable. | |
long | GetUpdateNumber () const |
A number which indicates if the movable has been updated. More... | |
Public Attributes | |
SCF_DECLARE_IBASE | |
csMovable::eiMovable | scfiMovable |
Friends | |
class | eiMovable |
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.
|
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 the current position using the full transformation (using possible parent transformations). @@ Currently not very efficient! |
|
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 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! |