cLocation Class Reference

spatial grouping of objects, useful for gfx-LOD, reducing network traffic, hierarchy, mapmaking... More...

#include <location.h>

Inheritance diagram for cLocation:

Inheritance graph
[legend]
Collaboration diagram for cLocation:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 cLocation ()
virtual ~cLocation ()
void StepAllObjects (const int iCurTime, const float fPhysStepTime, const bool bIncResyncCounterLow=false)
void DeleteAllObjects ()
 efficient mass delete
int CountParents ()
int SendResyncs (cUDP_SendSocket &pUDPSocket, const uint32 iAddr, const int iPort, const int iMinLastChangeTime=0, const float fRandomResyncProb=0.0)
int StoreResyncs (cFIFO &pFIFO, const int iMinLastChangeTime=0, const float fRandomResyncProb=0.0)

Static Public Member Functions

static void LuaRegister (lua_State *L)
 lua binding

Public Attributes

std::list< cObject * > mlObjects
float mfBoundingRad
 updated during StepAllObjects(), max(dist+rad) of all objects


Detailed Description

spatial grouping of objects, useful for gfx-LOD, reducing network traffic, hierarchy, mapmaking...

Definition at line 19 of file location.h.


Constructor & Destructor Documentation

cLocation::cLocation (  ) 

Definition at line 10 of file location.cpp.

cLocation::~cLocation (  )  [virtual]

Definition at line 12 of file location.cpp.

References assert, and mlObjects.


Member Function Documentation

void cLocation::StepAllObjects ( const int  iCurTime,
const float  fPhysStepTime,
const bool  bIncResyncCounterLow = false 
)

Definition at line 16 of file location.cpp.

References mfBoundingRad, and mlObjects.

Referenced by cLocation_L::StepAllObjects().

void cLocation::DeleteAllObjects (  ) 

efficient mass delete

Definition at line 22 of file location.cpp.

References cObject::_HackForgetParentLocation(), and mlObjects.

Referenced by cLocation_L::DeleteAllObjects().

int cLocation::CountParents (  ) 

int cLocation::SendResyncs ( cUDP_SendSocket pUDPSocket,
const uint32  iAddr,
const int  iPort,
const int  iMinLastChangeTime = 0,
const float  fRandomResyncProb = 0.0 
)

only resyncs objects with mbResynced = true AND : (obj.miLastChangeTime >= iMinLastChangeTime or random(fRandomResyncProb)) returns how many resync packets have been sent

Definition at line 35 of file location.cpp.

References Lugre::cFIFO::Clear(), cObject::mbResynced, cObject::miLastChangeTime, mlObjects, cObject::SaveResyncData(), and Lugre::cUDP_SendSocket::Send().

int cLocation::StoreResyncs ( cFIFO pFIFO,
const int  iMinLastChangeTime = 0,
const float  fRandomResyncProb = 0.0 
)

void cLocation::LuaRegister ( lua_State *  L  )  [static]

lua binding

Definition at line 177 of file location_L.cpp.

References PROFILE.

Referenced by SFZ_RegisterLuaPlugin().


Member Data Documentation

updated during StepAllObjects(), max(dist+rad) of all objects

Definition at line 21 of file location.h.

Referenced by cLocation_L::SetBoundRad(), cObject::Step(), and StepAllObjects().


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

Generated on Tue Feb 7 06:00:15 2012 for cpp by  doxygen 1.5.6