VR-Forces 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 override {};
33 
35  virtual makVrv::DtUnicode modelSetToString(makVrv::DtModelSetId modelSet) const override
36  { return makVrv::DtUnicode::fromAscii("VRF"); }
37 
39  virtual int stringToModelSet(const makVrv::DtUnicode& modelSetString) const override
40  { return (int)makVrv::DtModelSetId::Models3D; };
41 
43  virtual int numModelSets() const override { return 0; };
44 
47  virtual void setModelSetName(int modelSet, const makVrv::DtUnicode& name) override {}
48 };
49 
52 {
53 public:
55  : DtModelDefinitionManager(de)
56  {
57  }
58 
59  virtual void backup() override {
60  }
61 };
62 
65 {
66 public:
67  virtual ~DtVrfSharedState() override;
68 
71  {
72  public:
74  virtual makVrv::DtDeSharedState* create(makVrv::DtDe& de) override;
75  };
76 
77  friend class Creator;
78 
79 protected:
82 
84  virtual void initialize() override;
85 };
86 
89 {
90 private:
92 
93  DtSingleton(const DtSingleton&);
94  DtSingleton& operator=(const DtSingleton&);
96 
97 public:
100 
101  virtual ~DtSingleton() override;
102 
104  bool abortOnLicenseFailure = true, bool useLicenseErrorDialog = true) override;
105 };
106 
109 {
110 public:
112  {
113  public:
114  virtual makVrv::DtRenderer* create(makVrv::DtDe&) override;
115  };
116 
117  osg::Node* terrainNode();
118  osg::Node* propNode();
119 
121 };
122 
124  : public makVrv::DtOsgFileCache
125 {
126 public:
128  {
129  public:
130  virtual makVrv::DtFileCache* create(makVrv::DtDe& de) override;
131  };
132 
133  friend class Creator;
134 
135  virtual bool needsShaderGeneration(const std::string& filename, const LoadFileOptions& options) const override;
136 
137  virtual void encodeOptionsString(
138  const LoadFileOptions& loadFileOptions, osgDB::ReaderWriter::Options& options) const override;
139 
140  virtual void decodeOptions(
141  const osgDB::ReaderWriter::Options& options, LoadFileOptions& loadFileOptions) const override;
142 
143  osg::ref_ptr<osg::Image> ts_readImageFile(
144  const std::string& inputFilename,
145  const LoadFileOptions& loadFileOptions);
146 
147 protected:
149 };
Definition: singleton.h:123
DtVrfModelDefinitionManager(makVrv::DtDe &de)
Definition: singleton.h:54
The DtOsgRenderer is the component responsible for rendering 3D images onto the screen via OpenSceneG...
Definition: DtOsgRenderer.h:91
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:108
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:51
DtModelSetStringProvider is an interface for a class to provide strings for model sets...
Definition: DtModelSetStringProvider.h:25
InitializationResult
Result codes for the initialize() function.
Definition: DtDe.h:126
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
virtual void getModelSetList(StringList &outList) const override
Get the list of model set names.
Definition: singleton.h:32
virtual void backup() override
Backs up model definitions to backup manager.
Definition: singleton.h:59
Contains makVrv::DtDeSharedState class.
DtVrfModelSetStringProvider(makVrv::DtDe &de)
Definition: singleton.h:30
The DtOsgFileCache creator..
Definition: DtOsgFileCache.h:460
Definition: singleton.h:111
virtual int stringToModelSet(const makVrv::DtUnicode &modelSetString) const override
Get the model set that&#39;s mapped to the specified string.
Definition: singleton.h:39
The OSG implementation of makVrv::DtOsgFileCache. This will cache files as .ive&#39;s for quicker load ti...
Definition: DtOsgFileCache.h:56
Definition: singleton.h:127
The DtDeSharedState represents all the data that is shared between the master and its slaves...
Definition: DtDeSharedState.h:47
Definition: vrfVrvOverrides.h:209
virtual makVrv::DtUnicode modelSetToString(makVrv::DtModelSetId modelSet) const override
Get the string that&#39;s mapped to the specified model set.
Definition: singleton.h:35
std::vector< DtUnicode > StringList
Definition: DtModelSetStringProvider.h:30
virtual void setModelSetName(int modelSet, const makVrv::DtUnicode &name) override
Change the string associated with a model set (if it exists) or add a new string to model set mapping...
Definition: singleton.h:47
Definition: DtFileCache.h:45
This class will remove most of the De functionality so it can simply be used as a singleton...
Definition: singleton.h:88
Creator class for DtDeSharedState.
Definition: DtDeSharedState.h:1306
The DtRenderer is the component responsible for rendering 3D images onto the screen.
Definition: DtRenderer.h:49
Contains makVrv::DtOsgFileCache class.
Contains makVrv::DtModelSetStringProvider class.
Abstract creator base class.
Definition: DtRenderer.h:184
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 ...
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:76
Shared state.
Definition: vrfVrvOverrides.h:65
DtModelSetId
Definition: DtModelSetEnums.h:19
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.
Handles the caching of files. Includes functions for excluding files with certain extensions from bei...
Definition: DtFileCache.h:37
virtual int numModelSets() const override
Get the current number of model set names on the model set list.
Definition: singleton.h:43

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)