VR-Forces Developer's Guide
 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) 2022 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 <unordered_map>
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  public:
36  typedef std::unordered_map<int, std::string> TextureMap;
37 
38  public:
41 
43  virtual ~DtTextureVisitor();
44  public:
49  virtual void apply(osg::Node& node);
50 
55  virtual void apply(osg::Geode& geode);
56 #if 0
57  virtual void apply(osg::ProxyNode& node);
58 #endif
59  virtual const TextureMap& foundTextures() const;
61 
62  protected:
63 
64  virtual void checkTextures( osg::StateSet& ss, osg::Node& node );
65 
66  virtual void addTextureKeyToNode( osg::Node& node, int key );
67  protected:
68 
70  // used for uniqueness tests
71  std::unordered_map<std::string, int> myFoundTextureNames;
73  };
74 
75 }
int myTextureKey
Definition: DtTextureVisitor.h:72
#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
std::unordered_map< int, std::string > TextureMap
typdef a map of textures
Definition: DtTextureVisitor.h:36
std::unordered_map< std::string, int > myFoundTextureNames
Definition: DtTextureVisitor.h:71
Contains DLL export macros.
TextureMap myFoundTextures
Definition: DtTextureVisitor.h:69

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)