VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
proceduralTreesFeatureSource.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2026 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 #pragma once
10 
13 #include <osgEarth/FeatureSource>
14 #include <osgEarthProcedural/VegetationLayer>
15 #include <osgEarthProcedural/VegetationFeatureGenerator>
16 
17 namespace osgEarth
18 {
23  {
24  public:
25  class DT_DLL_vantageTerrainImplementation Options : public TiledFeatureSource::Options
26  {
27  public:
28  META_LayerOptions(osgEarth, Options, TiledFeatureSource::Options);
29  virtual Config getConfig() const;
30  private:
31  void fromConfig(const Config& conf);
32  };
33 
34  public:
35  META_Layer(osgEarth, ProceduralTreesFeatureSource, Options, TiledFeatureSource, proceduraltreesfeatures);
36 
37 
39  Status insert(const TileKey& key, const FeatureList& features, bool overwrite) override;
40 
41  public:
42 
44  Status openImplementation() override;
45 
46  protected:
47 
49  void init() override;
50 
52  void addedToMap(const Map*) override;
53 
55  FeatureCursor* createFeatureCursorImplementation(const Query& query, ProgressCallback* progress) const override;
56 
60 
61 
62  public:
63 
64  bool isWritable() const override;
65 
67  static void setTreeMap(const DtOsgEarthVegetationLayerSourcePager::DtTreeMap& treeMap) { myTreeMap = treeMap; }
68 
69  protected:
70 
72 
75 
77  const Map* myMap = nullptr;
78 
79 
80 
81  };
82 }
83 
Definition: proceduralTreesFeatureSource.h:25
static void setTreeMap(const DtOsgEarthVegetationLayerSourcePager::DtTreeMap &treeMap)
osgearth procedural vegetation layer will generate the tree map (to retrieve trunk width) ...
Definition: proceduralTreesFeatureSource.h:67
osg::ref_ptr< osgEarth::Procedural::VegetationLayer > myVegLayer
Used to extract procedural trees/shrub/ect.
Definition: proceduralTreesFeatureSource.h:74
OSGEARTH_SPECIALIZE_CONFIG(osgEarth::CDBFeatureSource::Options)
#define DT_DLL_vantageTerrainImplementation
This file is used to determine how to build.
Definition: vantageTerrainImplementationDefines.h:28
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
std::map< std::string, treemodel > DtTreeMap
Definition: osgEarthVegetationLayerSourcePager.h:160
static DtOsgEarthVegetationLayerSourcePager::DtTreeMap myTreeMap
hold a copy of the tree map to avoid having to access the vegetation layer for it, which is a bit expensive. This is used by the feature cursor to determine if a tile has any trees in it.
Definition: proceduralTreesFeatureSource.h:59
virtual ~ProceduralTreesFeatureSource()
Definition: proceduralTreesFeatureSource.h:71
FeatureSource that reads procedural trees feature tiles.
Definition: proceduralTreesFeatureSource.h:22

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)