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 | 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. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.

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

Public Types

enum  RenderingApiType { RenderingApiType::None, RenderingApiType::OpenGL }
 
enum  InitializationResult { Initialized = 1, UnableToInitialize = 0, UnableToInitializeDueToLicense = -1 }
 
typedef std::vector< std::pair
< DtDeError, bool > > 
DeErrors
 

Public Member Functions

 DtDe ()
 
virtual ~DtDe ()
 
bool destructing ()
 
bool resetting ()
 
virtual void setDeInitializer (const DtDeInitializer &initializer)
 
virtual void setPathConfiguration (const DtDePathConfiguration &pathConfig)
 
virtual InitializationResult initialize (bool abortOnLicenseFailure=true, bool useLicenseErrorDialog=true)
 
bool initialized () const
 
DtThreadId threadId ()
 
virtual void setDeConfiguration (const DtDeConfiguration &deConfig)
 
virtual void tick (double simTime)
 
void retick ()
 
virtual bool timeToStop () const
 
virtual void setTimeToStop (bool flag=true)
 
virtual void quit ()
 
virtual void reset ()
 
virtual void updateScene ()
 
void registerInitFunction (void *address)
 
bool isInitFunctionRegistered (void *address)
 
bool shouldSendMesssage ()
 
virtual void setTargetFrameTime (double frameTimeInMs)
 
virtual double targetFrameTime ()
 
virtual void startProfilerNextFrame ()
 
virtual void stopProfilerNextFrame ()
 
virtual double lastUpdateTime () const
 
virtual void setShowErrorDialogs (bool show)
 
virtual bool showErrorDialogs () const
 
virtual void setRenderingApi (DtDe::RenderingApiType type)
 
virtual DtDe::RenderingApiType renderingApi () const
 
Accessors
virtual const DtDeConfigurationdeConfiguration () const
 
virtual DtDeCommunicatorigCommunicator ()
 
DtMainEventQueuemainEventQueue ()
 
virtual DtDisplaydisplay ()
 
virtual DtScenescene ()
 
virtual DtDataBankdataBank ()
 
virtual DtDriverManagerdriverManager ()
 
bool driverManagerCreated () const
 
virtual DtMessageDispatcherdispatcher ()
 
DtDebugLoglog ()
 
DtAgentManageragentManager ()
 
DtBackgroundLoaderbackgroundLoader ()
 
virtual double simulationTime () const
 
virtual double syncedTime () const
 
virtual DtSynchronizedTimeManagerfindSynchronizedTimeManager ()
 
virtual int displayCount () const
 
virtual const DtDeInitializerdeInitializer () const
 
virtual const
DtDePathConfiguration
dePathConfiguration () const
 
virtual bool isInMasterMode () const
 
virtual bool isInSlaveMode () const
 
virtual DtDeSharedStatesharedState ()
 
virtual const DtDeSharedStatesharedState () const
 
virtual const DtDeSharedState
*const 
sharedStatePtr () const
 
virtual const DtSchemaManagerfindSchemaManager () const
 
virtual DtSchemaManagerfindSchemaManager ()
 
virtual DtFileCachefileCache ()
 
virtual const DeErrors deErrors () const
 
virtual void clearDeErrors ()
 
virtual DtRendererrenderer () const
 
bool renderFrameThisTick () const
 
virtual bool licenseAvailable () const
 
virtual DtDrawnIntersectorManagerdrawnIntersectorManager ()
 
virtual const
DtDrawnIntersectorManager
drawnIntersectorManager () const
 
Distributed Functions
virtual bool addDisplayConfiguration (const DtDisplayConfiguration &)
 
virtual void realizeDisplayConfiguration (const std::string &clientName, const std::string &displayName)
 
virtual void destroyDisplay (DtDisplayProxySP display)
 
virtual void destroyDisplay (const std::string &displayName)
 
virtual void destroyAllDisplays ()
 
virtual bool modifyDisplay (const std::string &displayName, const DtDisplayConfiguration &config)
 
Slots
virtual void onSlaveConnected (const std::string &igName)
 
virtual void emitDeError (const DtDeError &error, bool criticalError)
 

Static Public Member Functions

static const charclassName ()
 

Public Attributes

