Object Class Reference

This will be our base class for all game objects to synchronize data inside WAN. More...

#include <object.h>

Inheritance diagram for Object:

Roller List of all members.

Public Member Functions

 Object (irr::IrrlichtDevice *d)
 ~Object ()
virtual void update (irr::u32 deltaTime)=0
virtual void load (irr::core::stringc filePath)=0
virtual void safe (irr::core::stringc filePath)=0
void setScale (irr::f32 modelScale)

Public Attributes

irr::s32 myId
 public accessible attribute representing a unique identifier.
irr::core::vector3df position
 public accessible attribute representing current object position.
irr::core::vector3df velocity
 public accessible attribute representing current object speed.

Protected Attributes

irr::IrrlichtDevice * device
 Inheritanced classes can access this IrrlichtDevice*.
irr::scene::IAnimatedMeshSceneNode * mesh
 Inheritanced classes can access this IAnimatedMeshSceneNode*.

Detailed Description

This will be our base class for all game objects to synchronize data inside WAN.

load() and safe() utilize Config.h to load/safe object data (like meshes, bmp, etc.)

Todo:
implement class DataReplicator from package RakNet.

Definition at line 10 of file object.h.


Constructor & Destructor Documentation

Object::Object irr::IrrlichtDevice *  d  ) 
 

Constructor.

Parameters:
d : An IrrlichtDevice, needed to access everything.

Object::~Object  ) 
 

Destructor. Removes mesh from scene.

Definition at line 19 of file object.cpp.

References device, and mesh.


Member Function Documentation

virtual void Object::load irr::core::stringc  filePath  )  [pure virtual]
 

For data driven object creation (e.g. load mesh via config file).

Parameters:
configFileName : A string (path and name) to config load file.

Implemented in Roller.

virtual void Object::safe irr::core::stringc  filePath  )  [pure virtual]
 

For object serialization.

Parameters:
configFileName : A string (path and name) to config safe file.

Implemented in Roller.

void Object::setScale irr::f32  modelScale  ) 
 

Scales object mesh in all three dimensions with same value.

Parameters:
modelScale : A float (typicaly somthing like 0.001 or 0.01 or ...)

Referenced by StateTerrain::entry().

virtual void Object::update irr::u32  deltaTime  )  [pure virtual]
 

To be called on every frame.

Parameters:
deltaTime : A unsigned int representing milliseconds since last call.

Implemented in Roller.


The documentation for this class was generated from the following files:
Generated on Sun Dec 2 17:09:58 2007 for Swarm by  doxygen 1.4.6-NO