VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends
makVrv::DtDe Class Reference

The DtDe is the core component of any VR-Vantage application. More...

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

Public Types

enum  InitializationResult { Initialized = 1, UnableToInitialize = 0, UnableToInitializeDueToLicense = -1 }
 Result codes for the initialize() function. More...
typedef std::vector< std::pair
< DtDeError, bool > > 
DeErrors
 Typedef of a vector of error/critical.

Public Member Functions

 DtDe ()
 CTOR.
virtual ~DtDe ()
 DTOR occur after the subclass of DtDe has been called.
bool destructing ()
 Get if the Display Engine is in the process of destructing (typically steps like disconnecting signals is unnecessary).
virtual void setDeInitializer (const DtDeInitializer &initializer)
 Set the Display Engine initializer used to initialize the Display Engine.
virtual void setPathConfiguration (const DtDePathConfiguration &pathConfig)
 Set the path configuration for an uninitialized Display Engine.
virtual InitializationResult initialize (bool abortOnLicenseFailure=true, bool useLicenseErrorDialog=true)
 Initialize the application prior to running it.
bool initialized () const
 Get whether the application is initialized.
DtThreadId threadId ()
 Get the thread id that the Display Engine was initialized in and must rung in.
virtual void setDeConfiguration (const DtDeConfiguration &deConfig)
 Set the de configuration.
virtual void tick (double simTime)
 A very important function which provides a since tick of execution which is required for the app to run for one 'logical' frame.
void retick ()
 Retick is a helper function for simply ticking using the current Simulation time.
virtual bool timeToStop () const
 Method for checking to see if the app should stop ticking.
virtual void setTimeToStop (bool flag=true)
 Set whether it is time to stop ticking.
virtual void quit ()
 Call this method to quit and exit the application.
virtual void reset ()
 Resets DtIG to a pre-configured state.
void updateScene ()
 Update the scene if it needs to be updated.
void registerInitFunction (void *address)
 Register address of init function so DtDe instance knows that module was already instanced.
bool isInitFunctionRegistered (void *address)
 Returns true if init function has already been registered.
bool shouldSendMesssage ()
 Helper function used to check if a message needs to be created and sent.
void setPagedLodMagnificationScaleFactor (float factor)
float pagedLodMagnificationScaleFactor () const
Accessors
virtual const DtDeConfigurationdeConfiguration () const
 DtDeConfiguration accessor.
virtual DtDeCommunicatorigCommunicator ()
 DtDeCommunicator accessor.
DtMainEventQueuemainEventQueue ()
 DtMainEventQueue.
virtual DtDisplaydisplay ()
 DtDisplay accessor.
virtual DtScenescene ()
 The DtScene accessor.
virtual DtDataBankdataBank ()
 The DtDataBank accessor.
virtual DtDriverManagerdriverManager ()
 The DtMasterScene accessor.
bool driverManagerCreated () const
 You can call this method to see if the DtDriverManager exists.
virtual DtMessageDispatcherdispatcher ()
 DtMessageDispatcher accessor.
DtDebugLoglog ()
 Inline access for the debug log object.
DtAgentManageragentManager ()
 Get the scene manager.
bool agentManagerCreated () const
 You can call this method to see if the DtAgentManager exists.
virtual double simulationTime () const
 Get the simulation time.
virtual double syncedTime () const
 Get the simulation time or the synced NTP time (if the –hasNTPSync / -O flag has been set) Currently this method is used to synchronize triton ocean and speedtree.
virtual DtSynchronizedTimeManagerfindSynchronizedTimeManager ()
 The DtSynchronizedTimeManager manages synchronized time when used.
virtual int displayCount () const
 Get the display count.
virtual const DtDeInitializerdeInitializer () const
 Return the DtDeInitializer.
virtual const
DtDePathConfiguration
dePathConfiguration () const
 Return the DtDePathConfiguration.
virtual bool isInMasterMode () const
 Returns true if the DtDe is in master mode.
virtual bool isInSlaveMode () const
 Returns true if the DtDe is in slave mode.
virtual DtDeSharedStatesharedState ()
 Returns the DtDeSharedState object.
virtual const DtSchemaManagerschemaManager () const
 DtSchemaManager accessor.
virtual DtSchemaManagerschemaManager ()
virtual DtFileCachefileCache ()
 Returns DtFileCache.
virtual const DeErrorsdeErrors () const
 Returns myIgErrors.
virtual void clearDeErrors ()
 Clears myIgErrors.
virtual DtRendererrenderer () const
 Get the renderer.
bool renderFrameThisTick () const
 Gets if we will render this frame.
virtual bool licenseAvailable () const
 Gets if a license can be found to run with the features specified in the DtDeInitializer.
