VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtSceneDriver.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 #include <vrvCore/vrvCore.h>
12 #include <vrvCore/DtDriver.h>
14 
16 
17 #include <boost/shared_ptr.hpp>
18 
19 #include <string>
20 #include <map>
21 #include <list>
22 #include <vector>
23 
24 class DtTaitBryan;
25 
26 namespace makVrv
27 {
28 
29  class DtChannelConfiguration;
30  class DtDe;
31  class DtDeRecord;
32  class DtFeature;
33  class DtProp;
34  class DtScene;
35  class DtBuoyOrBeaconFacade;
36 
40  {
41  public:
42 
44  friend class DtSceneDriverCreator;
45 
47  virtual ~DtSceneDriver();
48 
50  virtual bool onStart();
51 
53  virtual bool onStop();
54 
56  virtual bool onTick();
57 
59  virtual const std::string& className() const;
60 
65  bool saveScene( const std::string& filePath, bool saveAs = true );
66 
69  bool loadScene( const std::string& filePath, bool emitSignal = true );
70 
73  const std::string& sceneFileName() const;
74 
77  DtScene* findScene();
78 
81  DtScene& scene();
82 
85  virtual void clearScene();
86 
87  protected:
88 
90  DtSceneDriver(DtDe& de);
91 
93  void reportPropCreated(const DtProp& prop);
94 
96  void reportPropDestroyed(const DtProp& prop);
97 
98  void reportBuoyCreated(const DtBuoyOrBeaconFacade& buoy);
99  void reportBuoyDestroyed(const DtBuoyOrBeaconFacade& buoy);
100 
102  void reportTerrainPatchCreated(const DtTerrainPatch& patch);
103 
105  void reportTerrainPatchDestroyed(const DtTerrainPatch& patch);
106 
108  void reportFeatureCreated(const DtFeature& feature);
109 
111  void reportFeatureDestroyed(const DtFeature& feature);
112 
115  virtual void slot_displayEngineAdded(const DtDeRecord& igRecord);
116 
117  virtual void slot_elementAttributeChangeRequested(DtUniqueID id, DtUniqueID parentId,
118  DtBoost::shared_ptr<const DtElementAttribute> atr);
119 
120  void handlePropElementChanged(DtProp& prop, const DtElementAttribute* attr);
121 
122  protected:
123 
124  std::string myClassName;
126 
128  std::string mySceneFileName;
129 
130  };
131 
136  {
137  public:
138 
140  static DtSceneDriverCreator& instance(DtDe& de);
141 
143  static void registerInstance(DtDe& de,DtSceneDriverCreator* inst);
144 
146  virtual ~DtSceneDriverCreator();
147 
150  virtual DtSceneDriver* create(DtDe& de);
151 
152  protected:
153 
155  };
156 }
Creator class for the scene driver, can be replaced to replace the scene driver.
Definition: DtSceneDriver.h:135
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
An object that represents everything that is visible in the scene.
Definition: DtScene.h:44
A Record of an IG instance.
Definition: DtDeRecord.h:24
std::string myClassName
Definition: DtSceneDriver.h:124
DtDe & myDe
Definition: DtSceneDriver.h:125
A container for a single piece of terrain, containing settings needed to recreate it...
Definition: DtTerrainPatch.h:42
Facade object for a scene prop.
Definition: DtProp.h:34
Definition: feature.h:26
Contains makVrv::DtVirtualBaseClass class.
The DtDriver is an abstract class. Developers derive from this to create logic that &quot;directs&quot; things ...
Definition: DtDriver.h:31
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
The DtSceneDriver owns the scene.
Definition: DtSceneDriver.h:39
DtScene * myScene
Definition: DtSceneDriver.h:127
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
Contains makVrv:DtDriver class.
This is the base Terrain Feature class which all specific feature types extend. This feature has a po...
Definition: DtFeature.h:32
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
DtElementAttribute is a common base class used for all element attributes, such as those found in a D...
Definition: DtElementAttribute.h:20
The DtEntityFacade is a facade around agents that make up an entity. This entity facade represents a ...
Definition: DtBuoyOrBeaconFacade.h:24
std::string mySceneFileName
Definition: DtSceneDriver.h:128
Contains makVrv::DtOverlaySettings class.
Contains DLL export macros.

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)