VR-Forces 4.6.1 Class 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) 2013 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 <boost/signals.hpp>
18 #include <boost/unordered_map.hpp>
19 
20 namespace makVrv
21 {
22 
23  class DtDe;
24  class DtObserverObjectManager;
25  class DtOverlayManager;
26  class DtTickableManagerInterface;
27 
41 
44  {
45  public:
46 
50  typedef boost::unordered_map<DtElementID, double> DtRenderMap;
51 
53  DtRenderer(DtDe& de);
54 
56  virtual ~DtRenderer();
57 
59  virtual void update();
60 
62  virtual void postUpdate();
63 
65  DtObserverObjectManager* observerObjectManager();
66 
68  DtTickableManagerInterface& tickableManager();
69  const DtTickableManagerInterface& tickableManager() const;
70 
72  DtOverlayManager& overlayManager();
73  const DtOverlayManager& overlayManager() const;
74 
77  virtual bool exportTerrainAndProps(const std::string&) = 0;
78 
80  virtual void render() = 0;
81 
83  virtual void resetSceneGraph() = 0;
84 
86  virtual void setWireframeRendering(bool enabled) = 0;
87 
89  virtual bool wireframeRendering() const = 0;
90 
92  virtual void setShadowState(bool enabled) =0;
93 
95  virtual bool shadowsEnabled() const = 0;
96 
98  virtual void releaseResources() = 0;
99 
102  boost::signal<void (double simTime)> signal_update;
103 
107  boost::signal<void (double simTime)> signal_preObserverUpdate;
108 
111  boost::signal<void (double simTime)> signal_postUpdate;
112 
115  boost::signal<void ()> signal_releaseResources;
116 
119  virtual bool makeContextCurrent() = 0;
120 
123  void createManagers();
124 
128  inline const DtRenderMap& renderMap() const
129  {
130  return myRenderMap;
131  }
132 
133  protected:
134 
141  };
142 
146  {
147  public:
148 
151  static DtRendererCreator& instance(DtDe& de);
152 
154  static void registerInstance(DtDe& de, DtRendererCreator* anInstance);
155 
157  virtual DtRenderer* create(DtDe& de) = 0;
158  };
159 
160 
161 
162 }

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)