Distributed Functions
virtual bool addDisplayConfiguration (const DtDisplayConfiguration &)
 Add a new display, if the display engine matches the local name then the de display engine is realized.
virtual void realizeDisplayConfiguration (const std::string &clientName, const std::string &displayName)
 Make a client realize a display configuration.
virtual void destroyDisplay (DtDisplayProxySP display)
 Remove a display.
virtual void destroyDisplay (const std::string &displayName)
 Remove a display.
virtual void destroyAllDisplays ()
 Removes all display.
virtual bool modifyDisplay (const std::string &displayName, const DtDisplayConfiguration &config)
 Modify a display.
Slots
virtual void onSlaveConnected (const std::string &igName)
 Called when a client is added.
virtual void emitDeError (const DtDeError &error, bool criticalError)
 Called when an error is emitted.

Static Public Member Functions

static const charclassName ()
 Returns the name of this class.

Public Attributes

Signals
boost::signal< void()> signal_initializeDefaultState
 Signal emitted during initialization at at time when it is possible to initialize default state.
boost::signal< void()> signal_postInitialize
 Signal emitted at the end of the initialization function.
boost::signal< void(DtDe &)> signal_preTick
 Signal emitted at the beginning of the tick function.
boost::signal< void()> signal_postTick
 Signal emitted at the end of the tick function.
boost::signal< void(const
std::string &, const
std::string &)> 
signal_displayConfigurationRealized
 Emitted when a Display Engine is told to realize a display configuration.
boost::signal< void(const
DtDisplayConfiguration &)> 
signal_displayConfigurationAdded
 Emitted when a display is added.
boost::signal< void(const
std::string &)> 
signal_displayToBeDestroyed
 Emitted when a display is removed.
boost::signal< void(const
std::string &, const
DtDisplayConfiguration &)> 
signal_displayModified
 Emitted when a display is modified.
boost::signal< void(const
std::string &, const
DtWindowConfiguration &)> 
signal_windowConfigurationAdded
 Emitted when a window is added.
boost::signal< void(const
std::string &, const
std::string &)> 
signal_windowConfigurationToBeDestroyed
 Emitted when a window is destroyed.
boost::signal< void(const
std::string &, const
std::string &, const
DtWindowConfiguration &)> 
signal_windowConfigurationModified
 Emitted when an realized window is modified.
boost::signal< void(const
std::string &, const
std::string &, const
DtChannelConfiguration &)> 
signal_channelConfigurationAdded
 Emitted when a channel is added.
boost::signal< void(const
std::string &, const
std::string &, const
std::string &)> 
signal_channelToBeDestroyed
 Signal is emitted, then the channel is destroyed.
boost::signal< void(const
std::string &, const
std::string &, const
std::string &, const
DtChannelConfiguration &)> 
signal_channelConfigurationModified
 Emitted when a channel is modified.
boost::signal< void(const
DtDeError &error, bool
critical)> 
signal_deError
 Listen to this signal for Display Engine errors.
boost::signal< void()> signal_quit
 Signal emitted by the quit method.

Protected Types

enum  LicenseTypes { NoLicense = -1, Master3D_License = 0, XR_License = 1, PVD_License = 2 }
typedef std::vector< void * > InitFunctionVector
 This vector stores the address of registered init functions.
typedef std::map< std::string,
DtVirtualBaseClass * > 
RootedSingletonMap
typedef std::map
< StaticInstanceFunction,
DtVirtualBaseClass * > 
FastRootedSingletonMap
typedef std::map< std::string,
DtDisplayProxyWP
DisplayEngineProxyMap

Protected Member Functions

void slaveTick ()
void masterTick (double simulationTime)
void renderTick ()
 Update the scene and render.
DtDeProctorproctor ()
 Get the proctor.
virtual bool local_realizeDisplayConfiguration (const std::string &clientName, const std::string &displayName)
 Attempt to realize a display configuration.
virtual void local_destroyDisplay (const std::string &displayName)
 Remove a display.
virtual bool local_modifyDisplay (const std::string &displayName, const DtDisplayConfiguration &config)
 Modify a display.
void createDisplay (DtDisplayConfiguration &)
 create the display engine.
void createIgCommunicator (DtDriverConfiguration &config)
 Create the Display Engine Driver.
void destroyDisplay ()
 Destroy the display.
bool local_addDisplayConfiguration (const DtDisplayConfiguration &dec)
 Internal implementation of adding a display.
Protected methods
virtual unsigned int countEmbeddedWindows (const DtDisplayConfiguration &dec)
 Count the number of embedded windows in the display configuration.
Initialization helper functions
virtual void initializeSchemaManager ()
virtual void initializeLibXmlIfNecessary ()
virtual bool shouldSkipThisTick (double simulationTime)
 Check whether the DtDe should skip this tick to maintain a fixed frame rate.
