VR-Vantage
Loading...
Searching...
No Matches
DtDe.h
Go to the documentation of this file.
1/******************************************************************************
2** Copyright (c) 2026 MAK Technologies, Inc.
3** All rights reserved.
4******************************************************************************/
5
9
10#pragma once
11
13
16#include <vrvUtil/signalslib.h>
17
18#include <vlutil/vlThreadSysWrapper.h>
19
20#include <vector>
21
22#include <boost/bind/bind.hpp>
23
24#include <atomic>
25
26#include <shared_mutex>
27
30#define DT_DE_INIT_ONCE(de)\
31if(de.isInitFunctionRegistered((void*)&init))\
32{\
33 return;\
34}\
35else\
36{\
37 de.registerInitFunction((void*)&init);\
38}
39
40class DtClock;
41
42namespace makVrv
43{
44 class DtAgentManager;
45 class DtBackgroundLoader;
46 class DtDataBank;
47 class DtDeProctor;
48 class DtDeSharedState;
49 class DtDisplay;
50 class DtDriverManager;
51 class DtFileCache;
52 class DtInMemoryProfilerDistributorAgent;
53 class DtMessageDispatcher;
54 class DtProctor;
55 class DtRenderer;
56 class DtScene;
57 class DtVirtualBaseClass;
58 class DtSchemaManager;
59 class DtStatsSet;
60 class DtDeError;
61 class DtDisplayConfiguration;
62 class DtWindowConfiguration;
63 class DtChannelConfiguration;
64 class DtDriverConfiguration;
65 class DtSynchronizedTimeManager;
66 class DtDrawnIntersectorManager;
67 class DtDeSplashScreen;
68 class DtDeCommunicator;
69 class DtDeRecord;
70 class DtEnvironmentVariables;
71 enum class DtModelSetId;
72
77 {
78 public:
79
80 friend class DtDeProctor;
81
83 typedef std::vector<std::pair<DtDeError,bool> > DeErrors;
84
85 public:
86
89 {
90 None, // this is valid and used for VRF sim
91 OpenGL, // opengl currently used by visual applications
92 };
93
96
99 virtual ~DtDe();
100
105
112 bool resetting();
113
117 virtual void setDeInitializer(const DtDeInitializer& initializer);
118
123 virtual void setPathConfiguration(const DtDePathConfiguration& pathConfig);
124
132
145 virtual InitializationResult initialize( bool abortOnLicenseFailure = true, bool useLicenseErrorDialog = true);
146
148 bool initialized() const;
149
153 DtThreadId threadId();
154
160 virtual void setDeConfiguration(const DtDeConfiguration& deConfig);
161
170 virtual void tick(double simTime);
171
175 inline void retick() { tick(simulationTime()); }
176
180 virtual bool timeToStop() const;
181
183 virtual void setTimeToStop(bool flag = true);
184
186
188 virtual void quit();
189
191 virtual void reset();
192
194 virtual void updateScene();
195
197
198
200 virtual const DtDeConfiguration& deConfiguration() const;
201
205
208
211 virtual DtDisplay* display();
212
217 virtual DtScene& scene();
218
223
228
231
234
236 inline DtDebugLog& log() { return *myDebugLog; }
237
241
244
246 virtual double simulationTime() const;
247
250 virtual double syncedTime() const;
251
256
258 virtual int displayCount() const;
259
261 virtual const DtDeInitializer& deInitializer() const;
262
265
267 virtual bool isInMasterMode() const;
268
270 virtual bool isInSlaveMode() const;
271
274 virtual const DtDeSharedState& sharedState() const;
275 virtual const DtDeSharedState* const sharedStatePtr() const;
276
279 virtual const DtSchemaManager* findSchemaManager() const;
281
284
286 virtual const DeErrors deErrors() const;
287
289 virtual void clearDeErrors();
290
292 virtual DtRenderer& renderer() const;
293
296
300 virtual bool licenseAvailable() const;
301
304
307
309
311
312
317
327 virtual void realizeDisplayConfiguration(const std::string& clientName,
328 const std::string& displayName);
329
333
336 virtual void destroyDisplay(const std::string& displayName);
337
339 virtual void destroyAllDisplays();
340
342 virtual bool modifyDisplay( const std::string& displayName,
343 const DtDisplayConfiguration& config );
344
346
348
349
352 virtual void setSimulationTime(double time);
353
357 virtual double systemTime() const;
358
360 virtual void setCurrentFrameNumber(unsigned int frameNumber);
361
363 virtual unsigned int currentFrameNumber() const;
364
366 virtual bool isPaused() const;
367
371 virtual void pause();
372
374 virtual void resume();
375
380 double pausedTime() const;
381
383 typedef DtVirtualBaseClass& (*StaticInstanceFunction)(DtDe&);
384
388 StaticInstanceFunction classInstanceFunction) const;
389
393 template <typename Class>
394 DtVirtualBaseClass* findFastInstance(Class& (*staticInstFunc)(DtDe&)) const
395 {
396 return findFastInstance(reinterpret_cast<StaticInstanceFunction>(staticInstFunc));
397 }
398
402 StaticInstanceFunction classInstanceFunction, DtVirtualBaseClass* inst);
403
407 template <typename Class>
408 void registerFastInstance(Class& (*staticInstFunc)(DtDe&),DtVirtualBaseClass* inst)
409 {
410 registerFastInstance(reinterpret_cast<StaticInstanceFunction>(staticInstFunc),inst);
411 }
412
422 StaticInstanceFunction classInstanceFunction, DtVirtualBaseClass* candidate);
423
426 template <typename Class>
428 Class& (*staticInstFunc)(DtDe&), DtVirtualBaseClass* candidate)
429 {
431 reinterpret_cast<StaticInstanceFunction>(staticInstFunc), candidate);
432 }
433
437 const std::string& instanceName) const;
438
448 virtual void registerInstance(const std::string& instanceName,
449 DtVirtualBaseClass* instance);
450
475 const std::string& instanceName, DtVirtualBaseClass* instance);
476
478 virtual void registerProctor(unsigned short handlerId,DtProctor*);
479
482 virtual void unregisterProctor(unsigned short handlerId);
483
485 DtProctor* findProctor(unsigned short handlerId) const;
486
489 DtDisplayProxySP findDisplay(const std::string& displayName );
490
493
495 void setRenderFrameThisTick(bool update);
496
499 virtual bool modelSetActive( DtModelSetId i) const;
500
504
507
509 virtual void createDebugLog(const std::string& fileName, DtDebugLog::PrintLevel level);
510
515 virtual void startLogFrameTime();
516 virtual void stopLogFrameTime();
517
519
520 //
522
523
529 boost::signalslib::signal<void ()> signal_initializeDefaultState;
530
535 boost::signalslib::signal<void ()> signal_postInitialize;
536
542 boost::signalslib::signal<void (DtDe&)> signal_preTick;
543
549 boost::signalslib::signal<void ()> signal_postTick;
550
553 boost::signalslib::signal<void (const std::string&, const std::string&)>
555
559 boost::signalslib::signal<void (const DtDisplayConfiguration&)> signal_displayConfigurationAdded;
560
564 boost::signalslib::signal<void (const std::string&)> signal_displayToBeDestroyed;
565
569 boost::signalslib::signal<void (const std::string&, const DtDisplayConfiguration&)>
571
575 boost::signalslib::signal<void (const std::string&, const DtWindowConfiguration&)>
577
582 boost::signalslib::signal<void (const std::string&, const std::string&)>
584
588 boost::signalslib::signal<void (const std::string&, const std::string&,
590
594 boost::signalslib::signal<void (const std::string&, const std::string&,
596
600 boost::signalslib::signal<void (const std::string&, const std::string&,
601 const std::string&)> signal_channelToBeDestroyed;
602
606 boost::signalslib::signal<void (const std::string&, const std::string&,
607 const std::string&, const DtChannelConfiguration&)>
609
611 boost::signalslib::signal<void( )> signal_postMainWindowInitialize;
612
615 boost::signalslib::signal<void (const DtDeError& error, bool critical)> signal_deError;
616
619 boost::signalslib::signal<void ()> signal_quit;
620
622 boost::signalslib::signal<void()> signal_pause;
623
625 boost::signalslib::signal<void()> signal_resume;
626
627 boost::signalslib::signal<void()> signal_aboutToAutoStartDrivers;
628
630
631 //
633
634
636 virtual void onSlaveConnected(const std::string& igName);
637
639 virtual void emitDeError(const DtDeError& error, bool criticalError);
640
642
645 static const char* className();
646
649 void registerInitFunction(void* address);
650
652 bool isInitFunctionRegistered(void* address);
653
657
661 virtual void stopProfilerNextFrame();
662
664 virtual double lastUpdateTime() const;
665
667 virtual void setShowErrorDialogs(bool show);
668
670 virtual bool showErrorDialogs() const;
671
675
678
679 protected:
680
682
683
685 virtual unsigned int countEmbeddedWindows( const DtDisplayConfiguration &dec );
686
688
689
691
693
696 virtual bool shouldSkipThisTick( double simulationTime );
697
699 virtual double fixedFrameRate() const;
700
703
705 virtual void postInitialize();
706
708 virtual void postInitializeMaster();
709
711 virtual void checkForData();
712
714
716 void slaveTick();
717
720
723 virtual void renderTick(double elapsedTime);
724
727
730 const std::string& clientName, const std::string& displayName);
731
734 virtual void local_destroyDisplay(const std::string& displayName);
735
737 virtual bool local_modifyDisplay( const std::string& displayName,
738 const DtDisplayConfiguration& config );
739
742
745
748
751
753 virtual void intializeStatsManager(void);
754
756
757
758 protected:
759
761 typedef std::vector<void*> InitFunctionVector;
762
763 // Normal map here since add/remove order matters for destruction order
764 typedef std::map<std::string,DtVirtualBaseClass*> RootedSingletonMap;
765 typedef std::map<StaticInstanceFunction,DtVirtualBaseClass*> FastRootedSingletonMap;
766
767 typedef std::map<std::string,DtDisplayProxyWP> DisplayEngineProxyMap;
768
769 protected:
770
771 static const char* myClassName;
772
796
799
806 std::vector<bool> myActiveModelSets;
807
808 mutable std::string myLastInstanceName;
809 mutable RootedSingletonMap::const_iterator myLastInstance;
810 mutable std::shared_timed_mutex myInternalDataMutex;
811 mutable std::shared_timed_mutex myErrorMutex;
812
813 DtThreadId myThreadId;
814
817
825
827
831
832 // This is used to provide an advancing time to the observer and observer event processor
833 // when simulation time is paused. Users of this 'pausedTime' must deal with the fact that
834 // the switch from paused time back to simTime will go 'into the past'
836
839
840 // used by IMGui Profiler to start before the rest of the events
843
845
847
849
851 };
852
853
854 template <typename ManagerClass>
855 void defaultManagerRegisterInstanceFunction(DtDe& de, ManagerClass* mgr);
856
891 template <typename ManagerClass>
892 ManagerClass& defaultManagerInstanceFunction(DtDe& de, bool allowedInSlave)
893 {
894 ManagerClass* mgr = dynamic_cast<ManagerClass*>
895 (de.findFastInstance(&ManagerClass::instance));
896
897 if(!mgr)
898 {
899 //Require that manager is created before de is initialized.
900 if(de.initialized())
901 {
902 DtTHROW_NEW(DtCorruptedState,
903 "Manager created after display engine was initialized.");
904 }
905
906 if(!allowedInSlave && de.isInSlaveMode())
907 {
908 DtTHROW_NEW(DtCorruptedState, "Create unsupported manager in slave.");
909 }
910
911 //Create and register the manager.
912 mgr = new ManagerClass(de);
914 }
915 return *mgr;
916 }
917
929 template <typename ManagerClass>
930 void defaultManagerRegisterInstanceFunction(DtDe& de, ManagerClass* mgr)
931 {
932 //Always override before init.
933 if(de.initialized())
934 {
935 DtTHROW_NEW(DtCorruptedState,
936 "Manager created after display engine was initialized.");
937 }
938
939 de.registerFastInstance(&ManagerClass::instance,mgr);
940
943 mgr->myConnections.manageConnection(
944 de.signal_initializeDefaultState.connect(boost::bind(
945 &ManagerClass::loadDefaults,mgr)));
946 }
947
948}
Contains the DtDeInitializer class definition.
Contains makVrv::DtDisplayProctor class.
Contains makVrv::DtMainEventQueue class.
The DtAgentManager manages the distributed scene object framework. This includes the objects and upda...
Definition DtAgentManager.h:39
Manages asynchronous and budgeted foreground loading for all DtModel subclasses.
Definition DtBackgroundLoader.h:82
Configuration for a single channel Serialized and sent to remote displays as necessary to configure r...
Definition DtChannelConfiguration.h:27
DtDataBank is the repository for common element data and simulation-specific state data.
Definition DtDataBank.h:20
The class responsible for managing communication between multiple DtDe instances typically running in...
Definition DtDeCommunicator.h:32
The configuration of the Display Engine.
Definition DtDeConfiguration.h:23
The DtDeError instance.
Definition DtDeError.h:21
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer,...
Definition DtDe.h:77
DtDrawnIntersectorManager * myDrawnIntersectorManager
This vector stores the address of registered init functions.
Definition DtDe.h:844
bool isInitFunctionRegistered(void *address)
Returns true if init function has already been registered.
std::map< std::string, DtDisplayProxyWP > DisplayEngineProxyMap
This vector stores the address of registered init functions.
Definition DtDe.h:767
virtual void setCurrentFrameNumber(unsigned int frameNumber)
called by the renderer to keep the de in sync with the viewer
std::shared_timed_mutex myErrorMutex
This vector stores the address of registered init functions.
Definition DtDe.h:811
bool myShowErrorDialogs
This vector stores the address of registered init functions.
Definition DtDe.h:846
bool myStartProfilerNextFrame
This vector stores the address of registered init functions.
Definition DtDe.h:841
boost::signalslib::signal< void()> signal_pause
signal emitted by the pause method.
Definition DtDe.h:622
double pausedTime() const
pausedTime() provides an advancing time for use by objects that need it (such as the observer and obs...
virtual void onSlaveConnected(const std::string &igName)
Called when a client is added.
virtual DtVirtualBaseClass * registerInstanceIfAbsent(const std::string &instanceName, DtVirtualBaseClass *instance)
Atomically register instance under instanceName only if no instance is already registered under that ...
virtual bool local_modifyDisplay(const std::string &displayName, const DtDisplayConfiguration &config)
Modify a display.
DtDeSharedState * myDeSharedState
This vector stores the address of registered init functions.
Definition DtDe.h:792
double myLastUpdateTime
used by stats system
Definition DtDe.h:838
FastRootedSingletonMap myFastRootedSingletonMap
This vector stores the address of registered init functions.
Definition DtDe.h:774
DtDeInitializer myInitializer
This vector stores the address of registered init functions.
Definition DtDe.h:775
virtual bool showErrorDialogs() const
Get whether or not critical emitDeError messages raise a dialog, or just go to console.
static const char * className()
Returns the name of this class. Required for DtSubjectAnnouncer::findInstance().
virtual DtDisplayProxySP findDisplayByIndex(int index)
Get the display by index.
boost::signalslib::signal< void(DtDe &)> signal_preTick
Definition DtDe.h:542
RootedSingletonMap myRootedSingletonMap
This vector stores the address of registered init functions.
Definition DtDe.h:773
boost::signalslib::signal< void()> signal_initializeDefaultState
Definition DtDe.h:529
virtual bool licenseAvailable() const
virtual void initializeLibXmlIfNecessary()
This vector stores the address of registered init functions.
DtInMemoryProfilerDistributorAgent * myFrameTimeLogger
This vector stores the address of registered init functions.
Definition DtDe.h:828
DtClock * mySimulationClock
This vector stores the address of registered init functions.
Definition DtDe.h:815
DtEnvironmentVariables * myCachedEnvironmentVariables
This vector stores the address of registered init functions.
Definition DtDe.h:850
virtual double lastUpdateTime() const
last update time for profiling
virtual void setTimeToStop(bool flag=true)
Set whether it is time to stop ticking.
bool myInTickFlag
This vector stores the address of registered init functions.
Definition DtDe.h:805
virtual void setRenderingApi(DtDe::RenderingApiType type)
virtual void pause()
This pauses the advancement of time, but the renderer continues to render. This will cause all dead r...
virtual const DeErrors deErrors() const
Returns myIgErrors.
std::vector< bool > myActiveModelSets
This vector stores the address of registered init functions.
Definition DtDe.h:806
bool destructing()
virtual void setPathConfiguration(const DtDePathConfiguration &pathConfig)
Set the path configuration for an uninitialized Display Engine. This call will do nothing if the Disp...
DtDeProctor * myIgProctor
This vector stores the address of registered init functions.
Definition DtDe.h:788
virtual double simulationTime() const
Get the simulation time.
virtual bool timeToStop() const
Method for checking to see if the app should stop ticking. This works only with the defaultRun functi...
virtual void setShowErrorDialogs(bool show)
Set whether or not critical emitDeError messages raise a dialog, or just go to console.
std::vector< std::pair< DtDeError, bool > > DeErrors
Typedef of a vector of error/critical.
Definition DtDe.h:83
virtual const DtSchemaManager * findSchemaManager() const
DtSchemaManager accessor.
virtual const DtDeSharedState *const sharedStatePtr() const
DtDeConfiguration accessor.
boost::signalslib::signal< void()> signal_resume
signal emitted by the resume method.
Definition DtDe.h:625
bool myStopFlag
This vector stores the address of registered init functions.
Definition DtDe.h:777
bool initialized() const
Get whether the application is initialized.
virtual bool modelSetActive(DtModelSetId i) const
Indicate if the specified model set is active this tick. Values out of range return false.
virtual void postInitializeMaster()
Master-only post initialize code.
static const char * myClassName
This vector stores the address of registered init functions.
Definition DtDe.h:771
virtual const DtDeSharedState & sharedState() const
DtDeConfiguration accessor.
boost::signalslib::signal< void()> signal_aboutToAutoStartDrivers
Definition DtDe.h:627
boost::signalslib::signal< void(const std::string &, const DtDisplayConfiguration &)> signal_displayModified
Definition DtDe.h:570
DtMainEventQueue myMainEventQueue
This vector stores the address of registered init functions.
Definition DtDe.h:784
DtAgentManager & agentManager()
Get the scene manager.
virtual bool isInMasterMode() const
Returns true if the DtDe is in master mode.
virtual const DtDePathConfiguration & dePathConfiguration() const
Return the DtDePathConfiguration.
virtual void updateFixedFrameRateTiming()
Update the next fixed time boundary for fixed frame rate control.
DtMessageDispatcher * myDispatcher
This vector stores the address of registered init functions.
Definition DtDe.h:787
LicenseTypes myLicenseType
This vector stores the address of registered init functions.
Definition DtDe.h:826
virtual double fixedFrameRate() const
The fixed frame rate if set. If to not use a fixed frame rate will return 0.
bool mySceneNeedsUpdateFlag
This vector stores the address of registered init functions.
Definition DtDe.h:803
boost::signalslib::signal< void()> signal_postMainWindowInitialize
Emitted when after the main window has been set up.
Definition DtDe.h:611
bool driverManagerCreated() const
You can call this method to see if the DtDriverManager exists.
virtual void registerFastInstance(StaticInstanceFunction classInstanceFunction, DtVirtualBaseClass *inst)
Register a fast instance, if the inst is a null pointer the instance key is removed.
DtVirtualBaseClass &(* StaticInstanceFunction)(DtDe &)
Define the static instance function type for fast instance lookup.
Definition DtDe.h:383
virtual void destroyDisplay(DtDisplayProxySP display)
Remove a display. The proxy will be invalid after this call, and can not be used.
virtual const DtDeConfiguration & deConfiguration() const
DtDeConfiguration accessor.
std::shared_timed_mutex myInternalDataMutex
This vector stores the address of registered init functions.
Definition DtDe.h:810
virtual DtDataBank & dataBank()
The DtDataBank accessor.
DtVirtualBaseClass * findFastInstance(Class &(*staticInstFunc)(DtDe &)) const
The instance key is always return the subclass of the virtual base class, since it returns a referenc...
Definition DtDe.h:394
DtProctor * findProctor(unsigned short handlerId) const
Find a handler.
DtDebugLog & log()
Inline access for the debug log object.
Definition DtDe.h:236
DtThreadId threadId()
Get the thread id that the Display Engine was initialized in and must rung in.
virtual DtScene & scene()
The DtScene accessor.
void masterTick(double simulationTime)
Default implementation of a master's tick.
DtBackgroundLoader & backgroundLoader()
Get the background loader.
boost::signalslib::signal< void(const std::string &, const std::string &, const DtWindowConfiguration &)> signal_windowConfigurationModified
Definition DtDe.h:589
InitializationResult
Result codes for the initialize() function.
Definition DtDe.h:127
@ UnableToInitializeDueToLicense
Definition DtDe.h:130
@ Initialized
Definition DtDe.h:128
@ UnableToInitialize
Definition DtDe.h:129
virtual const DtDrawnIntersectorManager * drawnIntersectorManager() const
access the intersector draw manager. const
virtual bool shouldSkipThisTick(double simulationTime)
virtual void setDeInitializer(const DtDeInitializer &initializer)
Set the Display Engine initializer used to initialize the Display Engine. This call will do nothing i...
virtual void unregisterProctor(unsigned short handlerId)
Unregister a handler This should be called before the handler is deallocated..
std::map< StaticInstanceFunction, DtVirtualBaseClass * > FastRootedSingletonMap
This vector stores the address of registered init functions.
Definition DtDe.h:765
virtual void determineActiveModelSets()
Determine which model sets are active this frame. A model set is active if there is an observer using...
virtual void setSimulationTime(double time)
Set the simulation time.
virtual int displayCount() const
Get the display count.
boost::signalslib::signal< void(const std::string &, const std::string &)> signal_windowConfigurationToBeDestroyed
Definition DtDe.h:583
virtual void registerInstance(const std::string &instanceName, DtVirtualBaseClass *instance)
Register an instance with a given name for later retrieval. Once registered, the DtDe takes ownership...
virtual void initializeSchemaManager()
This vector stores the address of registered init functions.
unsigned int myCurrentFrameNumber
This vector stores the address of registered init functions.
Definition DtDe.h:780
virtual DtDeCommunicator & igCommunicator()
DtDeCommunicator accessor.
DtSchemaManager * mySchemaManager
This vector stores the address of registered init functions.
Definition DtDe.h:794
DtFileCache * myFileCache
This vector stores the address of registered init functions.
Definition DtDe.h:800
DtDePathConfiguration myPathConfiguration
This vector stores the address of registered init functions.
Definition DtDe.h:776
DtDisplayProxySP findDisplay(const std::string &displayName)
Find a Display by name.
DtAgentManager * myAgentManager
This vector stores the address of registered init functions.
Definition DtDe.h:790
LicenseTypes
This vector stores the address of registered init functions.
Definition DtDe.h:819
@ Master3D_License
Definition DtDe.h:821
@ NoLicense
Definition DtDe.h:820
@ PVD_License
Definition DtDe.h:823
@ XR_License
Definition DtDe.h:822
virtual ~DtDe()
DTOR occur after the subclass of DtDe has been called.
virtual void local_destroyDisplay(const std::string &displayName)
Remove a display. If the display matches the local name then the de display is destroyed.
double myNextFixedTime
This vector stores the address of registered init functions.
Definition DtDe.h:781
virtual unsigned int countEmbeddedWindows(const DtDisplayConfiguration &dec)
Count the number of embedded windows in the display configuration.
virtual double syncedTime() const
Get the simulation time or the synced NTP time (if the –hasNTPSync / -O flag has been set) Currently ...
virtual DtVirtualBaseClass * findFastInstance(StaticInstanceFunction classInstanceFunction) const
Find an instance with the given name. If no instance is found than a null pointer is returned.
std::string myLastInstanceName
This vector stores the address of registered init functions.
Definition DtDe.h:808
void slaveTick()
Default implementation of a slave's tick.
boost::signalslib::signal< void(const std::string &, const std::string &, const std::string &, const DtChannelConfiguration &)> signal_channelConfigurationModified
Definition DtDe.h:608
virtual void destroyDisplay(const std::string &displayName)
Remove a display. If the display matches the local name then the de display is destroyed.
std::vector< void * > InitFunctionVector
This vector stores the address of registered init functions.
Definition DtDe.h:761
virtual void stopProfilerNextFrame()
stops the profiler next frame, only safe for IMGui to call
virtual DtFileCache * fileCache()
Returns DtFileCache.
bool myInitializeFlag
This vector stores the address of registered init functions.
Definition DtDe.h:778
virtual void renderTick(double elapsedTime)
DtDataBank * myDataBank
This vector stores the address of registered init functions.
Definition DtDe.h:793
DtMainEventQueue & mainEventQueue()
DtMainEventQueue.
std::map< std::string, DtVirtualBaseClass * > RootedSingletonMap
This vector stores the address of registered init functions.
Definition DtDe.h:764
DtBackgroundLoader * myBackgroundLoader
This vector stores the address of registered init functions.
Definition DtDe.h:795
DtDeConfiguration myConfiguration
This vector stores the address of registered init functions.
Definition DtDe.h:783
void setRenderFrameThisTick(bool update)
Sets that the frame will be rendered this tick.
bool myResettingFlag
This vector stores the address of registered init functions.
Definition DtDe.h:830
virtual void postInitialize()
Connect initialized components and call postInit signal.
virtual DtVirtualBaseClass * registerFastInstanceIfAbsent(StaticInstanceFunction classInstanceFunction, DtVirtualBaseClass *candidate)
Race-safe variant of registerFastInstance(). Atomically inserts candidate under classInstanceFunction...
boost::signalslib::signal< void(const std::string &, const DtWindowConfiguration &)> signal_windowConfigurationAdded
Definition DtDe.h:576
void registerInitFunction(void *address)
Register address of init function so DtDe instance knows that module was already instanced.
virtual double systemTime() const
Used in special cases of absolute time stamping, this will return absolute wall clock time from the D...
virtual void intializeStatsManager(void)
Internal initialization of stats manager.
virtual DtSchemaManager * findSchemaManager()
DtDeConfiguration accessor.
DisplayEngineProxyMap myDisplayProxies
This vector stores the address of registered init functions.
Definition DtDe.h:791
virtual void checkForData()
Check that the data package is installed, and emit an error if not.
bool renderFrameThisTick() const
Gets if we will render this frame.
double mySimulationTime
This vector stores the address of registered init functions.
Definition DtDe.h:779
void createDisplay(DtDisplayConfiguration &)
create the display engine.
bool myStopProfilerNextFrame
This vector stores the address of registered init functions.
Definition DtDe.h:842
virtual void destroyAllDisplays()
Removes all display.
virtual unsigned int currentFrameNumber() const
Used to keep the viewer using the same frame number even if the display is recreated.
virtual void startLogFrameTime()
boost::signalslib::signal< void(const DtDeError &error, bool critical)> signal_deError
Definition DtDe.h:615
virtual DtDrawnIntersectorManager * drawnIntersectorManager()
access the intersector draw manager. non-const
DeErrors myIgErrors
This vector stores the address of registered init functions.
Definition DtDe.h:801
bool myRenderedLastFrame
This vector stores the address of registered init functions.
Definition DtDe.h:829
virtual DtDisplay * display()
DtDisplay accessor. The returned pointer will be NULL before initialize is called,...
double mySystemPausedTime
This vector stores the address of registered init functions.
Definition DtDe.h:835
bool local_addDisplayConfiguration(const DtDisplayConfiguration &dec)
Internal implementation of adding a display.
virtual void reset()
Resets DtIG to a pre-configured state.
RootedSingletonMap::const_iterator myLastInstance
This vector stores the address of registered init functions.
Definition DtDe.h:809
boost::signalslib::signal< void()> signal_quit
Definition DtDe.h:619
void createIgCommunicator(DtDriverConfiguration &config)
Create the Display Engine Driver.
virtual DtSynchronizedTimeManager * findSynchronizedTimeManager()
DtSynchronizedTimeManager * mySynchronizedTimeManager
This vector stores the address of registered init functions.
Definition DtDe.h:816
boost::signalslib::signal< void(const std::string &, const std::string &)> signal_displayConfigurationRealized
Definition DtDe.h:554
boost::signalslib::signal< void(const std::string &, const std::string &, const std::string &)> signal_channelToBeDestroyed
Definition DtDe.h:601
virtual void tick(double simTime)
A very important function which provides a since tick of execution which is required for the app to r...
DtDeCommunicator * myCommunicator
This vector stores the address of registered init functions.
Definition DtDe.h:786
virtual bool modifyDisplay(const std::string &displayName, const DtDisplayConfiguration &config)
Modify a display.
void destroyDisplay()
Destroy the display.
void registerFastInstance(Class &(*staticInstFunc)(DtDe &), DtVirtualBaseClass *inst)
The instance key is always return the subclass of the virtual base class, since it returns a referenc...
Definition DtDe.h:408
boost::signalslib::signal< void(const DtDisplayConfiguration &)> signal_displayConfigurationAdded
Definition DtDe.h:559
void retick()
Retick is a helper function for simply ticking using the current Simulation time. This may be necessa...
Definition DtDe.h:175
virtual InitializationResult initialize(bool abortOnLicenseFailure=true, bool useLicenseErrorDialog=true)
Initialize the application prior to running it. It is required that this function be called prior to ...
DtVirtualBaseClass * registerFastInstanceIfAbsent(Class &(*staticInstFunc)(DtDe &), DtVirtualBaseClass *candidate)
Typed convenience overload that forwards to the StaticInstanceFunction-keyed registerFastInstanceIfAb...
Definition DtDe.h:427
boost::signalslib::signal< void()> signal_postTick
Definition DtDe.h:549
virtual bool isValidDisplayConfiguration(const DtDisplayConfiguration &dec)
Returns true if the display configuration is valid and can be realized.
RenderingApiType myRenderingApi
This vector stores the address of registered init functions.
Definition DtDe.h:848
virtual void createDebugLog(const std::string &fileName, DtDebugLog::PrintLevel level)
create the debug log for logging information to a file
virtual DtEnvironmentVariables & environmentVariables()
virtual void registerProctor(unsigned short handlerId, DtProctor *)
Register an proctor object.
virtual void updateScene()
Update the scene if it needs to be updated.
boost::signalslib::signal< void(const std::string &)> signal_displayToBeDestroyed
Definition DtDe.h:564
bool myDestructionFlag
This vector stores the address of registered init functions.
Definition DtDe.h:804
virtual DtDriverManager & driverManager()
The DtMasterScene accessor. The function will throw before the initialize function is called.
virtual bool addDisplayConfiguration(const DtDisplayConfiguration &)
Add a new display, if the display engine matches the local name then the de display engine is realize...
InitFunctionVector myRegisteredInitFunctions
This vector stores the address of registered init functions.
Definition DtDe.h:797
virtual void clearDeErrors()
Clears myIgErrors.
virtual void resume()
Resume the advancement of simulation time.
boost::signalslib::signal< void(const std::string &, const std::string &, const DtChannelConfiguration &)> signal_channelConfigurationAdded
Definition DtDe.h:595
virtual void emitDeError(const DtDeError &error, bool criticalError)
Called when an error is emitted.
virtual DtMessageDispatcher & dispatcher()
DtMessageDispatcher accessor.
virtual void realizeDisplayConfiguration(const std::string &clientName, const std::string &displayName)
Make a client realize a display configuration.
boost::signalslib::signal< void()> signal_postInitialize
Definition DtDe.h:535
virtual void stopLogFrameTime()
Define the static instance function type for fast instance lookup.
virtual void quit()
Call this method to quit and exit the application.
DtDebugLog * myDebugLog
This vector stores the address of registered init functions.
Definition DtDe.h:782
virtual DtRenderer & renderer() const
Get the renderer.
friend class DtDeProctor
Definition DtDe.h:80
virtual bool isInSlaveMode() const
Returns true if the DtDe is in slave mode.
virtual bool isPaused() const
Returns whether simulation time is paused.
virtual const DtDeInitializer & deInitializer() const
Return the DtDeInitializer.
DtThreadId myThreadId
This vector stores the address of registered init functions.
Definition DtDe.h:813
DtDeProctor * proctor()
Get the proctor.
bool shouldSendMesssage()
Helper function used to check if a message needs to be created and sent.
virtual void startProfilerNextFrame()
starts the profiler next frame, only safe for IMGui to call
DtDriverManager * myDriverManager
This vector stores the address of registered init functions.
Definition DtDe.h:789
void * myRegInitFunction
This vector stores the address of registered init functions.
Definition DtDe.h:798
virtual DtDeSharedState & sharedState()
Returns the DtDeSharedState object.
DtDisplay * myDisplayEngine
This vector stores the address of registered init functions.
Definition DtDe.h:785
virtual DtVirtualBaseClass * findInstance(const std::string &instanceName) const
Find an instance with the given name. If no instance is found than a null pointer is returned.
RenderingApiType
The type of rendering API being used.
Definition DtDe.h:89
virtual void setDeConfiguration(const DtDeConfiguration &deConfig)
Set the de configuration. This call is only valid BEFORE calls to initialize. Note: setDeInitializer ...
bool resetting()
virtual DtDe::RenderingApiType renderingApi() const
Returns the rendering API being used.
virtual bool local_realizeDisplayConfiguration(const std::string &clientName, const std::string &displayName)
Attempt to realize a display configuration.
DtRenderer * myRenderer
This vector stores the address of registered init functions.
Definition DtDe.h:802
The initialization configuration for the makVrv::DtDe.
Definition DtDeInitializer.h:40
Definition DtDePathConfiguration.h:24
The DtDeSharedState represents all the data that is shared between the master and its slaves....
Definition DtDeSharedState.h:51
Definition DtDebugLog.h:39
PrintLevel
Definition DtDebugLog.h:43
This owns a list of window configurations.
Definition DtDisplayConfiguration.h:44
Component which owns how the application is displayed.
Definition DtDisplay.h:28
Definition DtDrawnIntersectorManager.h:36
Configuration for the makVrv::DtIgDriver class.
Definition DtDriverConfiguration.h:20
The DtDriverManager manages all the DtDriver's in the DtDe.
Definition DtDriverManager.h:33
Definition DtEnvironmentVariables.h:60
Handles the caching of files. Includes functions for excluding files with certain extensions from bei...
Definition DtFileCache.h:38
Agent class for the scene object class: DtInMemoryProfilerDistributor.
Definition DtInMemoryProfilerDistributorAgent.hpp:23
Definition DtMainEventQueue.h:25
IGI Manager managers both IGI clients and IGI interfaces.
Definition DtMessageDispatcher.h:32
Base class for Proctor classes.
Definition DtProctor.h:22
The DtRenderer is the component responsible for rendering 3D images onto the screen.
Definition DtRenderer.h:50
An object that represents everything that is visible in the scene.
Definition DtScene.h:45
The schema manager is responsible to managing all of the schemas in the system. It will save and load...
Definition DtSchemaManager.h:79
DtSynchronizedTimeManager manages NTP synchronized time DtSynchronizedTimeManager is used by the disp...
Definition DtSynchronizedTimeManager.h:26
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators,...
Definition DtVirtualBaseClass.h:20
This owns a list of channel configurations.
Definition DtWindowConfiguration.h:27
Contains DtCreateSensorFieldOfViewCommand and DtCreateSensorFieldOfViewCommandCreator class declarati...
Definition DtGridLinesSettingsRecord.h:16
std::shared_ptr< DtDisplayProxy > DtDisplayProxySP
Definition DtDisplayProxy.h:91
void defaultManagerRegisterInstanceFunction(DtDe &de, ManagerClass *mgr)
Definition DtDe.h:930
DtModelSetId
Definition DtModelSetEnums.h:20
ManagerClass & defaultManagerInstanceFunction(DtDe &de, bool allowedInSlave)
Definition DtDe.h:892
#define DT_DLL_VRVCORE
Definition vrvCore.h:20