VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Attributes
makVrv::DtAsynchronousAgentManager Class Reference

An asynchronous interface to the scene manager.

Inheritance diagram for makVrv::DtAsynchronousAgentManager:
Inheritance graph
[legend]

Public Types

typedef boost::function< void(DtAgentManagerInterface *) > SceneManagerInterfaceFunction
 
typedef DtLockedBufferedQueue
< SceneManagerInterfaceFunction
AsyncAgentManagerInterfaceFunctionQueue
 

Public Member Functions

 DtAsynchronousAgentManager (DtAgentManager &agentManager, const std::string &ownerName)
 
virtual ~DtAsynchronousAgentManager ()
 
virtual void tick ()
 
AsyncAgentManagerInterfaceFunctionQueueasyncFunctionQueue ()
 
virtual void addModelDefinition (const DtModelDefinition &)
 
virtual DtModelDefinitionlookupModelDefinition (const std::string &str)
 
- Public Member Functions inherited from makVrv::DtAgentManagerInterface
 DtAgentManagerInterface (const DtAgentFactory *factory, unsigned char myNamespaceId)
 
virtual ~DtAgentManagerInterface ()
 
DtUniqueID createNewUniqueId ()
 
unsigned char namespaceId () const
 
bool uniqueIdFromAgentManagerInterface (const DtUniqueID &id) const
 
unsigned int createNewCallID ()
 
virtual DtAgentcreateNewObject (const std::string &objectClass, bool bDistribute)
 
virtual void recreateObject (DtAgent *proxy)
 
bool encodeUpdate (DtMessage &masterMsg, DtMessage &distributedMsg, double simulationTime)
 

Protected Attributes

DtAgentManagermyAgentManager
 
AsyncAgentManagerInterfaceFunctionQueue myAsyncFunctionQueue
 
- Protected Attributes inherited from makVrv::DtAgentManagerInterface
DtUniqueID myNamespaceId
 
DtUniqueID myFreeID
 
unsigned int myUpdateCallIndex
 
AgentList myUpdatedObjects
 
AgentList myToBeDeletedObjects
 
const DtAgentFactorymyDriverFactory
 
OrderedCallList myMasterList
 

Additional Inherited Members

- Static Public Member Functions inherited from makVrv::DtAgentManagerInterface
static unsigned char namespaceFromUniqueId (DtUniqueID id)
 
- Static Public Attributes inherited from makVrv::DtAgentManagerInterface
static const double IgnoreSimulationTime
 
- Protected Types inherited from makVrv::DtAgentManagerInterface
typedef std::list
< IndexedMessage,
tbb::tbb_allocator
< IndexedMessage > > 
OrderedCallList
 
typedef std::list< DtAgent * > AgentList
 
- Protected Member Functions inherited from makVrv::DtAgentManagerInterface
void deleteObject (DtAgent *)
 
void queueObjectForUpdate (DtAgent *object)
 

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtAsynchronousAgentManager::DtAsynchronousAgentManager ( DtAgentManager agentManager,
const std::string &  ownerName 
)

CTOR.

Warning
The DtAsynchronousAgentManager instance must be created in the main thread. Typically it is valid to create one in the implementation of the start() function of the DtDriver.
virtual makVrv::DtAsynchronousAgentManager::~DtAsynchronousAgentManager ( )
virtual

DTOR.

Warning
The DtAsynchronousAgentManager instance must be deleted in the main thread. Typically it is valid to delete in the implementation of the stop() function of the DtDriver.

Member Function Documentation

virtual void makVrv::DtAsynchronousAgentManager::tick ( )
virtual

Tick the scene manager. This must be called by the DtDriver implementation to propagate the driver calls to the scene manager. Typically this would be called in thread loop.

while(!askedToStop())
{
doSimulation_and_makeDriverCalls();
myAsyncInterface->tick();
}

Implements makVrv::DtAgentManagerInterface.

virtual void makVrv::DtAsynchronousAgentManager::addModelDefinition ( const DtModelDefinition )
virtual

Add a new model definition.

virtual DtModelDefinition* makVrv::DtAsynchronousAgentManager::lookupModelDefinition ( const std::string &  str)
virtual

Lookup a model definition. This will return a new copy of the original model definition (without any local cache) which must be deleted.

Warning
The returned pointer must be deleted by the caller.
AsyncAgentManagerInterfaceFunctionQueue* makVrv::DtAsynchronousAgentManager::asyncFunctionQueue ( )

Get a pointer to the asynchronous function queue.

Member Data Documentation

DtAgentManager& makVrv::DtAsynchronousAgentManager::myAgentManager
protected
AsyncAgentManagerInterfaceFunctionQueue makVrv::DtAsynchronousAgentManager::myAsyncFunctionQueue
protected

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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)