12 #include <osgEarth/Common>
13 #include <osgEarth/ModelSource>
14 #include <osgEarth/URI>
15 #include <osgEarth/ShaderUtils>
17 namespace makVrv {
namespace oe {
namespace CDB
19 using namespace osgEarth;
42 const optional<std::string>&
getCdbRootDir()
const {
return myCdbRootDir; }
45 void setCdbRootDir(
const std::string& CdbRootDir) { myCdbRootDir = CdbRootDir; }
51 const optional<bool>&
getDebug()
const {
return myDebug; }
98 optional<std::string>&
getCacheId() {
return myCacheId; }
101 const optional<std::string>&
getCacheId()
const {
return myCacheId; }
160 myDebugModelColor(false),
162 myCdbComponentSelector1(0),
163 myCdbComponentSelector2(0),
164 myRenderingMethod(
"INDIRECT_RENDERING"),
165 myNodeCaching(false),
168 myPagingDistanceFile(
""),
169 myLightDefaultValuesFile(
""),
170 myGTSpeedTreeFile(
""),
171 myUseReverseZBuffer(false),
172 myElevationCache(true),
173 myTextureMipMapOffet(0),
174 mySpeedtreeForVRF(false)
188 Config conf = ModelSourceOptions::getConfig();
189 conf.updateIfSet(
"range_factor", myRangeFactor);
190 conf.updateIfSet(
"cdb_root", myCdbRootDir);
191 conf.updateIfSet(
"debug", myDebug);
192 conf.updateIfSet(
"debug_modelcolor", myDebugModelColor);
193 conf.updateIfSet(
"cdb_dataset", myCdbDataset);
194 conf.updateIfSet(
"cdb_component_selector1", myCdbComponentSelector1);
195 conf.updateIfSet(
"cdb_component_selector2", myCdbComponentSelector2);
196 conf.updateIfSet(
"rendering_method", myRenderingMethod);
197 conf.updateIfSet(
"node_caching", myNodeCaching);
198 conf.updateIfSet(
"use_reverse_depth", myUseReverseZBuffer);
199 conf.updateIfSet(
"cacheid", myCacheId);
200 conf.updateIfSet(
"sigsize_file", mySigSizeFile);
201 conf.updateIfSet(
"pagingdistance_file", myPagingDistanceFile);
202 conf.updateIfSet(
"lightdefaultvalues_file", myLightDefaultValuesFile);
203 conf.updateIfSet(
"speedtree_catalog", myGTSpeedTreeFile);
204 conf.updateIfSet(
"elevation_cache", myElevationCache);
205 conf.updateIfSet(
"texture_mipmap_offset", myTextureMipMapOffet);
206 conf.updateIfSet(
"speedtree_enabled", mySpeedtreeForVRF);
215 ModelSourceOptions::mergeConfig(conf);
223 conf.getIfSet(
"range_factor", myRangeFactor);
224 conf.getIfSet(
"cdb_root", myCdbRootDir);
225 conf.getIfSet(
"debug", myDebug);
226 conf.getIfSet(
"debug_modelcolor", myDebugModelColor);
227 conf.getIfSet(
"cdb_dataset", myCdbDataset);
228 conf.getIfSet(
"cdb_component_selector1", myCdbComponentSelector1);
229 conf.getIfSet(
"cdb_component_selector2", myCdbComponentSelector2);
230 conf.getIfSet(
"rendering_method", myRenderingMethod);
231 conf.getIfSet(
"node_caching", myNodeCaching);
232 conf.getIfSet(
"use_reverse_depth", myUseReverseZBuffer);
233 conf.getIfSet(
"cacheid", myCacheId);
234 conf.getIfSet(
"sigsize_file", mySigSizeFile);
235 conf.getIfSet(
"pagingdistance_file", myPagingDistanceFile);
236 conf.getIfSet(
"lightdefaultvalues_file", myLightDefaultValuesFile);
237 conf.getIfSet(
"speedtree_catalog", myGTSpeedTreeFile);
238 conf.getIfSet(
"elevation_cache", myElevationCache);
239 conf.getIfSet(
"texture_mipmap_offset", myTextureMipMapOffet);
240 conf.getIfSet(
"speedtree_enabled", mySpeedtreeForVRF);