VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtTextureVisitor.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
14 #include <osg/NodeVisitor>
15 
16 #include <string>
17 #include <boost/unordered_map.hpp>
18 
19 namespace osg
20 {
21  class Geode;
22  class Node;
23  class ProxyNode;
24  class StateSet;
25 };
26 
27 namespace makVrv
28 {
32  class DT_DLL_VRVOSG DtTextureVisitor : public osg::NodeVisitor
33  {
34 
35  public:
36 
38  typedef boost::unordered_map<int, std::string> TextureMap;
39 
42 
44  virtual ~DtTextureVisitor();
45 
50  virtual void apply(osg::Node& node);
51 
56  virtual void apply(osg::Geode& geode);
57 #if 0
58  virtual void apply(osg::ProxyNode& node);
59 #endif
60  virtual const TextureMap& foundTextures() const;
62 
63  protected:
64 
65  virtual void checkTextures( osg::StateSet& ss, osg::Node& node );
66 
67  virtual void addTextureKeyToNode( osg::Node& node, int key );
68  protected:
69 
71  // used for uniqueness tests
72  boost::unordered_map<std::string, int> myFoundTextureNames;
74  };
75 
76 }
boost::unordered_map< int, std::string > TextureMap
typdef a map of textures
Definition: DtTextureVisitor.h:38
int myTextureKey
Definition: DtTextureVisitor.h:73
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
DtTextureVisitor walks the scene graph and collects the names of all textures found on nodes and draw...
Definition: DtTextureVisitor.h:32
Contains DLL export macros.
TextureMap myFoundTextures
Definition: DtTextureVisitor.h:70
boost::unordered_map< std::string, int > myFoundTextureNames
Definition: DtTextureVisitor.h:72

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)