VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EffectMapExtension.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright(c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 #ifndef OSGEARTH_EFFECTMAP_EXTENSION
10 #define OSGEARTH_EFFECTMAP_EXTENSION 1
11 
12 #include "EffectMapOptions.h"
13 #include "EffectMapTerrainEffect.h"
14 #include <osgEarth/Extension>
15 #include <osgEarth/MapNode>
16 #include <set>
17 
18 namespace osgEarth
19 {
20  namespace EffectMap
21  {
22  using namespace osgEarth;
23 
27  class EffectMapExtension : public Extension,
28  public ExtensionInterface<MapNode>,
29  public EffectMapOptions
30  {
31  public:
32  META_Object(osgearth_ext_EffectMap, EffectMapExtension);
33 
34  // CTORs
36  EffectMapExtension(const EffectMapOptions& options);
37 
38  // DTOR
39  virtual ~EffectMapExtension();
40 
41  protected: // Object
43  EffectMapExtension(const EffectMapExtension& rhs, const osg::CopyOp& op) : myEffect(NULL) { }
44 
45 
46  public: // Extension
47 
49  virtual void setDBOptions(const osgDB::Options* dbOptions);
50 
52  virtual const ConfigOptions& getConfigOptions() const { return *this; }
53 
54 
55  public: // ExtensionInterface<MapNode>
56 
58  bool connect(MapNode* mapNode);
59 
61  bool disconnect(MapNode* mapNode);
62 
63 
64  protected: // Object
66  virtual void addEffectMapLayer(MapNode* mapNode);
67 
70  virtual std::string generateShareTexUniformName();
71 
74  virtual std::string generateShareTexMatUniformName();
75 
76  private:
79  static std::set<EffectMapOptions::EffectType> theEffectTypes;
80  static int theEffectMapCount;
81  };
82 
83  }
84 } // namespace osgEarth::EffectMap
85 
86 #endif // OSGEARTH_EFFECTMAP_EXTENSION
osg::ref_ptr< const osgDB::Options > myDbOptions
Definition: EffectMapExtension.h:77
EffectMapExtension(const EffectMapExtension &rhs, const osg::CopyOp &op)
protected copy constructor that does nothing
Definition: EffectMapExtension.h:43
static std::set< EffectMapOptions::EffectType > theEffectTypes
Definition: EffectMapExtension.h:79
static int theEffectMapCount
Definition: EffectMapExtension.h:80
Extension for loading the effect mapping effect on demand.
Definition: EffectMapExtension.h:27
Effect that applies effect mapping to the terrain.
Definition: EffectMapTerrainEffect.h:30
virtual const ConfigOptions & getConfigOptions() const
get the configuration options for this extention (typecast of this object)
Definition: EffectMapExtension.h:52
effect map earth file options
EffectMapTerrainEffect * myEffect
Definition: EffectMapExtension.h:78
Options governing effect mapping of the terrain.
Definition: EffectMapOptions.h:27
Effect that applies effect mapping to the terrain.

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)