Planeshift
Public Member Functions | Protected Member Functions | Protected Attributes

ProximityList Class Reference

#include <psproxlist.h>

List of all members.

Public Member Functions

bool CheckUpdateRequired ()
 Check if an update is required for this object based on moved range and changed instance.
void ClearTouched ()
void DebugDumpContents (csString &out)
bool EndMutualWatching (gemObject *fromobject)
 Deletes relation watcher --> watched in both directions between our object and given object.
void EndWatching (gemObject *object)
 Deletes relation watcher --> watched between our object and given object.
bool FindClient (uint32_t cnum)
gemObjectFindObjectName (const char *name)
int GetClientID ()
csArray< PublishDestination > & GetClients ()
bool GetUntouched_ObjectThatIWatch (gemObject *&object)
bool GetUntouched_ObjectThatWatchesMe (gemObject *&object)
bool Initialize (int cnum, gemObject *parent)
 ProximityList (iObjectRegistry *object_reg, gemObject *parent, EntityManager *entitymanager)
float RangeTo (gemObject *object, bool ignoreY=false, bool ignoreInstance=false)
bool StartMutualWatching (int othercnum, gemObject *otherObject, float range)
 Creates relation watcher --> watched in both directions between our object and given object.
bool StartWatching (gemObject *object, float range)
 Creates relation watcher --> watched between our object and given object Returns: true if new relation was added.
 ~ProximityList ()

Protected Member Functions

void AddWatcher (gemObject *interestedobject, float range)
 Adds 'interestedobject' to 'objectsThatWatchMe'.
bool FindObject (gemObject *object)
bool FindObjectThatIWatch (gemObject *object)
PublishDestinationFindObjectThatWatchesMe (gemObject *object, uint &x)
bool IsNear (iSector *sector, csVector3 &pos, gemObject *object, float radius)
void RemoveWatcher (gemObject *object)
 Removes 'interestedobject' from 'objectsThatWatchMe'.
void TouchObjectThatWatchesMe (gemObject *object, float newrange)
void UpdatePublishDestRange (PublishDestination *pd, gemObject *myself, gemObject *object, uint objIdx, float newrange)

Protected Attributes

int clientnum
csArray< csTicks > destRangeTimer
 Per-object timeout on dest range checks.
EntityManagerentityManager
bool firstFrame
csArray< gemObject * > objectsThatIWatch
 What objects am I subscribed to myself?
csArray< bool > objectsThatIWatch_touched
csArray< PublishDestinationobjectsThatWatchMe
 What players are subscribed to my updates?
csArray< bool > objectsThatWatchMe_touched
InstanceID oldInstance
csVector3 oldPos
gemObjectself

Detailed Description

Definition at line 54 of file psproxlist.h.


Constructor & Destructor Documentation

ProximityList::ProximityList ( iObjectRegistry *  object_reg,
gemObject parent,
EntityManager entitymanager 
)
ProximityList::~ProximityList ( )

Member Function Documentation

void ProximityList::AddWatcher ( gemObject interestedobject,
float  range 
) [protected]

Adds 'interestedobject' to 'objectsThatWatchMe'.

bool ProximityList::CheckUpdateRequired ( )

Check if an update is required for this object based on moved range and changed instance.

void ProximityList::ClearTouched ( )
void ProximityList::DebugDumpContents ( csString &  out)
bool ProximityList::EndMutualWatching ( gemObject fromobject)

Deletes relation watcher --> watched in both directions between our object and given object.

void ProximityList::EndWatching ( gemObject object)

Deletes relation watcher --> watched between our object and given object.

bool ProximityList::FindClient ( uint32_t  cnum)
bool ProximityList::FindObject ( gemObject object) [protected]
gemObject* ProximityList::FindObjectName ( const char *  name)
bool ProximityList::FindObjectThatIWatch ( gemObject object) [protected]
PublishDestination* ProximityList::FindObjectThatWatchesMe ( gemObject object,
uint &  x 
) [protected]
int ProximityList::GetClientID ( ) [inline]

Definition at line 116 of file psproxlist.h.

csArray<PublishDestination>& ProximityList::GetClients ( ) [inline]

Definition at line 112 of file psproxlist.h.

bool ProximityList::GetUntouched_ObjectThatIWatch ( gemObject *&  object)
bool ProximityList::GetUntouched_ObjectThatWatchesMe ( gemObject *&  object)
bool ProximityList::Initialize ( int  cnum,
gemObject parent 
)
bool ProximityList::IsNear ( iSector *  sector,
csVector3 &  pos,
gemObject object,
float  radius 
) [protected]
float ProximityList::RangeTo ( gemObject object,
bool  ignoreY = false,
bool  ignoreInstance = false 
)
void ProximityList::RemoveWatcher ( gemObject object) [protected]

Removes 'interestedobject' from 'objectsThatWatchMe'.

bool ProximityList::StartMutualWatching ( int  othercnum,
gemObject otherObject,
float  range 
)

Creates relation watcher --> watched in both directions between our object and given object.

bool ProximityList::StartWatching ( gemObject object,
float  range 
)

Creates relation watcher --> watched between our object and given object Returns: true if new relation was added.

void ProximityList::TouchObjectThatWatchesMe ( gemObject object,
float  newrange 
) [protected]
void ProximityList::UpdatePublishDestRange ( PublishDestination pd,
gemObject myself,
gemObject object,
uint  objIdx,
float  newrange 
) [protected]

Member Data Documentation

Definition at line 66 of file psproxlist.h.

csArray<csTicks> ProximityList::destRangeTimer [protected]

Per-object timeout on dest range checks.

Definition at line 61 of file psproxlist.h.

Definition at line 71 of file psproxlist.h.

bool ProximityList::firstFrame [protected]

Definition at line 67 of file psproxlist.h.

What objects am I subscribed to myself?

Definition at line 60 of file psproxlist.h.

Definition at line 64 of file psproxlist.h.

What players are subscribed to my updates?

Definition at line 59 of file psproxlist.h.

Definition at line 63 of file psproxlist.h.

Definition at line 69 of file psproxlist.h.

csVector3 ProximityList::oldPos [protected]

Definition at line 68 of file psproxlist.h.

Definition at line 57 of file psproxlist.h.


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