virtual void postInitialize ()
 Connect initialized components and call postInit signal.
virtual void postInitializeMaster ()
 Master-only post initialize code.
virtual void checkForData ()
 Check that the data package is installed, and emit an error if not.

Protected Attributes

RootedSingletonMap myRootedSingletonMap
FastRootedSingletonMap myFastRootedSingletonMap
DtDeInitializer myInitializer
DtDePathConfiguration myPathConfiguration
bool myStopFlag
bool myInitializeFlag
double mySimulationTime
double myNextFixedTime
DtDebugLog myDebugLog
DtDeConfiguration myConfiguration
DtMainEventQueue myMainEventQueue
DtDisplaymyDisplayEngine
DtDeCommunicatormyCommunicator
DtMessageDispatchermyDispatcher
DtDeProctormyIgProctor
DtDriverManagermyDriverManager
DtAgentManagermyAgentManager
DisplayEngineProxyMap myDisplayProxies
DtDeSharedStatemyDeSharedState
DtDataBankmyDataBank
DtSchemaManagermySchemaManager
InitFunctionVector myRegisteredInitFunctions
void * myRegInitFunction
DtFileCachemyFileCache
DeErrors myIgErrors
DtRenderermyRenderer
bool mySceneNeedsUpdateFlag
bool myDestructionFlag
bool myInTickFlag
std::string myLastInstanceName
RootedSingletonMap::const_iterator myLastInstance
DtThreadId myThreadId
DtClockmySimulationClock
DtSynchronizedTimeManagermySynchronizedTimeManager
LicenseTypes myLicenseType
float myPagedLodMagnificationScaleFactor
float myPagedLodMagnificationHighLodAngle

Static Protected Attributes

static const charmyClassName

Friends

class DtDeProctor

Local Functions

typedef DtVirtualBaseClass &(* StaticInstanceFunction )(DtDe &)
 Define the static instance function type for fast instance lookup.
virtual void setSimulationTime (double time)
 Set the simulation time.
virtual double systemTime () const
 Used in special cases of absolute time stamping, this will return absolute wall clock time from the DtClock.
virtual DtVirtualBaseClassfindFastInstance (StaticInstanceFunction classInstanceFunction) const
 Find an instance with the given name.
template<typename Class >
DtVirtualBaseClassfindFastInstance (Class &(*staticInstFunc)(DtDe &)) const
 The instance key is always return the subclass of the virtual base class, since it returns a reference (aka a pointer) it is safe to cast the function pointer.
virtual void registerFastInstance (StaticInstanceFunction classInstanceFunction, DtVirtualBaseClass *inst)
 Register a fast instance, if the inst is a null pointer the instance key is removed.
template<typename Class >
void registerFastInstance (Class &(*staticInstFunc)(DtDe &), DtVirtualBaseClass *inst)
 The instance key is always return the subclass of the virtual base class, since it returns a reference (aka a pointer) it is safe to cast the function pointer.
virtual DtVirtualBaseClassfindInstance (const std::string &instanceName) const
 Find an instance with the given name.
virtual void registerInstance (const std::string &instanceName, DtVirtualBaseClass *instance)
 Register an instance with a given name for later retrieval.
virtual void registerProctor (unsigned short handlerId, DtProctor *)
 Register an proctor object.
virtual void unregisterProctor (unsigned short handlerId)
 Unregister a handler This should be called before the handler is deallocated.
DtProctorfindProctor (unsigned short handlerId) const
 Find a handler.
DtDisplayProxySP findDisplay (const std::string &displayName)
 Find a Display by name.
virtual DtDisplayProxySP findDisplayByIndex (int index)
 Get the display by index.
void setRenderFrameThisTick (bool update)
 Sets that the frame will be rendered this tick.
virtual bool isValidDisplayConfiguration (const DtDisplayConfiguration &dec)
 Returns true if the display configuration is valid and can be realized.

Detailed Description

The DtDe is the core component of any VR-Vantage application.

It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.

Member Typedef Documentation

typedef std::vector<std::pair<DtDeError,bool> > makVrv::DtDe::DeErrors

Typedef of a vector of error/critical.

typedef DtVirtualBaseClass&(* makVrv::DtDe::StaticInstanceFunction)(DtDe &)

Define the static instance function type for fast instance lookup.

typedef std::vector<void*> makVrv::DtDe::InitFunctionVector
protected

This vector stores the address of registered init functions.

typedef std::map<std::string,DtVirtualBaseClass*> makVrv::DtDe::RootedSingletonMap
protected
typedef std::map<std::string,DtDisplayProxyWP> makVrv::DtDe::DisplayEngineProxyMap
protected

