VR-Forces 4.0.4 Class Documentation
Public Types | Public Member Functions | Protected Attributes
makVrv::DtAsynchronousAgentManager Class Reference

An asynchronous interface to the scene manager. More...

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

List of all members.

Public Types

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

Public Member Functions

 DtAsynchronousAgentManager (DtAgentManager &agentManager, const std::string &ownerName)
 CTOR.
virtual ~DtAsynchronousAgentManager ()
 DTOR.
virtual void tick ()
 Tick the scene manager.
AsyncAgentManagerInterfaceFunctionQueueasyncFunctionQueue ()
 Get a pointer to the asynchronous function queue.
virtual void addModelDefinition (const DtModelDefinition &)
 Add a new model definition.
virtual DtModelDefinitionlookupModelDefinition (const std::string &str)
 Lookup a model definition.

Protected Attributes

DtAgentManagermyAgentManager
AsyncAgentManagerInterfaceFunctionQueue myAsyncFunctionQueue

Detailed Description

An asynchronous interface to the scene manager.


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.

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.

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.

Get a pointer to the asynchronous function queue.


Member Data Documentation


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)