Signals
boost::signalslib::signal< void()> signal_initializeDefaultState
 
boost::signalslib::signal< void()> signal_postInitialize
 
boost::signalslib::signal
< void(DtDe &)> 
signal_preTick
 
boost::signalslib::signal< void()> signal_postTick
 
boost::signalslib::signal
< void(const std::string
&, const std::string &)> 
signal_displayConfigurationRealized
 
boost::signalslib::signal
< void(const
DtDisplayConfiguration &)> 
signal_displayConfigurationAdded
 
boost::signalslib::signal
< void(const std::string &)> 
signal_displayToBeDestroyed
 
boost::signalslib::signal
< void(const std::string
&, const
DtDisplayConfiguration &)> 
signal_displayModified
 
boost::signalslib::signal
< void(const std::string
&, const DtWindowConfiguration &)> 
signal_windowConfigurationAdded
 
boost::signalslib::signal
< void(const std::string
&, const std::string &)> 
signal_windowConfigurationToBeDestroyed
 
boost::signalslib::signal
< void(const std::string
&, const std::string &, const
DtWindowConfiguration &)> 
signal_windowConfigurationModified
 
boost::signalslib::signal
< void(const std::string
&, const std::string &, const
DtChannelConfiguration &)> 
signal_channelConfigurationAdded
 
boost::signalslib::signal
< void(const std::string
&, const std::string &, const
std::string &)> 
signal_channelToBeDestroyed
 
boost::signalslib::signal
< void(const std::string
&, const std::string &, const
std::string &, const
DtChannelConfiguration &)> 
signal_channelConfigurationModified
 
boost::signalslib::signal< void()> signal_postMainWindowInitialize
 
boost::signalslib::signal
< void(const DtDeError &error,
bool critical)> 
signal_deError
 
boost::signalslib::signal< void()> signal_quit
 
boost::signalslib::signal< void()> signal_pause
 
boost::signalslib::signal< void()> signal_resume
 
boost::signalslib::signal< void()> signal_aboutToAutoStartDrivers
 

Protected Types

enum  LicenseTypes { NoLicense = -1, Master3D_License = 0, XR_License = 1, PVD_License = 2 }
 
typedef std::vector< void * > InitFunctionVector
 
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 (double elapsedTime)
 
DtDeProctorproctor ()
 
virtual bool local_realizeDisplayConfiguration (const std::string &clientName, const std::string &displayName)
 
virtual void local_destroyDisplay (const std::string &displayName)
 
virtual bool local_modifyDisplay (const std::string &displayName, const DtDisplayConfiguration &config)
 
void createDisplay (DtDisplayConfiguration &)
 
void createIgCommunicator (DtDriverConfiguration &config)
 
void destroyDisplay ()
 
bool local_addDisplayConfiguration (const DtDisplayConfiguration &dec)
 
virtual void intializeStatsManager (void)
 
Protected methods
virtual unsigned int countEmbeddedWindows (const DtDisplayConfiguration &dec)
 
Initialization helper functions
virtual void initializeSchemaManager ()
 
virtual void initializeLibXmlIfNecessary ()
 
virtual bool shouldSkipThisTick (double simulationTime)
 
virtual void postInitialize ()
 
virtual void postInitializeMaster ()
 
virtual void checkForData ()
 

Protected Attributes

RootedSingletonMap myRootedSingletonMap
 
FastRootedSingletonMap myFastRootedSingletonMap
 
DtDeInitializer myInitializer
 
DtDePathConfiguration myPathConfiguration
 
bool myStopFlag
 
bool myInitializeFlag
 
double mySimulationTime
 
unsigned int myCurrentFrameNumber
 
double myNextFixedTime
 
DtDebugLogmyDebugLog
 
DtDeConfiguration myConfiguration
 
DtMainEventQueue myMainEventQueue
 
DtDisplaymyDisplayEngine
 
DtDeCommunicatormyCommunicator
 
DtMessageDispatchermyDispatcher
 
DtDeProctormyIgProctor
 
DtDriverManagermyDriverManager
 
DtAgentManagermyAgentManager
 
DisplayEngineProxyMap myDisplayProxies
 
DtDeSharedStatemyDeSharedState
 
DtDataBankmyDataBank
 
DtSchemaManagermySchemaManager
 
