VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtIndirectIndexedMultiSwitch.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>
14 #include <osg/Group>
15 #include <osg/Switch>
16 #include <osg/Geometry>
17 #include <osgEarth/ObjectIndex>
18 #include <osgEarth/FeatureIndex>
19 
20 #include <map>
21 #include <deque>
22 
23 namespace makVrv
24 {
27  class DT_DLL_VRVOSG DtIndirectIndexedMultiSwitch : public osg::Group
28  {
29  public:
30  struct FeatureData
31  {
33  osgEarth::ObjectID myObjectId = 0;
34  osgEarth::FeatureID myFeatureId = -1;
36  std::deque<DtIndirectModelSubGeometry::IndexRange> myIndexData;
37  };
38 
39  typedef std::deque<FeatureData> DequeFeatureData;
40  typedef std::deque<DtIndirectModelSubGeometry::IndexRange> DequeIndexOffset;
41 
42  public:
43  META_Node(vrvOsg, DtIndirectIndexedMultiSwitch);
44 
46  DtIndirectIndexedMultiSwitch(const DtIndirectIndexedMultiSwitch& rhs, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
47 
50 
52  void setFeatureData(const osg::Geometry* geometry, DequeFeatureData& featureData);
53 
55  const DequeFeatureData& getFeatureData(const osg::Geometry* geometry) const;
56 
57  protected:
58 
61 
62  private:
63  std::map<const osg::Geometry*, DequeFeatureData> myFeatureData;
64  };
65 }
unsigned int FeatureID
Definition: DtFeature.h:21
A Vertex Range given to DtIndirectModelSubGeometry to facility targeting a specific subset of the geo...
Definition: DtIndirectModelSubGeometry.h:62
osg::ref_ptr< osg::Switch > myObjectSwitch
Definition: DtIndirectIndexedMultiSwitch.h:32
std::deque< DtIndirectModelSubGeometry::IndexRange > DequeIndexOffset
Definition: DtIndirectIndexedMultiSwitch.h:40
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
This node allows for the indirecting system to index into a geometry object with the intent to have a...
Definition: DtIndirectIndexedMultiSwitch.h:27
Definition: DtIndirectIndexedMultiSwitch.h:30
DtIndirectModelSubGeometry::VertexRange myVertexData
Definition: DtIndirectIndexedMultiSwitch.h:35
Contains makVrv::DtIndirectModelSubGeometry class.
std::map< const osg::Geometry *, DequeFeatureData > myFeatureData
Definition: DtIndirectIndexedMultiSwitch.h:63
Contains DLL export macros.
std::deque< FeatureData > DequeFeatureData
Definition: DtIndirectIndexedMultiSwitch.h:39
std::deque< DtIndirectModelSubGeometry::IndexRange > myIndexData
Definition: DtIndirectIndexedMultiSwitch.h:36

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)