Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

iMovable Struct Reference

This interface describes a movable entity. More...

#include <movable.h>

Inheritance diagram for iMovable:

iBase List of all members.

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 iSectorListGetSectors ()=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 csVector3GetPosition () 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 csReversibleTransformGetTransform ()=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...


Detailed Description

This interface describes a movable entity.

It is usually attached to some other geometrical object like a thing or mesh object.


Member Function Documentation

void iMovable::AddListener ( iMovableListener * listener,
void * userdata ) [pure virtual]
 

Add a listener to this movable.

This listener will be called whenever the movable changes or right before the movable is destroyed.

void iMovable::ClearSectors ( ) [pure virtual]
 

Clear the list of sectors.

This function does not do anything if the parent is not NULL.

iSectorList * iMovable::GetSectors ( ) [pure virtual]
 

Get list of sectors for this entity.

This will return the sectors of the parent if there is a parent.

long iMovable::GetUpdateNumber ( ) const [pure virtual]
 

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.

void iMovable::SetPosition ( const csVector3 & v ) [pure virtual]
 

Set the transformation vector for this object.

Note that the sectors are unchanged.

void iMovable::SetSector ( iSector * sector ) [pure virtual]
 

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.

void iMovable::UpdateMove ( ) [pure virtual]
 

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.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000