Member Enumeration Documentation

Result codes for the initialize() function.

Enumerator:
Initialized 
UnableToInitialize 
UnableToInitializeDueToLicense 
Enumerator:
NoLicense 
Master3D_License 
XR_License 
PVD_License 

Constructor & Destructor Documentation

makVrv::DtDe::DtDe ( )

CTOR.

virtual makVrv::DtDe::~DtDe ( )
virtual

DTOR occur after the subclass of DtDe has been called.

Member Function Documentation

bool makVrv::DtDe::destructing ( )

Get if the Display Engine is in the process of destructing (typically steps like disconnecting signals is unnecessary).

During destruction members will become invalid.

virtual void makVrv::DtDe::setDeInitializer ( const DtDeInitializer initializer)
virtual

Set the Display Engine initializer used to initialize the Display Engine.

This call will do nothing if the Display Engine is already initialized. Also sets the DtDePathConfiguration and DtDeConfiguration from the initializer

virtual void makVrv::DtDe::setPathConfiguration ( const DtDePathConfiguration pathConfig)
virtual

Set the path configuration for an uninitialized Display Engine.

This call will do nothing if the Display Engine is already initialized. Note: setDeInitializer will override the path configuration with the initializer's path configuration

virtual InitializationResult makVrv::DtDe::initialize ( bool  abortOnLicenseFailure = true,
bool  useLicenseErrorDialog = true 
)
virtual

Initialize the application prior to running it.

It is required that this function be called prior to a call to run. If the default DtDe::run is not used, and rather tick is called repeatedly, it is still required that this function get called. Note that the Display Engine must run in the thread that calls initialize. If useLicenseErrorDialog is true and the appropriate DLLs have been included, failure to check out a VR-Vantage license will cause a dialog to be raised requesting licensing information. (this may still ultimately result in not finding a license). If abortOnLicenseFailure is true, the application will exit on license failure. Set this to false to utilize the InitializationResult return value.

Reimplemented in DtGuiOnlyDe.

bool makVrv::DtDe::initialized ( ) const

Get whether the application is initialized.

Referenced by makVrv::defaultManagerInstanceFunction().

DtThreadId makVrv::DtDe::threadId ( )

Get the thread id that the Display Engine was initialized in and must rung in.

Exceptions
DtCorruptedStateif called before initialized.
virtual void makVrv::DtDe::setDeConfiguration ( const DtDeConfiguration deConfig)
virtual

Set the de configuration.

This call is only valid BEFORE calls to initialize. Note: setDeInitializer will override the de configuration with the initializer's de configuration Throws DtCorruptsState if the Display Engine has already been initialized.

virtual void makVrv::DtDe::tick ( double  simTime)
virtual

A very important function which provides a since tick of execution which is required for the app to run for one 'logical' frame.

This function must be called repeatedly typically as often as possible.

Exceptions
DtCorruptedStateif called before the Display Engine is initialized.
Parameters
Input
simTimeis the simulation time of the 'update cycle'. Typically this is the amount of time in seconds since the DtDe was started (to get real time behavior).

Reimplemented in DtGuiOnlyDe, and makVrf::DtVrfDe.

void makVrv::DtDe::retick ( )
inline

Retick is a helper function for simply ticking using the current Simulation time.

This may be necessary if performing multiple 'passes' over the same time.

virtual bool makVrv::DtDe::timeToStop ( ) const
virtual

Method for checking to see if the app should stop ticking.

This works only with the defaultRun function, unless explicitly used in the alternate run function's implementation.

virtual void makVrv::DtDe::setTimeToStop ( bool  flag = true)
virtual

Set whether it is time to stop ticking.

virtual void makVrv::DtDe::quit ( )
virtual

Call this method to quit and exit the application.

Reimplemented in makVrf::DtVrfDe.

virtual void makVrv::DtDe::reset ( )
virtual

Resets DtIG to a pre-configured state.

void makVrv::DtDe::updateScene ( )

Update the scene if it needs to be updated.

virtual const DtDeConfiguration& makVrv::DtDe::deConfiguration ( ) const
virtual

DtDeConfiguration accessor.

virtual DtDeCommunicator& makVrv::DtDe::igCommunicator ( )
virtual

DtDeCommunicator accessor.

Exceptions
DtCorruptedStateif called before the Display Engine is initialized.
DtMainEventQueue& makVrv::DtDe::mainEventQueue ( )
virtual DtDisplay* makVrv::DtDe::display ( )
virtual

DtDisplay accessor.

The returned pointer will be NULL before initialize is called, and may be null after.

virtual DtScene& makVrv::DtDe::scene ( )
virtual

The DtScene accessor.

