VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtIndirectMetadataNode.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 
13 #include <osgEarth/ObjectIndex>
14 #include <osgEarth/MetadataNode>
15 #include <memory>
16 
17 namespace makVrv
18 {
19  class DtIndirectSharedMetadataNodeWrapper;
20 
24  class DT_DLL_VRVOSGEARTH DtIndirectMetadataNode : public osgEarth::MetadataNode
25  {
26  public:
27  META_Node(vrvOsgEarth, DtIndirectMetadataNode);
28 
30  DtIndirectMetadataNode(const DtIndirectMetadataNode& rhs, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
31 
33  DtIndirectMetadataNode(const std::shared_ptr<DtIndirectSharedMetadataNodeWrapper>& metedata);
34 
35  protected:
38 
40  virtual ~DtIndirectMetadataNode();
41 
42  public:
43  osgEarth::ObjectID add(osgEarth::Feature* feature, bool visible = true) override;
44 
45  void tagDrawable(osg::Drawable* drawable, osgEarth::ObjectID id) const override;
46 
47  void tagNode(osg::Node* node, osgEarth::ObjectID id) const override;
48 
49  void finalize() override;
50 
51  unsigned int getNumFeatures() const override;
52 
53  bool getVisible(unsigned int index) const override;
54 
55  void setVisible(unsigned int index, bool value) override;
56 
57  osgEarth::ObjectID getObjectID(unsigned index) const override;
58 
59  const osgEarth::Feature* getFeature(unsigned int index) const override;
60 
61  int getIndexFromObjectID(osgEarth::ObjectID id) const override;
62 
63  osg::Switch* getOrCreateSwitchNode(unsigned int index);
64 
65  private:
66  std::shared_ptr<DtIndirectSharedMetadataNodeWrapper> myMetadata;
67  };
68 }
std::shared_ptr< DtIndirectSharedMetadataNodeWrapper > myMetadata
Definition: DtIndirectMetadataNode.h:66
#define DT_DLL_VRVOSGEARTH
Definition: vrvOsgEarth.h:21
This node extends osgEarth::MetadataNode in order to bridge the visibile flag into the indirect engin...
Definition: DtIndirectMetadataNode.h:24
Contains DLL export macros.

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)