VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtMetaFileVisitor.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
17 #include <vrvCore/DtUniqueID.h>
18 #include <osg/NodeVisitor>
19 #include <osgSim/MultiSwitch>
20 #include <osgSim/DOFTransform>
21 
22 namespace makVrv
23 {
24  class DtOsgArticulatedModel;
25 
31  class DtMetaFileVisitor : public osg::NodeVisitor
32  {
33  public:
34 
38  std::vector<DtVirtualBaseClass*>& tickablesVec,
39  const std::string& modelDefName,
40  const DtElementID elementId,
41  const DtUniqueID uniqueId,
42  DtOsgArticulatedModel* model = 0
43  );
44 
46  virtual ~DtMetaFileVisitor();
47 
50  virtual void apply(osg::Node& node);
51 
52  virtual void apply(osg::Geode& geode);
53 
54  virtual void apply(osg::Group& group);
55 
56  virtual void apply(osgSim::MultiSwitch& multiswitch);
57 
58  virtual void apply(osg::Switch& sw);
59 
60  virtual void apply(osgSim::DOFTransform& dof);
62 
64  virtual void matchAndCreateMetaObject(osg::Node& node, int nodeTypeIndex);
65 
68  virtual bool matches(const DtMetaFileManager::NodeLinkage& currLinkage,
69  const osg::Node& n) const;
70 
71  protected:
72 
81  std::vector<DtVirtualBaseClass*>& myCreatedDynamicFeatures;
85  std::string myModelDefinitionName;
88 
93  unsigned int myInstancedSwitchIndex;
95  unsigned int myInstancedDofIndex;
99 
100  unsigned int myInstancedGeodeIndex;
101 
102  unsigned int myInstancedGroupIndex;
103  };
104 }
105 
unsigned int myInstancedGeodeIndex
Definition: DtMetaFileVisitor.h:100
unsigned int myInstancedSwitchIndex
Used for connecting the switch node to the corresponding instanced switch.
Definition: DtMetaFileVisitor.h:93
DtMetaFileVisitor will inspect the nodes of a scene graph and create the right kind of DtMetaObject f...
Definition: DtMetaFileVisitor.h:31
virtual void apply(osg::Node &node)
std::vector< DtVirtualBaseClass * > & myCreatedDynamicFeatures
Vector of dynamic features on this terrain so they can be deleted on page destruction.
Definition: DtMetaFileVisitor.h:81
DtOsgArticulatedModel * myOsgArticulatedModel
The object we are traversing, may be NULL.
Definition: DtMetaFileVisitor.h:87
DtDe & myDe
Definition: DtMetaFileVisitor.h:73
DtElementID myElementId
The element ID of the object we are traversing.
Definition: DtMetaFileVisitor.h:83
Contains makVrv::DtMetaFileManager class.
NodeLinkage structure contains the name and annotation strings for a node.
Definition: DtMetaFileManager.h:40
Contains the declaration for makVrv::DtTickableManagerInterface.
An articulated model manipulator for controlling an articulated model. Supports indirect rendering of...
Definition: DtOsgArticulatedModel.h:67
DtUniqueID DtElementID
The ElementID is a specific type of unique ID used to represent VR-Vantage uniquely defined elements...
Definition: DtUniqueID.h:23
DtMetaFileManager::LinkageValueVec & myDynamicFeatureNames
List of node pointers that have meta data associated with them.
Definition: DtMetaFileVisitor.h:78
DtMetaFileVisitor(DtDe &de, DtMetaFileManager::LinkageValueVec &metaFeatures, std::vector< DtVirtualBaseClass * > &tickablesVec, const std::string &modelDefName, const DtElementID elementId, const DtUniqueID uniqueId, DtOsgArticulatedModel *model=0)
CTOR.
std::string myModelDefinitionName
The model definition name for the object we are traversing.
Definition: DtMetaFileVisitor.h:85
DtMetaObjectFactory & myMetaObjectFactory
Generate the type of feature we need depending on the meta data feature name (set up in vrvOsg...
Definition: DtMetaFileVisitor.h:76
std::vector< LinkageValuePair > LinkageValueVec
ex. vector of node names/annotations and JSON data for those node names/annotations ...
Definition: DtMetaFileManager.h:52
unsigned int myInstancedGroupIndex
Definition: DtMetaFileVisitor.h:102
Factory to create the specific DtMetaObjects registered when vrvOsg starts up.
Definition: DtMetaObjectFactory.h:31
virtual ~DtMetaFileVisitor()
DTOR.
DtUniqueID myUniqueId
For instancing, what is the instance unique ID.
Definition: DtMetaFileVisitor.h:90
Interaction makVrv::DtModelDefinition class.
unsigned int myInstancedMultiswitchIndex
Used for connecting the multiswitch node to the corresponding instanced multiswitch.
Definition: DtMetaFileVisitor.h:98
Contains makVrv::DtMetaObjectFactory class.
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
Contains makVrv::DtOsgTerrainPatchObject class.
unsigned int myInstancedDofIndex
Used for connecting the DoF node to the corresponding instanced DoF.
Definition: DtMetaFileVisitor.h:95
virtual void matchAndCreateMetaObject(osg::Node &node, int nodeTypeIndex)
Match up meta data to particular nodes.
virtual bool matches(const DtMetaFileManager::NodeLinkage &currLinkage, const osg::Node &n) const
Does this node match our meta file feature&#39;s node name or annotation string.
Contains makVrv::DtUniqueID type.
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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)