Warning
The scene is not available on Slave Display Engine instances.
Exceptions
DtCorruptedStateif called before the Display Engine is initialized.
DtCorruptedStateif the Display Engine is configured to be a slave.

Referenced by makVrf::DtDisabledEnvironment::getEnvironmentNames().

virtual DtDataBank& makVrv::DtDe::dataBank ( )
virtual

The DtDataBank accessor.

Warning
The DtDataBank is not available on Slave Display Engine instances.
Exceptions
DtCorruptedStateif the Display Engine is configured to be a slave.

Referenced by makVrv::DtSimObjectEntryCollection< T >::DtSimObjectEntryCollection(), and makVrv::DtStateViewCollection< T >::DtStateViewCollection().

virtual DtDriverManager& makVrv::DtDe::driverManager ( )
virtual

The DtMasterScene accessor.

The function will throw before the initialize function is called.

Exceptions
DtCorruptedStateif called before the Display Engine is initialized.
bool makVrv::DtDe::driverManagerCreated ( ) const

You can call this method to see if the DtDriverManager exists.

virtual DtMessageDispatcher& makVrv::DtDe::dispatcher ( )
virtual
DtDebugLog& makVrv::DtDe::log ( )
inline

Inline access for the debug log object.

DtAgentManager& makVrv::DtDe::agentManager ( )

Get the scene manager.

Exceptions
DtCorruptedStateif called before the Display Engine is initialized.

Referenced by makVrv::Cast< DesiredType >::toFunctionType().

bool makVrv::DtDe::agentManagerCreated ( ) const

You can call this method to see if the DtAgentManager exists.

virtual double makVrv::DtDe::simulationTime ( ) const
virtual

Get the simulation time.

virtual double makVrv::DtDe::syncedTime ( ) const
virtual

Get the simulation time or the synced NTP time (if the –hasNTPSync / -O flag has been set) Currently this method is used to synchronize triton ocean and speedtree.

virtual DtSynchronizedTimeManager* makVrv::DtDe::findSynchronizedTimeManager ( )
virtual

The DtSynchronizedTimeManager manages synchronized time when used.

The accessor to it makes it possible to use the sync time manager's API, which allows for time scaling and a time offset. These are not used in VR-Vantage

virtual int makVrv::DtDe::displayCount ( ) const
virtual

Get the display count.

virtual const DtDeInitializer& makVrv::DtDe::deInitializer ( ) const
virtual
virtual const DtDePathConfiguration& makVrv::DtDe::dePathConfiguration ( ) const
virtual

Return the DtDePathConfiguration.

virtual bool makVrv::DtDe::isInMasterMode ( ) const
virtual

Returns true if the DtDe is in master mode.

virtual bool makVrv::DtDe::isInSlaveMode ( ) const
virtual

Returns true if the DtDe is in slave mode.

Referenced by makVrv::defaultManagerInstanceFunction().

virtual DtDeSharedState& makVrv::DtDe::sharedState ( )
virtual

Returns the DtDeSharedState object.

virtual const DtSchemaManager& makVrv::DtDe::schemaManager ( ) const
virtual

DtSchemaManager accessor.

Exceptions
DtCorruptedStateif called before the DtDe is initialized.
virtual DtSchemaManager& makVrv::DtDe::schemaManager ( )
virtual
virtual DtFileCache* makVrv::DtDe::fileCache ( )
virtual

Returns DtFileCache.

virtual const DeErrors& makVrv::DtDe::deErrors ( ) const
virtual

Returns myIgErrors.

virtual void makVrv::DtDe::clearDeErrors ( )
virtual

Clears myIgErrors.

virtual DtRenderer& makVrv::DtDe::renderer ( ) const
virtual

Get the renderer.

bool makVrv::DtDe::renderFrameThisTick ( ) const

Gets if we will render this frame.

virtual bool makVrv::DtDe::licenseAvailable ( ) const
virtual

Gets if a license can be found to run with the features specified in the DtDeInitializer.

Therefore this must be called AFTER SetDeInitializer to get the correct result

virtual bool makVrv::DtDe::addDisplayConfiguration ( const DtDisplayConfiguration )
virtual

Add a new display, if the display engine matches the local name then the de display engine is realized.

This function should not be called before the display engine is initialized

virtual void makVrv::DtDe::realizeDisplayConfiguration ( const std::string &  clientName,
const std::string &  displayName 
)
virtual

Make a client realize a display configuration.

Parameters
Input
clientNameis the name of the client, this is queriable from the master DtDe's client list.
displayNameis the name of the display configuration to realize.
Warning
A configuration with the given name must be added before making this call.
Exceptions
DtInvalidInputif no client has the clientName or if no configuration has the displayName.
virtual void makVrv::DtDe::destroyDisplay ( DtDisplayProxySP  display)
virtual

