VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtInstanceParser.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2019 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include <vrvOsg/vrvOsg.h>
12 
13 #include <matrix/vlMath.h>
14 
18 
19 #include <map>
20 #include <bitset>
21 #include <memory>
22 
23 namespace osg
24 {
25  class LightSource;
26  class Node;
27  class Group;
28  class Geode;
29  class LOD;
30  class Sequence;
31  class Switch;
32  class StateSet;
33 }
34 
35 namespace osgSim
36 {
37  class MultiSwitch;
38  class DOFTransform;
39 }
40 namespace osgAnimation
41 {
42  class AnimationMatrixTransform;
43 }
44 
45 namespace makVrv
46 {
47  class DtDe;
53  class DT_DLL_VRVOSG ParseModelVisitor : public osg::NodeVisitor
54  {
55  public:
56 
57 
59  ParseModelVisitor(DtDe& de, const DtArticulatedModelParser::SwitchSetMap& defaultActiveSwitchState);
60 
62  virtual ~ParseModelVisitor();
63 
66  virtual void apply(osg::LightSource& light);
67 
68  virtual void apply(osg::Node& node);
69 
70  virtual void apply(osg::Group& group);
71 
72  virtual void apply(osg::Geode& geode);
73 
74  virtual void apply(osg::LOD& lod);
75 
76  virtual void apply(osg::Sequence& sequence);
77 
78  virtual void apply(osg::Switch& sw);
79 
80  virtual void apply(osgSim::MultiSwitch& multiswitch);
81 
82  virtual void apply(osgSim::DOFTransform& dof);
83 
84  virtual void apply(osgAnimation::AnimationMatrixTransform& dof);
86 
87  virtual void setDefaultLightPointRange( float range );
88 
90  virtual DtInstanceManager::ParserOutput& output();
91 
92  protected:
96  virtual void pushStateSet(osg::Node& node);
97 
101  virtual void popStateSet(osg::Node& node);
102 
103  protected:
104  typedef std::vector<osg::StateSet*> StateStack;
105 
108 
109  typedef std::vector<unsigned int> CounterStack;
110 
113 
116 
119 
120  };
121 }
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Contains makVrv::DtOsgLightPointManager class.
Contains makVrv::DtInstanceManager declaration.
CounterStack myDofCountStack
Stack to track number of DOF children of each DOF in the DOF hierarchy.
Definition: DtInstanceParser.h:112
Visitor to build structures for the instancing system to render a model.
Definition: DtInstanceParser.h:53
std::map< osgSim::MultiSwitch *, SwitchSetList > SwitchSetMap
Definition: DtArticulatedModelParser.h:55
std::vector< unsigned int > CounterStack
Definition: DtInstanceParser.h:109
results of the parsing visitor
Definition: DtInstanceManager.h:352
DtInstanceManager::ParserOutput myOutput
Definition: DtInstanceParser.h:114
StateStack myStateStack
Stack of OSG StateSets encountered.
Definition: DtInstanceParser.h:107
float myDefaultLightPointRange
Definition: DtInstanceParser.h:115
Contains makVrv::DtArticulatedModelParser class.
DtDe & myDe
Definition: DtInstanceParser.h:117
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
std::vector< osg::StateSet * > StateStack
Definition: DtInstanceParser.h:104
const DtArticulatedModelParser::SwitchSetMap & myDefaultActiveSwitchState
Definition: DtInstanceParser.h:118

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)