VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LightMapExtension.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright(c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 #ifndef OSGEARTH_LIGHTMAP_EXTENSION
10 #define OSGEARTH_LIGHTMAP_EXTENSION 1
11 
12 #include "LightMapOptions.h"
13 #include "LightMapTerrainEffect.h"
14 #include <osgEarth/Extension>
15 #include <osgEarth/MapNode>
16 #include <osgEarthUtil/Controls>
17 
18 namespace osgEarth { namespace LightMap
19 {
20  using namespace osgEarth;
21 
25  class LightMapExtension : public Extension,
26  public ExtensionInterface<MapNode>,
27  public LightMapOptions
28  {
29  public:
30  META_Object(osgearth_ext_LightMap, LightMapExtension);
31 
32  // CTORs
34  LightMapExtension(const LightMapOptions& options);
35 
36  // DTOR
37  virtual ~LightMapExtension();
38 
39 
40  public: // Extension
41 
42  virtual void setDBOptions(const osgDB::Options* dbOptions);
43 
44  virtual const ConfigOptions& getConfigOptions() const { return *this; }
45 
46 
47  public: // ExtensionInterface<MapNode>
48 
49  bool connect(MapNode* mapNode);
50 
51  bool disconnect(MapNode* mapNode);
52 
53 
54  protected: // Object
55  LightMapExtension(const LightMapExtension& rhs, const osg::CopyOp& op) { }
57  virtual void addLightMapLayer(MapNode* mapNode);
58 
59  private:
60  osg::ref_ptr<const osgDB::Options> myDbOptions;
61  osg::ref_ptr<LightMapTerrainEffect> myEffect;
62  };
63 
64 } } // namespace osgEarth::LightMap
65 
66 #endif // OSGEARTH_LIGHTMAP_EXTENSION

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)