Remove a display.

The proxy will be invalid after this call, and can not be used.

virtual void makVrv::DtDe::destroyDisplay ( const std::string &  displayName)
virtual

Remove a display.

If the display matches the local name then the de display is destroyed.

virtual void makVrv::DtDe::destroyAllDisplays ( )
virtual

Removes all display.

virtual bool makVrv::DtDe::modifyDisplay ( const std::string &  displayName,
const DtDisplayConfiguration config 
)
virtual

Modify a display.

virtual void makVrv::DtDe::setSimulationTime ( double  time)
virtual

Set the simulation time.

Warning
This function also sets the random number seed.

Reimplemented in makVrf::DtVrfDe.

virtual double makVrv::DtDe::systemTime ( ) const
virtual

Used in special cases of absolute time stamping, this will return absolute wall clock time from the DtClock.

This might or might not be the same time as the simulationTime

virtual DtVirtualBaseClass* makVrv::DtDe::findFastInstance ( StaticInstanceFunction  classInstanceFunction) const
virtual

Find an instance with the given name.

If no instance is found than a null pointer is returned.

Referenced by makVrv::defaultManagerInstanceFunction().

template<typename Class >
DtVirtualBaseClass* makVrv::DtDe::findFastInstance ( Class &(*)(DtDe &)  staticInstFunc) const
inline

The instance key is always return the subclass of the virtual base class, since it returns a reference (aka a pointer) it is safe to cast the function pointer.

virtual void makVrv::DtDe::registerFastInstance ( StaticInstanceFunction  classInstanceFunction,
DtVirtualBaseClass inst 
)
virtual

Register a fast instance, if the inst is a null pointer the instance key is removed.

template<typename Class >
void makVrv::DtDe::registerFastInstance ( Class &(*)(DtDe &)  staticInstFunc,
DtVirtualBaseClass inst 
)
inline

The instance key is always return the subclass of the virtual base class, since it returns a reference (aka a pointer) it is safe to cast the function pointer.

virtual DtVirtualBaseClass* makVrv::DtDe::findInstance ( const std::string &  instanceName) const
virtual

Find an instance with the given name.

If no instance is found than a null pointer is returned.

Referenced by makVrv::DtSubjectAnnouncer< T >::findInstance(), and makVrv::DtVirtualBaseClassCreator< T >::instance().

virtual void makVrv::DtDe::registerInstance ( const std::string &  instanceName,
DtVirtualBaseClass instance 
)
virtual

Register an instance with a given name for later retrieval.

Once registered, the DtDe takes ownership and manages the lifetime of the instance. Ownership cannot be transfered back from the DtDe. Registering a new instance under an existing name will cause the existing instance to be destroyed. Registering a NULL instance under an existing name will cause the existing instance to be destroyed. Because the DtDe manages the lifetime of the registered instances, do not save handles to any instance as they can be destroyed without notice.

Referenced by makVrv::DtSubjectAnnouncer< T >::findInstance(), and makVrv::DtVirtualBaseClassCreator< T >::instance().

virtual void makVrv::DtDe::registerProctor ( unsigned short  handlerId,
DtProctor  
)
virtual

Register an proctor object.

virtual void makVrv::DtDe::unregisterProctor ( unsigned short  handlerId)
virtual

Unregister a handler This should be called before the handler is deallocated.

DtProctor* makVrv::DtDe::findProctor ( unsigned short  handlerId) const

Find a handler.

DtDisplayProxySP makVrv::DtDe::findDisplay ( const std::string &  displayName)

Find a Display by name.

Exceptions
DtCorruptedStateif proxy is invalid.
virtual DtDisplayProxySP makVrv::DtDe::findDisplayByIndex ( int  index)
virtual

Get the display by index.

void makVrv::DtDe::setRenderFrameThisTick ( bool  update)

Sets that the frame will be rendered this tick.

virtual bool makVrv::DtDe::isValidDisplayConfiguration ( const DtDisplayConfiguration dec)
virtual

Returns true if the display configuration is valid and can be realized.

virtual void makVrv::DtDe::onSlaveConnected ( const std::string &  igName)
virtual

Called when a client is added.

virtual void makVrv::DtDe::emitDeError ( const DtDeError error,
bool  criticalError 
)
virtual

Called when an error is emitted.

static const char* makVrv::DtDe::className ( )
static

Returns the name of this class.

Required for DtSubjectAnnouncer::findInstance().

void makVrv::DtDe::registerInitFunction ( void *  address)

Register address of init function so DtDe instance knows that module was already instanced.

bool makVrv::DtDe::isInitFunctionRegistered ( void *  address)

Returns true if init function has already been registered.