DtBackgroundLoadermyBackgroundLoader
 
InitFunctionVector myRegisteredInitFunctions
 
void * myRegInitFunction
 
DtFileCachemyFileCache
 
DeErrors myIgErrors
 
DtRenderermyRenderer
 
bool mySceneNeedsUpdateFlag
 
bool myDestructionFlag
 
bool myInTickFlag
 
std::vector< boolmyActiveModelSets
 
std::string myLastInstanceName
 
RootedSingletonMap::const_iterator myLastInstance
 
tbb::mutex myInternalDataMutex
 
tbb::recursive_mutex myErrorMutex
 
DtThreadId myThreadId
 
DtClockmySimulationClock
 
DtSynchronizedTimeManagermySynchronizedTimeManager
 
LicenseTypes myLicenseType
 
DtInMemoryProfilerDistributorAgent * myFrameTimeLogger
 
bool myRenderedLastFrame
 
bool myResettingFlag
 
double mySystemPausedTime
 
double myTargetFrameTime
 
double myLastUpdateTime
 
bool myStartProfilerNextFrame
 
bool myStopProfilerNextFrame
 
DtDrawnIntersectorManagermyDrawnIntersectorManager = nullptr
 
bool myShowErrorDialogs
 
RenderingApiType myRenderingApi
 

Static Protected Attributes

static const charmyClassName
 

Friends

class DtDeProctor
 

Local Functions

typedef DtVirtualBaseClass &(* StaticInstanceFunction )(DtDe &)
 
virtual void setSimulationTime (double time)
 
virtual double systemTime () const
 
virtual void setCurrentFrameNumber (unsigned int frameNumber)
 
virtual unsigned int currentFrameNumber () const
 
virtual bool isPaused () const
 
virtual void pause ()
 
virtual void resume ()
 
double pausedTime () const
 
virtual DtVirtualBaseClassfindFastInstance (StaticInstanceFunction classInstanceFunction) const
 
template<typename Class >
DtVirtualBaseClassfindFastInstance (Class &(*staticInstFunc)(DtDe &)) const
 
virtual void registerFastInstance (StaticInstanceFunction classInstanceFunction, DtVirtualBaseClass *inst)
 
template<typename Class >
void registerFastInstance (Class &(*staticInstFunc)(DtDe &), DtVirtualBaseClass *inst)
 
virtual DtVirtualBaseClassfindInstance (const std::string &instanceName) const
 
virtual void registerInstance (const std::string &instanceName, DtVirtualBaseClass *instance)
 
virtual void registerProctor (unsigned short handlerId, DtProctor *)
 
virtual void unregisterProctor (unsigned short handlerId)
 
DtProctorfindProctor (unsigned short handlerId) const
 
DtDisplayProxySP findDisplay (const std::string &displayName)
 
virtual DtDisplayProxySP findDisplayByIndex (int index)
 
void setRenderFrameThisTick (bool update)
 
virtual bool modelSetActive (DtModelSetId i) const
 
virtual void determineActiveModelSets ()
 
virtual bool isValidDisplayConfiguration (const DtDisplayConfiguration &dec)
 
virtual void createDebugLog (const std::string &fileName, DtDebugLog::PrintLevel level)
 
virtual void startLogFrameTime ()
 
virtual void stopLogFrameTime ()
 

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

The type of rendering API being used.

Enumerator
None 
OpenGL 

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.

bool makVrv::DtDe::resetting ( )

During a reset, order of destruction of agent-based or singleton objects is not guaranteed. Check this flag first if you are assuming that something you have a pointer to that meets the criteria above hasn't been deleted yet. Even trickier is raising signals when destructing, because is you are in a reset() or exit situation there may be things with signal connections to that destructing single that have been deleted.

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.

Reimplemented in DtGuiOnlyDe.

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, and DtSingleton.

bool makVrv::DtDe::initialized ( ) const

Get whether the application is initialized.

Referenced by makVrv::defaultManagerInstanceFunction(), and makVrv::defaultManagerRegisterInstanceFunction().

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 DtDisplayWidgetDe, and makVrf::DtVrfDe.

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

Resets DtIG to a pre-configured state.

virtual void makVrv::DtDe::updateScene ( )
virtual

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.
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.

