VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfVrvOverrides.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
14 
16 #include <vrvCore/DtTerrain.h>
19 #include <vrvOsg/DtOsgFileCache.h>
20 #include <vrvOsg/DtOsgRenderer.h>
22 #include <vrvUtil/DtDebugLog.h>
23 #include <vrvUtil/DtUnicode.h>
25 
29 
30 namespace osg
31 {
32  class Node;
33 }
34 
35 namespace makVrv
36 {
37  class DtDe;
38 }
39 
42 {
43 public:
44  DtVrfDe();
45 
46  virtual ~DtVrfDe();
47 
48  virtual void setModelDefinitionsDirectory(const DtFilename& f);
49  virtual const DtFilename& modelDefinitionsDirectory() const;
50 
51  virtual void createDebugLog(const std::string& fileName, makVrv::DtDebugLog::PrintLevel level);
52 
53 protected:
54  virtual void postInitialize();
55 
56 protected:
58 };
59 
62 {
63 public:
66  {
67  public:
69  virtual makVrv::DtDeSharedState* create(makVrv::DtDe& de);
70  };
71 
72  friend class Creator;
73 
74 protected:
77 
79  virtual void initialize();
80 };
81 
84 {
85 public:
88  {
89  public:
91  };
92 
93  friend class Creator;
94 
95 protected:
97 
99  makVrv::DtFeatureLayer& addFeatureLayer(
100  const std::string& featureLayerFilename,
102 };
103 
106 {
107 public:
109 
111 
112  void cleanup();
113 
114  virtual void loadDefaults();
115 };
116 
118  : public makVrv::DtOsgFileCache
119 {
120 public:
122  {
123  public:
124  makVrv::DtFileCache* create(makVrv::DtDe& de);
125  };
126 
127  friend class Creator;
128 
129  bool needsShaderGeneration(
130  const std::string& filename,
131  const LoadFileOptions& options) const;
132 
133  void encodeOptionsString(
134  const LoadFileOptions& loadFileOptions,
135  osgDB::ReaderWriter::Options& options) const;
136 
137  void decodeOptions(
138  const osgDB::ReaderWriter::Options& options,
139  LoadFileOptions& loadFileOptions) const;
140 
141  osg::ref_ptr<osg::Image> ts_readImageFile(
142  const std::string& inputFilename,
143  const LoadFileOptions& loadFileOptions);
144 
145 protected:
146  explicit DtVrfOsgFileCache(makVrv::DtDe& de);
147 };
148 
150 {
151 public:
153  {
154  public:
155  virtual makVrv::DtRenderer* create(makVrv::DtDe&);
156  };
157 
158  osg::Node* terrainNode();
159  osg::Node* propNode();
160 
161  explicit DtVrfOsgRenderer(makVrv::DtDe&);
162 };
163 
165 {
166 public:
168 
170 
171 };
172 
174 {
175 public:
176  DtDisabledIndirectManager(makVrv::DtDe& de, bool adjustLodStart, bool connectToPagingSignals);
177 
178  virtual ~DtDisabledIndirectManager();
179 
181  virtual void nodePagedIn(const osg::Node* node, const std::string& fileName, osg::NodePath& parentalNodePath);
182 
184  virtual void nodePagingOut(const osg::Node* node);
185 
187  virtual void addTextureLoaderToSceneGraph(osg::Group& myTerrainGroup);
188 
189 protected:
190 
192  virtual void slot_childLoaded(const osg::Node* child, const std::string& fileName, osg::Node*& returnedNode);
193 
195  virtual void slot_childPagedIn(const osg::Group* page, const osg::Node* child);
196 
198  virtual void slot_childAboutToPageOut(const osg::Group* page, const osg::Node* child);
199 
200 };
201 
203 {
204 public:
205 
207 
209 
211 
212  makVrv::DtPagedTilesIndirectManager* create(bool adjustSkinLodStart, bool connectToPagingSignals) const;
213 
214 };
215 
217 {
218 public:
219  DtVrfModelSetStringProvider(makVrv::DtDe& de) : DtModelSetStringProvider(de) {};
220 
221  virtual void getModelSetList(StringList& outList) const {};
222 
224  virtual makVrv::DtUnicode modelSetToString(int modelSet) const { return makVrv::DtUnicode::fromAscii("VRF"); }
225 
227  virtual int stringToModelSet(const makVrv::DtUnicode& modelSetString) const { return 0; };
228 
230  virtual int numModelSets() const { return 0; };
231 
234  virtual void setModelSetName(int modelSet, const makVrv::DtUnicode& name) {}
235 };
236 
240 {
241 public:
243 
245 
247  virtual void addArticulatedModel(DtVrfOsgArticulatedModel*);
248 
251  virtual int state(int stateNumber) const;
252 
254  virtual void setState(int stateNumber, int stateValue);
255 
256 protected:
257  std::vector<DtVrfOsgArticulatedModel*> myArticulatedModels;
259 };
virtual void slot_childAboutToPageOut(const osg::Group *page, const osg::Node *child)
slot for when paged tile is about to page out called in the main thread just before a tile has been p...
Replaces DtTerrain so we can supply our own DtFeatureLayer type.
Definition: vrfVrvOverrides.h:83
Contains makVrv::DtModelSetRealizationManager class.
The feature layer is a type of terrain layer which contains features, such as points, lines, areas, and props created from them.
Definition: DtFeatureLayer.h:28
virtual void slot_childPagedIn(const osg::Group *page, const osg::Node *child)
slot for when paged tile has already been paged in only called in the main thread.
The DtOsgRenderer is the component responsible for rendering 3D images onto the screen via OpenSceneG...
Definition: DtOsgRenderer.h:125
A unicode string.
Definition: DtUnicode.h:33
static DtPagedTilesIndirectManagerCreator & instance(DtDe &de)
Get the creator for the DtIndirectGeometry use de.registerInstance(DtPagedTilesIndirectManagerCreator...
Definition: vrfVrvOverrides.h:164
handles the management of paged tiles and terrain patches being added to the indirect rendering syste...
Definition: DtPagedTilesIndirectManager.h:55
DtModelSetStringProvider is an interface for a class to provide strings for model sets...
Definition: DtModelSetStringProvider.h:27
virtual void addTextureLoaderToSceneGraph(osg::Group &myTerrainGroup)
Add a texture loader node to the scenegraph.
Definition: vrfVrvOverrides.h:173
Display engine.
Definition: vrfVrvOverrides.h:41
virtual DtPagedTilesIndirectManager * create(bool adjustSkinLodStart, bool connectToPagingSignals) const
Create an instance of a DtIndirectGeometry.
DT_DLL_VRVCORE DtTaitBryan level(const DtCoordinateSystem &cs, const DtVector &localOrigin, double topoHeading)
Returns a level orientation with the topographic heading.
DtFilename myModelDefinitionsDirectory
Definition: vrfVrvOverrides.h:57
Definition: vrfVrvOverrides.h:104
PrintLevel
Definition: DtDebugLog.h:44
Contains makVrv::DtDeSharedState class.
virtual int stringToModelSet(const makVrv::DtUnicode &modelSetString) const
Get the model set that&#39;s mapped to the specified string.
Definition: vrfVrvOverrides.h:227
Definition: vrfVrvOverrides.h:202
Definition: vrfVrvOverrides.h:149
Contains makVrv::DtTerrain class.
The element type manager is responsible for knowing about the types of elements as well as owning the...
Definition: DtElementDefinitionManager.h:494
virtual int state(int stateNumber) const
Get a state of the model Returns -1 if no such state exists.
DtVrfModelSetStringProvider(makVrv::DtDe &de)
Definition: vrfVrvOverrides.h:219
The DtOsgFileCache creator.
Definition: DtOsgFileCache.h:377
Definition: vrfOsgArticulatedModel.h:13
virtual void nodePagedIn(const osg::Node *node, const std::string &fileName, osg::NodePath &parentalNodePath)
Indirect a node directly (utility function) can be used to indirect a scenegraph, so whole openflight...
virtual void setModelSetName(int modelSet, const makVrv::DtUnicode &name)
Change the string associated with a model set (if it exists) or add a new string to model set mapping...
Definition: vrfVrvOverrides.h:234
Definition: vrfVrvOverrides.h:152
The OSG implementation of makVrv::DtOsgFileCache.
Definition: DtOsgFileCache.h:55
Definition: vrfVrvOverrides.h:121
osg::ref_ptr< makVrv::DtRenderToggleTransform > myTransform
Definition: vrfVrvOverrides.h:258
virtual void getModelSetList(StringList &outList) const
Get the list of model set names.
Definition: vrfVrvOverrides.h:221
The DtDeSharedState represents all the data that is shared between the master and its slaves...
Definition: DtDeSharedState.h:42
Definition: vrfVrvOverrides.h:216
std::vector< DtUnicode > StringList
Definition: DtModelSetStringProvider.h:32
The terrain creator for the DtTerrain class.
Definition: DtTerrain.h:477
Definition: DtFileCache.h:60
VRV creator.
Definition: vrfVrvOverrides.h:87
Contains makVrv::DtOsgSceneConnector class.
Creator class for DtDeSharedState.
Definition: DtDeSharedState.h:1055
unsigned long long DtUniqueID
Definition: DtUniqueID.h:22
The DtRenderer is the component responsible for rendering 3D images onto the screen.
Definition: DtRenderer.h:43
Contains makVrv::DtIndirectGeometryCallbackConnector class.
std::vector< DtVrfOsgArticulatedModel * > myArticulatedModels
Definition: vrfVrvOverrides.h:257
Contains makVrv::DtOsgFileCache class.
Contains makVrv::DtPagedTilesIndirectManager class.
Contains makVrv::DtModelSetStringProvider class.
Abstract creator base class.
Definition: DtRenderer.h:153
virtual void loadDefaults()
Load the default definitions.
#define DT_DLL_vantageTerrainImplementation
This file is used to determine how to build.
Definition: vantageTerrainImplementationDefines.h:28
virtual void setState(int stateNumber, int stateValue)
Set the state on the model.
TargetApplication
Definition: DtTerrainOperationRecord.h:26
The abstract interface necessary for agents.
Definition: DtAgentManagerInterface.h:36
virtual void postInitialize()
Connect initialized components and call postInit signal.
virtual void nodePagingOut(const osg::Node *node)
Let the manger know a node is paging out should only be called in the main thread&#39; NOTE: each time th...
virtual int numModelSets() const
Get the current number of model set names on the model set list.
Definition: vrfVrvOverrides.h:230
This special class will allow for multiple articulated models to be added to the same transform...
Definition: vrfVrvOverrides.h:239
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
Creator for the DtPagedTilesIndirectManager class.
Definition: DtPagedTilesIndirectManager.h:196
Shared state.
Definition: vrfVrvOverrides.h:61
virtual void createDebugLog(const std::string &fileName, DtDebugLog::PrintLevel level)
create the debug log for logging information to a file
Definition: vrfVrvOverrides.h:117
VRV Creator.
Definition: vrfVrvOverrides.h:65
static DtUnicode fromAscii(const std::string &ascii)
Create a unicode string from an ascii string, the string MUST be zero terminated if the length is not...
Contains makVrv::DtOsgRenderer class.
virtual makVrv::DtUnicode modelSetToString(int modelSet) const
Get the string that&#39;s mapped to the specified model set.
Definition: vrfVrvOverrides.h:224
Contains makVrv::DtIGLogger class.
A connector class to listen in on signal_terrainPatchCreated and install the DtIndirectGeometryCallba...
Definition: DtIndirectGeometryCallbackConnector.h:25
Handles the caching of files.
Definition: DtFileCache.h:52
DtTerrain is a facade around terrain functionality.
Definition: DtTerrain.h:58
virtual void slot_childLoaded(const osg::Node *child, const std::string &fileName, osg::Node *&returnedNode)
slot for when a paged tile is loaded (but not added to the scenegraph) called by the paged in a backg...

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)