bool makVrv::DtDe::shouldSendMesssage ( )
inline

Helper function used to check if a message needs to be created and sent.

void makVrv::DtDe::setPagedLodMagnificationScaleFactor ( float  factor)
inline
float makVrv::DtDe::pagedLodMagnificationScaleFactor ( ) const
inline
virtual unsigned int makVrv::DtDe::countEmbeddedWindows ( const DtDisplayConfiguration dec)
protectedvirtual

Count the number of embedded windows in the display configuration.

virtual void makVrv::DtDe::initializeSchemaManager ( )
protectedvirtual

Reimplemented in makVrf::DtVrfDe.

virtual void makVrv::DtDe::initializeLibXmlIfNecessary ( )
protectedvirtual
virtual bool makVrv::DtDe::shouldSkipThisTick ( double  simulationTime)
protectedvirtual

Check whether the DtDe should skip this tick to maintain a fixed frame rate.

virtual void makVrv::DtDe::postInitialize ( )
protectedvirtual

Connect initialized components and call postInit signal.

Reimplemented in DtGuiOnlyDe, DtVrfDe, and DtEditingWindowDe.

virtual void makVrv::DtDe::postInitializeMaster ( )
protectedvirtual

Master-only post initialize code.

virtual void makVrv::DtDe::checkForData ( )
protectedvirtual

Check that the data package is installed, and emit an error if not.

void makVrv::DtDe::slaveTick ( )
protected
void makVrv::DtDe::masterTick ( double  simulationTime)
protected
void makVrv::DtDe::renderTick ( )
protected

Update the scene and render.

DtDeProctor* makVrv::DtDe::proctor ( )
protected

Get the proctor.

virtual bool makVrv::DtDe::local_realizeDisplayConfiguration ( const std::string &  clientName,
const std::string &  displayName 
)
protectedvirtual

Attempt to realize a display configuration.

virtual void makVrv::DtDe::local_destroyDisplay ( const std::string &  displayName)
protectedvirtual

Remove a display.

If the display matches the local name then the de display is destroyed.

virtual bool makVrv::DtDe::local_modifyDisplay ( const std::string &  displayName,
const DtDisplayConfiguration config 
)
protectedvirtual

Modify a display.

void makVrv::DtDe::createDisplay ( DtDisplayConfiguration )
protected

create the display engine.

void makVrv::DtDe::createIgCommunicator ( DtDriverConfiguration config)
protected

Create the Display Engine Driver.

void makVrv::DtDe::destroyDisplay ( )
protected

Destroy the display.

bool makVrv::DtDe::local_addDisplayConfiguration ( const DtDisplayConfiguration dec)
protected

Internal implementation of adding a display.

Friends And Related Function Documentation

friend class DtDeProctor
friend

Member Data Documentation

boost::signal<void ()> makVrv::DtDe::signal_initializeDefaultState

Signal emitted during initialization at at time when it is possible to initialize default state.

The De will not be initialized, also other objects may not exist. Typically it is only safe for an object to connect to this signal to initialize itself often from a file on disk.

boost::signal<void ()> makVrv::DtDe::signal_postInitialize

Signal emitted at the end of the initialization function.

This is useful for executing code after the Display Engine is initialized, but before it starts running. Such as updating values from settings objects since they cannot be accessed during initialization.

boost::signal<void (DtDe&)> makVrv::DtDe::signal_preTick

Signal emitted at the beginning of the tick function.

This is useful for executing code before the Display Engine does anything during its tick. Sometimes there is code which is necessary for multiplexing the Display Engine aka setting the Display Engine by a temporal pattern since multiple IGs may not tick at the same time.

boost::signal<void ()> makVrv::DtDe::signal_postTick

Signal emitted at the end of the tick function.

This is useful for executing code after the Display Engine does everything during its tick. Sometimes there is code which is necessary for multiplexing the Display Engine aka setting the Display Engine by a temporal pattern since multiple IGs may not tick at the same time.

boost::signal<void (const std::string&, const std::string&)> makVrv::DtDe::signal_displayConfigurationRealized

Emitted when a Display Engine is told to realize a display configuration.

Signal with the name of the Display Engine, and the name of the Display realized.

boost::signal<void (const DtDisplayConfiguration&)> makVrv::DtDe::signal_displayConfigurationAdded

Emitted when a display is added.

Signal with a const DtDisplayConfiguration& argument and a void return value.

boost::signal<void (const std::string&)> makVrv::DtDe::signal_displayToBeDestroyed

Emitted when a display is removed.

The signal is emitted then the configuration is destroyed. Signal with a const std::string& argument and a void return value.

boost::signal<void (const std::string&, const DtDisplayConfiguration&)> makVrv::DtDe::signal_displayModified