Referenced by makVrv::DtAerodromeNode< ComponentTypeData >::DtAerodromeNode().

DtAgentManager& makVrv::DtDe::agentManager ( )

Get the scene manager.

Exceptions
DtCorruptedStateif called before the Display Engine is initialized.

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

DtBackgroundLoader& makVrv::DtDe::backgroundLoader ( )

Get the background loader.

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 DtDeSharedState& makVrv::DtDe::sharedState ( ) const
virtual

DtDeConfiguration accessor.

virtual const DtDeSharedState* const makVrv::DtDe::sharedStatePtr ( ) const
virtual

DtDeConfiguration accessor.

virtual const DtSchemaManager* makVrv::DtDe::findSchemaManager ( ) const
virtual

DtSchemaManager accessor.

Exceptions
DtCorruptedStateif called before the DtDe is initialized.
virtual DtSchemaManager* makVrv::DtDe::findSchemaManager ( )
virtual

DtDeConfiguration accessor.

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
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 DtDrawnIntersectorManager* makVrv::DtDe::drawnIntersectorManager ( )
virtual

access the intersector draw manager. non-const

virtual const DtDrawnIntersectorManager* makVrv::DtDe::drawnIntersectorManager ( ) const
virtual

access the intersector draw manager. const

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 void makVrv::DtDe::setCurrentFrameNumber ( unsigned int  frameNumber)
virtual

called by the renderer to keep the de in sync with the viewer

virtual unsigned int makVrv::DtDe::currentFrameNumber ( ) const
virtual

Used to keep the viewer using the same frame number even if the display is recreated.

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

Returns whether simulation time is paused.

virtual void makVrv::DtDe::pause ( )
virtual

This pauses the advancement of time, but the renderer continues to render. This will cause all dead reckoning, particle system updates, dynamic ocean updates, etc. to stop. While paused, simulationTime() will return the same value.

virtual void makVrv::DtDe::resume ( )
virtual

Resume the advancement of simulation time.

double makVrv::DtDe::pausedTime ( ) const

pausedTime() provides an advancing time for use by objects that need it (such as the observer and observer eventProcessor) when simTime is paused. Users of this method are responsible for dealing with the fact that when switching from paused time back to sim time, there will be a backwards jump

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.

Referenced by makVrv::defaultManagerRegisterInstanceFunction().

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.

Reimplemented in DtDisplayWidgetDe.

Referenced by makVrv::DtSubjectAnnouncer< T >::findInstance(), and makVrv::DtVirtualBaseClassCreator< ClassToCreate, ConstructorArgs >::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(), makVrv::DtVirtualBaseClassCreator< ClassToCreate, ConstructorArgs >::instance(), and makVrv::DtVirtualBaseClassCustomCreator< CustomClassToCreate, BaseCreatorClass, ConstructorArgs >::registerInstance().

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::modelSetActive ( DtModelSetId  i) const
virtual

Indicate if the specified model set is active this tick. Values out of range return false.

virtual void makVrv::DtDe::determineActiveModelSets ( )
virtual

Determine which model sets are active this frame. A model set is active if there is an observer using that model set.

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::createDebugLog ( const std::string &  fileName,
DtDebugLog::PrintLevel  level 
)
virtual

create the debug log for logging information to a file

Reimplemented in DtDisplayWidgetDe, makVrf::DtVrfDe, and DtVrfDe.

virtual void makVrv::DtDe::startLogFrameTime ( )
virtual

Start logging a list of frametimes. If a log is currently in progress, this will reset the log. There is a hard-coded limit to the number of frames that can be logged (36000, 10 minutes @ 60hz). If that value is exceeded, the current list of frames is outputted and the logging stops. By default, this is bound to the 'P' key in the Observer Frame key map.

virtual void makVrv::DtDe::stopLogFrameTime ( )
virtual

Define the static instance function type for fast instance lookup.

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.

virtual void makVrv::DtDe::setTargetFrameTime ( double  frameTimeInMs)
virtual

used to control running the ICO and main thread system at the end of the frame, defaults to .016

virtual double makVrv::DtDe::targetFrameTime ( )
virtual

how long each frame should take, VRV will use extra time at the end of rendering to stream more data down to the gpu

virtual void makVrv::DtDe::startProfilerNextFrame ( )
virtual

