VR-Vantage 3.1.1 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtRenderer.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 
10 #pragma once
11 #include <vrvCore/vrvCore.h>
12 #include <vrvCore/DtUniqueID.h>
13 
16 
17 #include <vrvUtil/signalslib.h>
18 #include <unordered_map>
19 
20 namespace makVrv
21 {
22 
23  class DtDe;
24  class DtObserverObjectManager;
25  class DtOverlayManager;
26  class DtFontManagerInterface;
27  class DtTickableManagerInterface;
28  class DtIndirectEntityManager;
29  class DtChannel;
30  class DtDebugShapes;
31  class DtGeom3dLinesSystem;
32  class DtGeom3dSpheresSystem;
33 
47 
50  {
51  public:
52 
56  typedef std::unordered_map<DtElementID, double> DtRenderMap;
57 
59  DtRenderer(DtDe& de);
60 
62  virtual ~DtRenderer();
63 
65  virtual void update();
66 
68  virtual void postUpdate();
69 
71  DtObserverObjectManager* observerObjectManager();
72 
74  DtTickableManagerInterface& tickableManager();
75  const DtTickableManagerInterface& tickableManager() const;
76 
78  DtOverlayManager& overlayManager();
79  const DtOverlayManager& overlayManager() const;
80 
82  DtGeom3dLinesSystem& geom3dLinesSystem();
83  const DtGeom3dLinesSystem& geom3dLinesSystem() const;
84 
86  DtGeom3dSpheresSystem& geom3dSpheresSystem();
87  const DtGeom3dSpheresSystem& geom3dSpheresSystem() const;
88 
90  DtDebugShapes& debugShapes();
91 
94  virtual bool exportTerrainAndProps(const std::string&) = 0;
95 
97  virtual void render() = 0;
98 
100  virtual void resetSceneGraph() = 0;
101 
104  virtual void removeChannelRoot(DtChannel* channel) = 0;
105 
107  virtual void setWireframeRendering(bool enabled) = 0;
108 
110  virtual bool wireframeRendering() const = 0;
111 
113  virtual void setShadowState(bool enabled) =0;
114 
116  virtual bool shadowsEnabled() const = 0;
117 
119  virtual void releaseResources() = 0;
120 
123  boost::signalslib::signal<void (double simTime)> signal_update;
124 
128  boost::signalslib::signal<void (double simTime)> signal_preObserverUpdate;
129 
132  boost::signalslib::signal<void (double simTime)> signal_postUpdate;
133 
136  boost::signalslib::signal<void ()> signal_releaseResources;
137 
140  virtual bool makeContextCurrent() = 0;
141 
143  virtual DtFontManagerInterface& fontManager() = 0;
144  virtual const DtFontManagerInterface& fontManager() const = 0;
145 
148  virtual void createManagers();
149 
153  inline const DtRenderMap& renderMap() const
154  {
155  return myRenderMap;
156  }
157 
161  virtual void cleanup() = 0;
162 
164  virtual void setNewProfilerState(int value) = 0;
166  virtual int newProfilerState() = 0;
167 
168  protected:
169 
180  };
181 
185  {
186  public:
187 
190  static DtRendererCreator& instance(DtDe& de);
191 
193  static void registerInstance(DtDe& de, DtRendererCreator* anInstance);
194 
196  virtual DtRenderer* create(DtDe& de) = 0;
197  };
198 
199 
200 
201 }
Virtual base class.
Definition: DtVirtualBaseClass.h:19
DtIndirectEntityManager & myIndirectEntityManager
Definition: DtRenderer.h:174
DtSignalConnectionManager myConnections
Definition: DtRenderer.h:176
An abstract interface for managers of DtTickable objects.
Definition: DtTickableManagerInterface.h:26
A class responsible for processing DtGeom3dLinesComponent objects.
Definition: DtGeom3dLinesSystem.h:62
DtGeom3dSpheresSystem * myGeom3dSpheresSystem
Definition: DtRenderer.h:178
boost::signalslib::signal< void(double simTime)> signal_postUpdate
Signal used to update systems.
Definition: DtRenderer.h:132
T value(details::expression_node< T > *n)
Definition: exprtk.hpp:12342
The class responsible for managing and updating observer objects.
Definition: DtObserverObjectManager.h:25
DtGeom3dLinesSystem * myGeom3dLinesSystem
Definition: DtRenderer.h:177
DtTickableManagerInterface * myTickableManager
Definition: DtRenderer.h:172
Manages instances of fonts, the font will be kept in memory unless the manager is cleared...
Definition: DtFontManagerInterface.h:25
A class responsible for processing DtGeom3dSpheresComponent objects.
Definition: DtGeom3dSpheresSystem.h:62
const DtRenderMap & renderMap() const
Returns a const reference to the unordered map that contains all the element IDs of objects that were...
Definition: DtRenderer.h:153
The abstract Channel Class.
Definition: DtChannel.h:35
DtDebugShapes * myDebugShapes
Definition: DtRenderer.h:179
boost::signalslib::signal< void(double simTime)> signal_update
Signal used to update systems.
Definition: DtRenderer.h:123
Contains makVrv::DtVirtualBaseClass class.
std::unordered_map< DtElementID, double > DtRenderMap
Type definition of an unordered map that maps the element ids of objects recently rendered to the las...
Definition: DtRenderer.h:56
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtRenderMap myRenderMap
Definition: DtRenderer.h:175
Abstract base class for managing the overlays.
Definition: DtOverlayManager.h:31
The DtRenderer is the component responsible for rendering 3D images onto the screen.
Definition: DtRenderer.h:49
Base class to provide boost signal/slot management.
Abstract creator base class.
Definition: DtRenderer.h:184
DtObserverObjectManager * myObserverObjectManager
Definition: DtRenderer.h:171
Contains makVrv::DtUniqueID type.
boost::signalslib::signal< void(double simTime)> signal_preObserverUpdate
Signal used to update systems.
Definition: DtRenderer.h:128
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:72
DtDe & myDe
Definition: DtRenderer.h:170
vrvCore singleton base class for OSGs DtOsgIndirectEntityManager, Allows for this manager to be ticke...
Definition: DtIndirectEntityManager.h:21
boost::signalslib::signal< void()> signal_releaseResources
Signal used to update systems.
Definition: DtRenderer.h:136
DtOverlayManager * myOverlayManager
Definition: DtRenderer.h:173
This class can be used to help you visually debug lines and boxes.
Definition: DtDebugShapes.h:60
Contains DLL export macros.


Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)