Emitted when a display is modified.

Signal with display engine name and display configuration argument and a void return value.

boost::signal<void (const std::string&, const DtWindowConfiguration&)> makVrv::DtDe::signal_windowConfigurationAdded

Emitted when a window is added.

Signal with a display engine name and DtViewConfiguration argument and a void return value.

boost::signal<void (const std::string&, const std::string&)> makVrv::DtDe::signal_windowConfigurationToBeDestroyed

Emitted when a window is destroyed.

The signal is emitted then the configuration is destroyed. Signal with a display engine name and a window name argument and a void return value.

boost::signal<void (const std::string&, const std::string&, const DtWindowConfiguration&)> makVrv::DtDe::signal_windowConfigurationModified

Emitted when an realized window is modified.

Signal with a display engine name and a window name and window config argument and a void return value.

boost::signal<void (const std::string&, const std::string&, const DtChannelConfiguration&)> makVrv::DtDe::signal_channelConfigurationAdded

Emitted when a channel is added.

Signal with a display engine name, window name and DtChannelConfiguration argument and a void return value.

boost::signal<void (const std::string&, const std::string&, const std::string&)> makVrv::DtDe::signal_channelToBeDestroyed

Signal is emitted, then the channel is destroyed.

Signal with a display engine name,window name and channel name arguments and a void return value.

boost::signal<void (const std::string&, const std::string&, const std::string&, const DtChannelConfiguration&)> makVrv::DtDe::signal_channelConfigurationModified

Emitted when a channel is modified.

Signal with a display engine name, window name , old channel name and DtChannelConfiguration argument and a void return value.

boost::signal<void (const DtDeError& error, bool critical)> makVrv::DtDe::signal_deError

Listen to this signal for Display Engine errors.

DO NOT EMIT using this signal. Emit using the emit function below.

boost::signal<void ()> makVrv::DtDe::signal_quit

Signal emitted by the quit method.

Applications should listen for this signal and respond appropriately.

const char* makVrv::DtDe::myClassName
staticprotected
RootedSingletonMap makVrv::DtDe::myRootedSingletonMap
protected
FastRootedSingletonMap makVrv::DtDe::myFastRootedSingletonMap
protected
DtDeInitializer makVrv::DtDe::myInitializer
protected
DtDePathConfiguration makVrv::DtDe::myPathConfiguration
protected
bool makVrv::DtDe::myStopFlag
protected
bool makVrv::DtDe::myInitializeFlag
protected
double makVrv::DtDe::mySimulationTime
protected
double makVrv::DtDe::myNextFixedTime
protected
DtDebugLog makVrv::DtDe::myDebugLog
protected
DtDeConfiguration makVrv::DtDe::myConfiguration
protected
DtMainEventQueue makVrv::DtDe::myMainEventQueue
protected
DtDisplay* makVrv::DtDe::myDisplayEngine
protected
DtDeCommunicator* makVrv::DtDe::myCommunicator
protected
DtMessageDispatcher* makVrv::DtDe::myDispatcher
protected
DtDeProctor* makVrv::DtDe::myIgProctor
protected
DtDriverManager* makVrv::DtDe::myDriverManager
protected
DtAgentManager* makVrv::DtDe::myAgentManager
protected
DisplayEngineProxyMap makVrv::DtDe::myDisplayProxies
protected
DtDeSharedState* makVrv::DtDe::myDeSharedState
protected
DtDataBank* makVrv::DtDe::myDataBank
protected
DtSchemaManager* makVrv::DtDe::mySchemaManager
protected
InitFunctionVector makVrv::DtDe::myRegisteredInitFunctions
protected
void* makVrv::DtDe::myRegInitFunction
protected
DtFileCache* makVrv::DtDe::myFileCache
protected
DeErrors makVrv::DtDe::myIgErrors
protected
DtRenderer* makVrv::DtDe::myRenderer
protected
bool makVrv::DtDe::mySceneNeedsUpdateFlag
protected
bool makVrv::DtDe::myDestructionFlag
protected
bool makVrv::DtDe::myInTickFlag
protected
std::string makVrv::DtDe::myLastInstanceName
mutableprotected
RootedSingletonMap::const_iterator makVrv::DtDe::myLastInstance
mutableprotected
DtThreadId makVrv::DtDe::myThreadId
protected
DtClock* makVrv::DtDe::mySimulationClock
protected
DtSynchronizedTimeManager* makVrv::DtDe::mySynchronizedTimeManager
protected
LicenseTypes makVrv::DtDe::myLicenseType
protected
float makVrv::DtDe::myPagedLodMagnificationScaleFactor
protected
float makVrv::DtDe::myPagedLodMagnificationHighLodAngle
protected

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

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)