#include <World.h>
Public Member Functions | |
CThing (CWorld *world) | |
Constructor. Should not be called except from derived classes. | |
virtual void | SetPosition (const Vector3 &pos) |
Sets the position of the CThing. | |
virtual void | SetOrientation (const Quaternion &quaternion) |
Sets the orientation of the CThing. | |
virtual void | SetVelocity (const Vector3 &vel) |
Sets the velocity of the CThing. | |
virtual void | SetAngularVelocity (const Vector3 &vel) |
Sets the angularvelocity of the CThing. | |
virtual void | SetMass (float m) |
Sets the mass of the CThing. Meaningless for players. | |
virtual void | SetDensity (float d)=0 |
Sets the density of the CThing. Meaningless for players. | |
virtual float | GetMass () |
Gets the mass of the CThing. Meaningless for players. | |
virtual float | GetDensity ()=0 |
Gets the density of the CThing. Meaningless for players. | |
virtual const Vector3 & | GetPosition () |
Retrieves the position of the CThing. | |
virtual const Quaternion & | GetOrientation () |
Retrieves the orientation of the CThing. | |
virtual Vector3 | GetVelocity () |
Retrieves the velocity of the CThing. | |
virtual Vector3 | GetAngularVelocity () |
Retrieves the angular velocity of the CThing. | |
void | ShowGeometry (bool show) |
Sets whether the show or hide the geometry mesh of the CThing. | |
virtual void | SetCollisionEnabled (bool collision) |
Enables or disables the collision to the world and other CThings. Only For CThings other than CSpirit this is meaningful. | |
virtual void | SetDynamicsEnabled (bool dynamics) |
Enables or disables the movement of the CThing. If it is false the thing becomes anchored. Only For CThings other than CSpirit this is meaningful. | |
virtual bool | IsDynamicsEnabled () |
Queries whether the movement of this instance is enabled. | |
virtual bool | IsCollisionEnabled () |
Queries whether the collision of this instance is enabled. | |
virtual int | Type ()=0 |
Returns the CThing type identifier. | |
virtual int | Serialize (void *dest) |
virtual int | Deserialize (void *dest) |
virtual const THING_EVENT & | GetLastEvent () |
Retrieves the last triggered event on this CThing. The id field of the THING_EVENT structure should be checked whether to understand a new event has occured. | |
virtual | ~CThing () |
The virtual destructor. | |
Friends | |
class | CWorld |
class | CSpirit |
class | CBox |
virtual int CThing::Serialize | ( | void * | dest | ) | [virtual] |
Serializes the CThing into a memory location.
dest | The address of the memory location for serialization. |
Reimplemented in CSpirit.
virtual int CThing::Deserialize | ( | void * | dest | ) | [virtual] |