VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
singleton.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2019 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
7 
8 #pragma once
9 
14 #include <vrvOsg/DtOsgRenderer.h>
15 #include <vrvOsg/DtOsgFileCache.h>
16 
17 namespace makVrv
18 {
19  class DtDe;
20 }
21 
22 namespace makVrf
23 {
24  class DtAppPathResolver;
25 }
26 
28 {
29 public:
30  DtVrfModelSetStringProvider(makVrv::DtDe& de) : DtModelSetStringProvider(de) {};
31 
32  virtual void getModelSetList(StringList& outList) const {};
33 
35  virtual makVrv::DtUnicode modelSetToString(int modelSet) const { return makVrv::DtUnicode::fromAscii("VRF"); }
36 
38  virtual int stringToModelSet(const makVrv::DtUnicode& modelSetString) const { return 0; };
39 
41  virtual int numModelSets() const { return 0; };
42 
45  virtual void setModelSetName(int modelSet, const makVrv::DtUnicode& name) {}
46 };
47 
50 {
51 public:
53  : DtModelDefinitionManager(de)
54  {
55  }
56 
57  virtual void backup()
58  {
59  }
60 };
61 
64 {
65 public:
66  virtual ~DtVrfSharedState();
67 
70  {
71  public:
73  virtual makVrv::DtDeSharedState* create(makVrv::DtDe& de);
74  };
75 
76  friend class Creator;
77 
78 protected:
81 
83  virtual void initialize();
84 };
85 
88 {
89 private:
91 
92  DtSingleton(const DtSingleton&);
93  DtSingleton& operator=(const DtSingleton&);
95 
96 public:
99 
100  virtual ~DtSingleton();
101 
102  virtual InitializationResult initialize( bool abortOnLicenseFailure = true, bool useLicenseErrorDialog=true );
103 };
104 
107 {
108 public:
110  {
111  public:
112  virtual makVrv::DtRenderer* create(makVrv::DtDe&);
113  };
114 
115  osg::Node* terrainNode();
116  osg::Node* propNode();
117 
119 };
120 
122  : public makVrv::DtOsgFileCache
123 {
124 public:
126  {
127  public:
128  makVrv::DtFileCache* create(makVrv::DtDe& de);
129  };
130 
131  friend class Creator;
132 
133  bool needsShaderGeneration(
134  const std::string& filename,
135  const LoadFileOptions& options) const;
136 
137  void encodeOptionsString(
138  const LoadFileOptions& loadFileOptions,
139  osgDB::ReaderWriter::Options& options) const;
140 
141  void decodeOptions(
142  const osgDB::ReaderWriter::Options& options,
143  LoadFileOptions& loadFileOptions) const;
144 
145  osg::ref_ptr<osg::Image> ts_readImageFile(
146  const std::string& inputFilename,
147  const LoadFileOptions& loadFileOptions);
148 
149 protected:
151 };
Definition: singleton.h:121
DtVrfModelDefinitionManager(makVrv::DtDe &de)
Definition: singleton.h:52
The DtOsgRenderer is the component responsible for rendering 3D images onto the screen via OpenSceneG...
Definition: DtOsgRenderer.h:87
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
Override to provide minimal renderer functionality.
Definition: singleton.h:106
The model definition manager is responsible to managing all of the model definitions the IG knows abo...
Definition: DtModelDefinitionManager.h:78
Time saving override. Do not allow backups.
Definition: singleton.h:49
virtual void backup()
Backs up model definitions to backup manager.
Definition: singleton.h:57
DtModelSetStringProvider is an interface for a class to provide strings for model sets...
Definition: DtModelSetStringProvider.h:24
InitializationResult
Result codes for the initialize() function.
Definition: DtDe.h:113
Singleton for resolving path variables (DATA_DIR, USER_DIR, etc)
Definition: appPathResolver.h:21
#define DT_DLL_vrfmodelmanager
This file is used to determine how to build.
Definition: vrfModelManagerDefines.h:24
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: singleton.h:38
DtVrfModelSetStringProvider(makVrv::DtDe &de)
Definition: singleton.h:30
The DtOsgFileCache creator..
Definition: DtOsgFileCache.h:388
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: singleton.h:45
Definition: singleton.h:109
The OSG implementation of makVrv::DtOsgFileCache. This will cache files as .ive&#39;s for quicker load ti...
Definition: DtOsgFileCache.h:54
Definition: singleton.h:125
virtual void getModelSetList(StringList &outList) const
Get the list of model set names.
Definition: singleton.h:32
The DtDeSharedState represents all the data that is shared between the master and its slaves...
Definition: DtDeSharedState.h:44
Definition: vrfVrvOverrides.h:213
std::vector< DtUnicode > StringList
Definition: DtModelSetStringProvider.h:29
Definition: DtFileCache.h:44
This class will remove most of the De functionality so it can simply be used as a singleton...
Definition: singleton.h:87
Creator class for DtDeSharedState.
Definition: DtDeSharedState.h:1248
The DtRenderer is the component responsible for rendering 3D images onto the screen.
Definition: DtRenderer.h:43
Contains makVrv::DtOsgFileCache class.
Contains makVrv::DtModelSetStringProvider class.
Abstract creator base class.
Definition: DtRenderer.h:164
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 ...
virtual int numModelSets() const
Get the current number of model set names on the model set list.
Definition: singleton.h:41
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:70
Shared state.
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: singleton.h:35
Handles the caching of files. Includes functions for excluding files with certain extensions from bei...
Definition: DtFileCache.h:36

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)