VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtIndirectGeometryDebugging.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2026 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
14 #include <vrvImgui/imgui.h>
15 
18 
19 #include <osg/Group>
20 
21 #include <set>
22 #include <string>
23 #include <vector>
24 
25 namespace makVrv
26 {
27  class DtDe;
28  class DtIndirectGeometry;
29  class DtIndirectGeometryGridNode;
30  class DtIndirectGeometryRegistrar;
31  class DtIndirectModelInfo;
32 
33 
62  {
63  public:
64 
65  static const float theDefaultIdColumnWidth;
66  static const float theDefaultAddressColumnWidth;
67  static const float theDefaultCountColumnWidth;
70 
71  public:
72 
74  DtIndirectGeometryDebugging() = delete;
78  DtIndirectGeometryDebugging& operator=(const DtIndirectGeometryDebugging&) = delete;
79 
81  virtual ~DtIndirectGeometryDebugging();
82 
84  static DtIndirectGeometryDebugging& instance(DtDe& de);
85 
86  protected:
87 
90 
91  public:
92 
96  virtual void updateGui();
97 
98  protected:
99 
102  {
104  : myId(0)
105  , myNumValidInstances(0)
106  {
107  // intentional noop
108  }
109 
110  unsigned int myId;
112  std::string myName;
113  std::string myAddressStr;
115 
116  bool operator<(const IndirectGeometryDebugInfo& other) const
117  {
118  return myId < other.myId;
119  }
120  };
121 
124  {
126  : myNumModels(0)
127  {
128  // intentional noop
129  }
130 
132  std::string myName;
133  std::string myAddressStr;
134 
135  bool operator<(const RegistrarDebugInfo& other) const
136  {
137  return myAddressStr < other.myAddressStr;
138  }
139  };
140 
143  {
144  RegistrarModelEntryDebugInfo(int modelId, const std::string& modelName)
145  : myModelId(modelId)
146  , myModelName(modelName)
147  {
148  // intentional noop
149  }
150 
152  std::string myModelName;
153  };
154 
157  {
158  ModelInfoDofPathDebugInfo(const std::string& nodeName, int parentId, int id)
159  : myNodeName(nodeName)
160  , myParentId(parentId)
161  , myId(id)
162  {
163  // intentional noop
164  }
165 
166  std::string myNodeName;
168  int myId;
169  };
170 
173  {
174  ModelInfoTextureDebugInfo(const std::string& name, int width, int height)
175  : myName(name)
176  , myWidth(width)
177  , myHeight(height)
178  {
179  // intentional noop
180  }
181 
182  std::string myName;
183  int myWidth;
184  int myHeight;
185  };
186 
189  {
191  : myModelId(-1)
192  , myNumSubGeometries(0)
193  , myNumLightSources(0)
194  , myNumMaterials(0)
195  , myNumSwitchPaths(0)
196  , myNumDofPaths(0)
197  , myNumLods(0)
198  {
199  // intentional noop
200  }
201 
203  std::string myModelName;
204  std::string myModelDefName;
211  std::vector<ModelInfoDofPathDebugInfo> myDofPaths;
212  std::vector<ModelInfoTextureDebugInfo> myTextureInfo;
213  };
214 
218  {
220  : myGeometrySpecIdx(-1)
221  , myLodBaseIdx(0)
222  , myLodCount(0)
223  , mySwitchIdx(0)
224  , myDofBaseIdx(0)
225  , myUvOffsetBaseIdx(0)
226  , myInstanceDataIdx(0)
227  {
228  // intentional noop
229  }
230 
232  unsigned int myLodBaseIdx;
233  unsigned int myLodCount;
234  unsigned int mySwitchIdx;
235  unsigned int myDofBaseIdx;
236  unsigned int myUvOffsetBaseIdx;
237  unsigned int myInstanceDataIdx;
238  };
239 
242  {
244  : myInstanceId(-1)
245  , myContainerInstanceId(-1)
246  , myModelId(-1)
247  , myIsTracked(false)
248  , myPositionValid(false)
249  , myLocalPositionX(0.0)
250  , myLocalPositionY(0.0)
251  , myLocalPositionZ(0.0)
252  , myPositionX(0.0)
253  , myPositionY(0.0)
254  , myPositionZ(0.0)
255  {
256  // intentional noop
257  }
258 
261 
264 
267 
270 
273 
279 
281  double myPositionX;
282  double myPositionY;
283  double myPositionZ;
284 
286  std::string myModelName;
287 
289  std::string myTrackName;
290 
292  std::string myOtherData0Str;
293 
295  std::vector<PerGeomInstanceDebugInfo> myPerGeomInstances;
296  };
297 
299  osg::Node* findRootNode() const;
300 
302  virtual void gatherAllIndirectGeometries(osg::Node* node, std::vector<DtIndirectGeometry*>& outGeometries) const;
303 
305  virtual void collectIndirectGeometryInfo(osg::Node* node, std::set<IndirectGeometryDebugInfo>& outInfos,
306  std::set<RegistrarDebugInfo>& outRegistrarInfos) const;
307 
309  virtual void extractIndirectGeometryInfo(DtIndirectGeometry* indirectGeo,
310  std::set<IndirectGeometryDebugInfo>& outInfos, std::set<RegistrarDebugInfo>& outRegistrarInfos) const;
311 
313  virtual int extractLodCount(const DtIndirectModelInfo* modelInfo) const;
314 
316  virtual void extractDofPaths(const DtIndirectModelInfo* modelInfo, std::vector<ModelInfoDofPathDebugInfo>& dofPathInfo) const;
317 
319  virtual void extractTextureInfo(const DtIndirectModelInfo* modelInfo, std::vector<ModelInfoTextureDebugInfo>& outTextureInfo) const;
320 
322  virtual DtIndirectGeometryRegistrar* findMatchingRegistrar(osg::Node* node, const std::string& registrarAddress) const;
323 
331  virtual DtIndirectGeometry* findMatchingGeometry(osg::Node* node, const std::string& geometryAddress) const;
332 
334  virtual void fillModelNamesForRegistrar(const std::string& registrarAddress);
335 
337  virtual void refreshIndirectGeometryInfo();
338 
340  virtual void displayIndirectGeometryInfo();
341 
344  virtual void displayIndirectGeometryTable(ImGuiTableFlags tableFlags, float tableHeight);
345 
348  virtual void displayRegistrarTable(ImGuiTableFlags tableFlags, float tableHeight);
349 
352  virtual void displayRegistrarModelNames();
353 
355  virtual void gatherRegistrarModelInfo(const std::string& registrarAddress,
356  int registrarModelId, RegistrarModelDebugInfo& outModelInfo) const;
357 
360  virtual void displaySelectedRegistrarModelInfo();
361 
364  virtual void displayModelInfoDofPathsDialog();
365 
368  virtual void displayModelInfoTextureNamesDialog();
369 
371  virtual void setSelectedRegistrarAddress(const std::string& address);
372 
374  virtual void setSelectedGeometryAddress(const std::string& address);
375 
383  virtual void fillInstancesForGeometry(const std::string& geometryAddress);
384 
386  virtual void displayGeometryInstances();
387 
389  virtual void displaySelectedInstanceInfo();
390 
394  virtual void showInstancePositionShape(const InstanceDebugInfo& info) const;
395 
396  protected:
397 
399 
400  std::set<IndirectGeometryDebugInfo> myIndirectGeometryInfos;
401  std::set<RegistrarDebugInfo> myRegistrarInfos;
402 
403  std::vector<RegistrarModelEntryDebugInfo> myRegistrarModelEntryInfos;
404 
410 
413 
414  std::vector<InstanceDebugInfo> myInstanceInfos;
418 
421 
429  };
430 }
std::string MyRegistrarAddressStr
Definition: DtIndirectGeometryDebugging.h:114
bool operator<(const RegistrarDebugInfo &other) const
Definition: DtIndirectGeometryDebugging.h:135
Structure to hold registrar model entry debug information.
Definition: DtIndirectGeometryDebugging.h:142
int myInstanceId
The instance id in the indirect geometry.
Definition: DtIndirectGeometryDebugging.h:260
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
int myNumModels
Definition: DtIndirectGeometryDebugging.h:131
std::vector< RegistrarModelEntryDebugInfo > myRegistrarModelEntryInfos
Definition: DtIndirectGeometryDebugging.h:403
std::string myModelDefName
Definition: DtIndirectGeometryDebugging.h:204
RegistrarModelDebugInfo mySelectedRegistrarModelInfo
Definition: DtIndirectGeometryDebugging.h:409
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Structure to hold indirect geometry debug information.
Definition: DtIndirectGeometryDebugging.h:101
RegistrarModelEntryDebugInfo(int modelId, const std::string &modelName)
Definition: DtIndirectGeometryDebugging.h:144
int myNumLightSources
Definition: DtIndirectGeometryDebugging.h:206
ImGuiTextFilter myGeometryAddressFilter
filter for narrowing the geometry table by address
Definition: DtIndirectGeometryDebugging.h:412
std::string mySelectedRegistrarAddress
Definition: DtIndirectGeometryDebugging.h:405
std::string myNodeName
Definition: DtIndirectGeometryDebugging.h:166
Indirect geometry can have multiple models and their corresponding ids registered in it...
Definition: DtIndirectGeometryRegistrar.h:111
Structure to hold registrar debug information.
Definition: DtIndirectGeometryDebugging.h:123
std::string myModelName
Definition: DtIndirectGeometryDebugging.h:203
Definition: imgui.h:275
ModelInfoTextureDebugInfo(const std::string &name, int width, int height)
Definition: DtIndirectGeometryDebugging.h:174
int myNumValidInstances
Definition: DtIndirectGeometryDebugging.h:111
std::vector< PerGeomInstanceDebugInfo > myPerGeomInstances
Per-geometry instance details for this instance.
Definition: DtIndirectGeometryDebugging.h:295
std::string myLastSelectedRegistrarAddress
Definition: DtIndirectGeometryDebugging.h:406
double myLocalPositionX
The local position xyz components (relative to the geometry&#39;s local origin, before the local origin t...
Definition: DtIndirectGeometryDebugging.h:276
RegistrarDebugInfo()
Definition: DtIndirectGeometryDebugging.h:125
int mySelectedRegistrarModelId
Definition: DtIndirectGeometryDebugging.h:407
std::string myAddressStr
Definition: DtIndirectGeometryDebugging.h:113
unsigned int myUvOffsetBaseIdx
Definition: DtIndirectGeometryDebugging.h:236
int myLastSelectedRegistrarModelId
Definition: DtIndirectGeometryDebugging.h:408
int myNumMaterials
Definition: DtIndirectGeometryDebugging.h:207
int myId
Definition: DtIndirectGeometryDebugging.h:168
RegistrarModelDebugInfo()
Definition: DtIndirectGeometryDebugging.h:190
int myGeometrySpecIdx
Definition: DtIndirectGeometryDebugging.h:231
Structure to hold model info dof path debug information.
Definition: DtIndirectGeometryDebugging.h:156
double myPositionZ
Definition: DtIndirectGeometryDebugging.h:283
unsigned int mySwitchIdx
Definition: DtIndirectGeometryDebugging.h:234
std::string myOtherData0Str
Formatted otherData0 vector for display.
Definition: DtIndirectGeometryDebugging.h:292
bool myShowModelInfoDofPathsDialog
Definition: DtIndirectGeometryDebugging.h:425
bool myShowSelectedRegistrarModelInfo
Definition: DtIndirectGeometryDebugging.h:424
bool myShowGeometryInstances
Definition: DtIndirectGeometryDebugging.h:427
std::string myName
Definition: DtIndirectGeometryDebugging.h:182
Contains makVrv::DtVirtualBaseClass class.
double myPositionX
The world position xyz components.
Definition: DtIndirectGeometryDebugging.h:281
InstanceDebugInfo()
Definition: DtIndirectGeometryDebugging.h:243
double myLocalPositionY
Definition: DtIndirectGeometryDebugging.h:277
int myNumSubGeometries
Definition: DtIndirectGeometryDebugging.h:205
std::string mySelectedGeometryAddress
Definition: DtIndirectGeometryDebugging.h:415
std::string myModelName
Definition: DtIndirectGeometryDebugging.h:152
This class inherits from.
Definition: DtIndirectGeometry.h:122
std::string myTrackName
The lifetime tracking name, if tracked.
Definition: DtIndirectGeometryDebugging.h:289
Structure to hold per-instance debug information.
Definition: DtIndirectGeometryDebugging.h:241
int myNumDofPaths
Definition: DtIndirectGeometryDebugging.h:209
std::vector< ModelInfoTextureDebugInfo > myTextureInfo
Definition: DtIndirectGeometryDebugging.h:212
bool myPositionValid
Whether the world position was successfully resolved.
Definition: DtIndirectGeometryDebugging.h:272
unsigned int myInstanceDataIdx
Definition: DtIndirectGeometryDebugging.h:237
std::string myName
Definition: DtIndirectGeometryDebugging.h:132
static const float theDefaultCountColumnWidth
Definition: DtIndirectGeometryDebugging.h:67
static const ImVec4 theDefaultImguiTextHighlightColor
Definition: DtIndirectGeometryDebugging.h:69
Structure to hold per-geometry-instance debug information Mirrors the PerGeomInstance GPU-side struct...
Definition: DtIndirectGeometryDebugging.h:217
ImGuiTextFilter myInstanceFilter
Filter for the instance table (matches instance id or model name).
Definition: DtIndirectGeometryDebugging.h:420
int myHeight
Definition: DtIndirectGeometryDebugging.h:184
bool myIsTracked
Whether lifetime tracking is active for this instance.
Definition: DtIndirectGeometryDebugging.h:269
int myModelId
Definition: DtIndirectGeometryDebugging.h:151
ModelInfoDofPathDebugInfo(const std::string &nodeName, int parentId, int id)
Definition: DtIndirectGeometryDebugging.h:158
int myWidth
Definition: DtIndirectGeometryDebugging.h:183
unsigned int myLodCount
Definition: DtIndirectGeometryDebugging.h:233
A debugging class used to help debug indirect geometry.
Definition: DtIndirectGeometryDebugging.h:61
std::vector< ModelInfoDofPathDebugInfo > myDofPaths
Definition: DtIndirectGeometryDebugging.h:211
bool myShowIndirectGeometryInfo
Definition: DtIndirectGeometryDebugging.h:422
std::string myModelName
The model name associated with this instance.
Definition: DtIndirectGeometryDebugging.h:286
double myPositionY
Definition: DtIndirectGeometryDebugging.h:282
unsigned int myLodBaseIdx
Definition: DtIndirectGeometryDebugging.h:232
Base class to provide boost signal/slot management.
Definition: imgui.h:2080
IndirectGeometryDebugInfo()
Definition: DtIndirectGeometryDebugging.h:103
int myParentId
Definition: DtIndirectGeometryDebugging.h:167
int myContainerInstanceId
The instance id in the instance container.
Definition: DtIndirectGeometryDebugging.h:263
std::set< IndirectGeometryDebugInfo > myIndirectGeometryInfos
Definition: DtIndirectGeometryDebugging.h:400
std::string myAddressStr
Definition: DtIndirectGeometryDebugging.h:133
unsigned int myDofBaseIdx
Definition: DtIndirectGeometryDebugging.h:235
std::string myName
Definition: DtIndirectGeometryDebugging.h:112
Contains DLL export macros.
unsigned int myId
Definition: DtIndirectGeometryDebugging.h:110
int myNumSwitchPaths
Definition: DtIndirectGeometryDebugging.h:208
static const ImVec4 theDefaultImguiHighlightColor
Definition: DtIndirectGeometryDebugging.h:68
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
int myModelId
Definition: DtIndirectGeometryDebugging.h:202
DtDe & myDe
Definition: DtIndirectGeometryDebugging.h:398
int myModelId
The model id associated with this instance.
Definition: DtIndirectGeometryDebugging.h:266
std::string mySelectedGeometryName
Definition: DtIndirectGeometryDebugging.h:416
std::set< RegistrarDebugInfo > myRegistrarInfos
Definition: DtIndirectGeometryDebugging.h:401
Structure to hold detailed registrar model debug information.
Definition: DtIndirectGeometryDebugging.h:188
static const float theDefaultIdColumnWidth
Definition: DtIndirectGeometryDebugging.h:65
double myLocalPositionZ
Definition: DtIndirectGeometryDebugging.h:278
PerGeomInstanceDebugInfo()
Definition: DtIndirectGeometryDebugging.h:219
bool operator<(const IndirectGeometryDebugInfo &other) const
Definition: DtIndirectGeometryDebugging.h:116
int myNumLods
Definition: DtIndirectGeometryDebugging.h:210
Structure to hold model info texture debug information.
Definition: DtIndirectGeometryDebugging.h:172
bool myShowModelInfoTextureNamesDialog
Definition: DtIndirectGeometryDebugging.h:426
bool myShowSelectedInstanceInfo
Definition: DtIndirectGeometryDebugging.h:428
bool myShowRegistrarModelNames
Definition: DtIndirectGeometryDebugging.h:423
static const float theDefaultAddressColumnWidth
Definition: DtIndirectGeometryDebugging.h:66
std::vector< InstanceDebugInfo > myInstanceInfos
Definition: DtIndirectGeometryDebugging.h:414
int mySelectedInstanceIndex
Definition: DtIndirectGeometryDebugging.h:417
Contains the per Model info which the indirect module needs These objects are owned by the Indirect g...
Definition: DtIndirectModelInfo.h:68

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)