VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtModelInfo.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2024 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
14 
15 #include <tbb/concurrent_unordered_map.h>
16 #include <atomic>
17 
18 namespace makVrv
19 {
20  class DtLodId;
21 
26  {
27  public:
29  DtModelInfo();
30 
32  DtModelInfo( const DtModelInfo& rhs ) = delete;
33 
35  DtModelInfo( DtModelInfo&& rhs ) = delete;
36 
38  virtual ~DtModelInfo();
39 
41  virtual void setNameAndId(const std::string& modelName, int id);
42 
44  virtual const std::string& modelName(void) const;
45 
47  virtual int id(void) const;
48 
50  virtual const DtLodId& lodId(int lodId) const;
51 
54 
64  virtual bool insertLodEntryAndLod(int lodId);
65 
67  virtual int currNextLodId(void) const;
69  virtual void printInfo(void) const;
70  virtual int numOfEntries(void) const;
72 
74  virtual void setRange(float startVal, float endVal);
78  float startVal(void) const;
79  float endVal(void) const;
80  bool rangeValid(void) const;
82 
84  virtual void setModelDefName(const std::string& modelDef);
86  virtual const std::string& modelDefName(void) const;
88 
89  protected:
90  std::string myModelName;
91 
92  std::string myModelDefName;
93 
94  int myId;
95 
101  std::atomic<int> myNextLodId;
102  typedef tbb::concurrent_unordered_map<int, DtLodId> LodIdToDtLodId;
104 
105  float myStartVal;
106  float myEndVal;
107  };
108 }
float myStartVal
Definition: DtModelInfo.h:105
DtModelInfo is a mapping of a &#39;model&#39; name to a &#39;model&#39; id A &#39;model&#39; can have a number of lods...
Definition: DtModelInfo.h:25
Dll export defines.
int myId
Definition: DtModelInfo.h:94
#define DT_DLL_VRVINDIRECTRENDERING
Definition: vrvIndirectRendering.h:19
std::atomic< int > myNextLodId
The calls to insertLodEntryAndLod can come from different threads and in any order. The atomic and the map together maintain the mapping of the lod id coming from outside to the actual DtLodId whose id is generated using the atomic below. The id of DtLodId and the keys for the map may or may not match.
Definition: DtModelInfo.h:101
Notion of an lod; essentially an id A &#39;model&#39; is made up of multiple lods, each with an unique id wit...
Definition: DtLodId.h:23
std::string myModelName
Definition: DtModelInfo.h:90
LodIdToDtLodId myLodIdToDtLodId
Definition: DtModelInfo.h:103
float myEndVal
Definition: DtModelInfo.h:106
std::string myModelDefName
Definition: DtModelInfo.h:92
DtLodId class declaration.
tbb::concurrent_unordered_map< int, DtLodId > LodIdToDtLodId
Definition: DtModelInfo.h:102

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)