VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtOsgEffectTextureVisitor.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
14 #include <osg/NodeVisitor>
15 #include <osgDB/Options>
16 #include <set>
17 
18 namespace makVrv
19 {
20  class DtOsgEffectTextureController;
21 
28  class DT_DLL_VRVOSG DtOsgEffectTextureVisitor : public osg::NodeVisitor
29  {
30  public:
31  static const char* IgnoreHint;
32 
34  DtOsgEffectTextureVisitor(DtDe& de, const osgDB::Options* options);
35 
37  virtual ~DtOsgEffectTextureVisitor();
38 
41  void reset();
42 
45  unsigned getNumEffectTexturesInstalled() const;
46 
48  bool isEffectTexture(osg::Texture* tex) const;
49 
53  static void setIgnoreHint(osg::Object* obj, bool val);
54 
55  public: // osg::NodeVisitor overrides
56 
57  void apply(osg::Node& node);
58  void apply(osg::Geode& geode);
59 
60  protected:
61  // Check whether an object should be ignored during traversal
62  bool ignore(osg::Object* obj);
63 
64  // scan a stateset and apply effect textures as necessary.
65  void apply(osg::StateSet* stateSet);
66 
67  bool installEffectTextures(osg::Texture* tex, int texUnit, osg::StateSet* stateSet);
68 
70  unsigned myCount;
71 
72  typedef std::vector<osg::ref_ptr<DtOsgEffectTextureController> > Controllers;
74  osg::ref_ptr<const osgDB::Options> myDbOptions;
75  };
76 }

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)