CThing Class Reference

The class that all physics objects derive from in the CWorld system. More...

#include <World.h>

Inheritance diagram for CThing:

CBox CSphere CSpirit

List of all members.

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_EVENTGetLastEvent ()
 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


Detailed Description

The class that all physics objects derive from in the CWorld system.

Member Function Documentation

virtual int CThing::Serialize ( void *  dest  )  [virtual]

Serializes the CThing into a memory location.

Parameters:
dest The address of the memory location for serialization.
Returns:
The size of the serialization. The next serialization location must be this bytes beyond dest.
See also:
Deserialize

Reimplemented in CSpirit.

virtual int CThing::Deserialize ( void *  dest  )  [virtual]

Deserializes the CThing from a memory location.

Parameters:
dest The address of the memory location for deserialization.
Returns:
The size of the deserialization. The next deserialization location must be this bytes beyond dest.
See also:
Serialize

Reimplemented in CSpirit.


The documentation for this class was generated from the following file:

Generated on Fri Jun 13 19:46:39 2008 for OPSIMUS by  doxygen 1.5.5