starts the profiler next frame, only safe for IMGui to call

virtual void makVrv::DtDe::stopProfilerNextFrame ( )
virtual

stops the profiler next frame, only safe for IMGui to call

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

last update time for profiling

virtual void makVrv::DtDe::setShowErrorDialogs ( bool  show)
virtual

Set whether or not critical emitDeError messages raise a dialog, or just go to console.

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

Get whether or not critical emitDeError messages raise a dialog, or just go to console.

virtual void makVrv::DtDe::setRenderingApi ( DtDe::RenderingApiType  type)
virtual

Set the rendering API being used. This is called internally only and currently called by and controlled by vrvOsg::Init.

virtual DtDe::RenderingApiType makVrv::DtDe::renderingApi ( ) const
virtual

Returns the rendering API being used.

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

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

Reimplemented in makVrf::DtVrfDe.

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

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

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 DtDisplayWidgetDe, 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

Default implementation of a slave's tick.

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

Default implementation of a master's tick.

void makVrv::DtDe::renderTick ( double  elapsedTime)
protected

Update the scene and render, elapsedTimeis used to figure out how much time is left for additional streaming.

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.

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

Internal initialization of stats manager.

Friends And Related Function Documentation

friend class DtDeProctor
friend

Member Data Documentation

boost::signalslib::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.

Referenced by makVrv::defaultManagerRegisterInstanceFunction().

boost::signalslib::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::signalslib::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.

Referenced by makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::DtKeyedDataManagerTemplate().

boost::signalslib::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.

Referenced by makVrv::DtKeyedDataManagerTemplate< KeyType, KeyTypeHasher >::DtKeyedDataManagerTemplate().

boost::signalslib::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::signalslib::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::signalslib::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::signalslib::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::signalslib::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::signalslib::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::signalslib::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::signalslib::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::signalslib::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::signalslib::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::signalslib::signal<void( )> makVrv::DtDe::signal_postMainWindowInitialize

Emitted when after the main window has been set up.

boost::signalslib::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::signalslib::signal<void ()> makVrv::DtDe::signal_quit

Signal emitted by the quit method. Applications should listen for this signal and respond appropriately.

boost::signalslib::signal<void()> makVrv::DtDe::signal_pause

signal emitted by the pause method.

boost::signalslib::signal<void()> makVrv::DtDe::signal_resume

signal emitted by the resume method.

boost::signalslib::signal<void()> makVrv::DtDe::signal_aboutToAutoStartDrivers

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.

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
unsigned int makVrv::DtDe::myCurrentFrameNumber
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
DtBackgroundLoader* makVrv::DtDe::myBackgroundLoader
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::vector<bool> makVrv::DtDe::myActiveModelSets
protected
std::string makVrv::DtDe::myLastInstanceName
mutableprotected
RootedSingletonMap::const_iterator makVrv::DtDe::myLastInstance
mutableprotected
tbb::mutex makVrv::DtDe::myInternalDataMutex
mutableprotected
tbb::recursive_mutex makVrv::DtDe::myErrorMutex
mutableprotected
DtThreadId makVrv::DtDe::myThreadId
protected
DtClock* makVrv::DtDe::mySimulationClock
protected
DtSynchronizedTimeManager* makVrv::DtDe::mySynchronizedTimeManager
protected
LicenseTypes makVrv::DtDe::myLicenseType
protected
DtInMemoryProfilerDistributorAgent* makVrv::DtDe::myFrameTimeLogger
protected
bool makVrv::DtDe::myRenderedLastFrame
protected
bool makVrv::DtDe::myResettingFlag
protected
double makVrv::DtDe::mySystemPausedTime
protected
double makVrv::DtDe::myTargetFrameTime
protected

used to budget streaming at the end of a frame

double makVrv::DtDe::myLastUpdateTime
protected

used by stats system

bool makVrv::DtDe::myStartProfilerNextFrame
protected
bool makVrv::DtDe::myStopProfilerNextFrame
protected
DtDrawnIntersectorManager* makVrv::DtDe::myDrawnIntersectorManager = nullptr
protected
bool makVrv::DtDe::myShowErrorDialogs
protected
RenderingApiType makVrv::DtDe::myRenderingApi
protected

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

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)