VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtIndirectGeometryAggregator.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2018 VT-MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
16 
19 
20 #include <osg/NodeVisitor>
21 #include <osg/Geometry>
22 
23 #include <stack>
24 
25 namespace osg
26 {
27  class Texture;
28 }
29 
30 namespace makVrv
31 {
32  class DtIndirectTextureCollectionPolicy;
33 
39  class DT_DLL_VRVOSG DtIndirectGeometryAggregator : public osg::NodeVisitor
40  {
41  public:
57  DtIndirectGeometryAggregator(osg::ref_ptr<osg::Geometry> aggregatedGeometry
58  , VectorGeometryLocations& locations
59  , VectorMaterials& materials
60  , VectorOsgTextures& textures
61  , const DtLodInfo& lodInfo
62  , const DtIndirectTextureCollectionPolicy& textureCollectionPolicy
63  , const std::string& modelFileName);
64 
67 
69  virtual void apply(osg::Geometry& geometry);
70 
72  virtual void apply(osg::Geode& geode);
73 
75  virtual void apply(osg::Node& node);
76 
78  virtual bool geometryNotSupported(const osg::Geometry& geometry) const;
79 
81  virtual int numGeodes() const;
82 
84  virtual int numGeometries() const;
85 
86  protected:
87  virtual DtMaterial findMaterial(osg::StateSet* ss);
88 
89  virtual bool findCullFaceEnabled(osg::StateSet* ss);
90 
91  protected:
94 
95  // references to externally passed in specs, texture, materials
96  // traversal via this visitor will augment
100  osg::ref_ptr<osg::Geometry> myAggregatedGeometry;
101 
102  std::stack<DtIndirectGeometryTexturesPointers> myTextureStack;
103 
104  std::stack<DtMaterial> myMaterialStack;
105 
106  std::stack<bool> myCullFaceEnabledStack;
107 
109 
111 
112  // used only for outputting debug messages
113  const std::string myModelFileName;
114 
116  private:
119  };
120 }

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)