dtDIS::ActiveEntityControl Struct Reference

provides a single point for associating known entities & actors. More...

#include <sharedstate.h>

List of all members.

Public Member Functions

bool AddEntity (const DIS::EntityID &eid, const dtDAL::ActorProxy *proxy)
 relate an EntityID with an Actor
bool RemoveEntity (const DIS::EntityID &eid, const dtDAL::ActorProxy *proxy)
 remove a relation for the EntityID and Actor
const DIS::EntityID * GetEntity (const dtCore::UniqueId &uid) const
 finds the associated Entity
const dtDAL::ActorProxyGetActor (const DIS::EntityID &eid) const
 finds the associated Actor
void ClearAll ()
 remove all state data.


Detailed Description

provides a single point for associating known entities & actors.

Provides quick look-ups given either an entity or an actor by keeping 2 maps in sync.


Member Function Documentation

bool ActiveEntityControl::AddEntity ( const DIS::EntityID &  eid,
const dtDAL::ActorProxy proxy 
)

relate an EntityID with an Actor

Returns:
'false' when any relation previously existed; 'true' if the relation was added.

bool ActiveEntityControl::RemoveEntity ( const DIS::EntityID &  eid,
const dtDAL::ActorProxy proxy 
)

remove a relation for the EntityID and Actor

Returns:
'false' when no relation previously existed; 'true' if the relation was removed.

const DIS::EntityID * ActiveEntityControl::GetEntity ( const dtCore::UniqueId uid  )  const

finds the associated Entity

Returns:
NULL when the proxy has no matching EntityID

const dtDAL::ActorProxy * ActiveEntityControl::GetActor ( const DIS::EntityID &  eid  )  const

finds the associated Actor

Returns:
NULL when the EntityID has no matching Actor

void ActiveEntityControl::ClearAll (  ) 

remove all state data.


http://www.delta3d.org
2.0.0 generated 14 Feb 2008