VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtCdbEffectTextureVisitor.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2025 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
14 
16 
17 #include <vrvCore/DtDe.h>
18 
19 #include <osg/NodeVisitor>
20 
21 #include <boost/thread.hpp>
22 #include <boost/thread/mutex.hpp>
23 
24 #include <map>
25 #include <set>
26 
27 namespace makVrv
28 {
29  class DtOsgEffectTextureController;
30  class DtEffectControllerFactory;
31 
36  class DT_DLL_VRVOSG DtCdbEffectTextureVisitor : public osg::NodeVisitor
37  {
38  public:
42  virtual ~DtCdbEffectTextureVisitor();
43 
44  protected:
45  // osg::NodeVisitor overrides
46  virtual void apply(osg::Node& node);
47  virtual void apply(osg::Geode& geode);
48  virtual void apply(osg::StateSet* stateSet);
49 
50  //If the effectTexture matches the CDBEffectTextureCode, we insert the effect shader in the VP,
51  //thus apply the effect tex to base tex
52  virtual bool checkAndInstallEffectTexture(osg::StateSet* stateSet, osg::Texture* baseTexture,
53  osg::Texture* effectTexture, int baseUnit, int effectUnit, DtCdbEffectTextureType type);
54 
55  typedef std::map<DtCdbEffectTextureType, osg::ref_ptr<DtOsgEffectTextureController> > Controllers;
57  };
58 
62  {
63 
64  public:
67  static DtCdbEffectTextureVisitorCreator& instance(DtDe& de);
68 
70  static void registerInstance(DtDe& de, DtCdbEffectTextureVisitorCreator* instance);
71 
73  virtual DtCdbEffectTextureVisitor* create(DtEffectControllerFactory& effectFactory);
74  };
75 }
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
creator for the DtCdbEffectTextureVisitor class.
Definition: DtCdbEffectTextureVisitor.h:61
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
DtCdbEffectTextureType
Definition: DtCdbEffectTextureUtils.h:24
Contains makVrv::DtDe class.
std::map< DtCdbEffectTextureType, osg::ref_ptr< DtOsgEffectTextureController > > Controllers
Definition: DtCdbEffectTextureVisitor.h:55
Contains makVrv::DtVirtualBaseClass class.
Controllers myControllers
Definition: DtCdbEffectTextureVisitor.h:56
Contains the DtCdbEffectTextureUtils class.
Visitor that locates effect textures and installs them into the scene graph. Run this prior to runnin...
Definition: DtCdbEffectTextureVisitor.h:36
The scene object creators are registered with the scene object factory for accessing DtSceneObjectCre...
Definition: DtEffectControllerFactory.h:31
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)