VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtIndirectIndicesHelper.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
14 #include <vrvMath/DtAssert.h>
15 
16 #include <vector>
17 #include <string>
18 
19 namespace osg
20 {
21  class Geometry;
22  class PrimitiveSet;
23 }
24 
25 namespace makVrv
26 {
27  class DtDe;
28 
31  {
32  public:
35 
37  virtual ~DtIndirectIndicesHelper();
38 
41 
43  DtIndirectIndicesHelper& operator=(const DtIndirectIndicesHelper&) = delete;
44 
45  public:
47  virtual void copyIndices(std::vector<int>& indices, const osg::Geometry& srcGeometry) const;
48 
50  virtual int calculateNumIndices(const osg::Geometry& srcGeometry) const;
51 
53  virtual void setModelName(const std::string& modelname);
54 
56  virtual bool isModeSupported(int mode) const;
57 
61  virtual std::string toModeString(int mode) const;
62 
66  virtual void setCopyRange(int primitiveSetIndex, int startIndex, int endIndex, int startVertex);
67 
68  protected:
70  virtual bool checkSrcIndicesOk(const osg::Geometry& srcGeometry) const;
71 
73  virtual bool checkAndCopyIndicesIfTriangleElements(std::vector<int>& indices, const osg::PrimitiveSet* primitiveSet) const;
74 
76  virtual bool checkAndCopyIndicesIfDrawArrays(std::vector<int>& indices, const osg::PrimitiveSet* primitiveSet) const;
77 
79  virtual void printDetailsPrimitiveSets(const osg::Geometry& geometry) const;
80 
82  virtual int calculateNumIndices(const osg::PrimitiveSet* primitiveSet) const;
83 
84  protected:
85  // used only for outputting debug messages
86  std::string myModelFileName;
87 
89 
91  int myPrimitiveSetIndex = -1;
92 
94  int myStartIndex = -1;
95 
97  int myEndIndex = -1;
98 
100  int myStartVertex = -1;
101  };
102 }
std::string myModelFileName
Definition: DtIndirectIndicesHelper.h:86
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
utility class to copy src geometry into interleaved vertex format used by bindless ...
Definition: DtIndirectIndicesHelper.h:30
const char int mode
Definition: ioapi.h:38
Contains DLL export macros.
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:72
assert macros
DtDe & myDe
Definition: DtIndirectIndicesHelper.h:88

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)