osgEarth 2.1.1
|
Base class for the configuration for a terrain engine driver.
Definition at line 118 of file TerrainOptions.
Available techniques for compositing image layers at runtime.
COMPOSITING_AUTO | |
COMPOSITING_TEXTURE_ARRAY | |
COMPOSITING_MULTITEXTURE_GPU | |
COMPOSITING_MULTITEXTURE_FFP | |
COMPOSITING_MULTIPASS |
Definition at line 182 of file TerrainOptions.
TerrainOptions::TerrainOptions | ( | const ConfigOptions & | options = ConfigOptions() | ) |
Definition at line 88 of file TerrainOptions.cpp.
: DriverConfigOptions( options ), _verticalScale( 1.0f ), _heightFieldSampleRatio( 1.0f ), _minTileRangeFactor( 6.0 ), _normalizeEdges( false ), _combineLayers( true ), _loadingPolicy( LoadingPolicy() ), _compositingTech( COMPOSITING_AUTO ), _maxLOD( 23 ), _enableLighting( false ), _attenuationDistance( 1000000 ), _lodBlending( false ), _lodTransitionTimeSeconds( 0.5f ), _elevationInterpolation( INTERP_BILINEAR ), _enableMipmapping( true ) { fromConfig( _conf ); }
const optional<float>& osgEarth::TerrainOptions::attentuationDistance | ( | ) | const [inline] |
Definition at line 171 of file TerrainOptions.
{ return _attenuationDistance; }
optional<float>& osgEarth::TerrainOptions::attenuationDistance | ( | ) | [inline] |
The image-layer fading attenuation distance
Definition at line 170 of file TerrainOptions.
{ return _attenuationDistance; }
const optional<bool>& osgEarth::TerrainOptions::combineLayers | ( | ) | const [inline] |
Definition at line 159 of file TerrainOptions.
{ return _combineLayers; }
optional<bool>& osgEarth::TerrainOptions::combineLayers | ( | ) | [inline] |
Whether to apply the default layer combination logic using TexEnvCombine. Set this to false if you want to assume all control of how layers are combined. This only applies when the LayeringTechnique is MULTITEXTURE. Default = true.
Definition at line 158 of file TerrainOptions.
{ return _combineLayers; }
optional<CompositingTechnique>& osgEarth::TerrainOptions::compositingTechnique | ( | ) | [inline] |
The texture composition technique
Definition at line 194 of file TerrainOptions.
{ return _compositingTech; }
const optional<CompositingTechnique>& osgEarth::TerrainOptions::compositingTechnique | ( | ) | const [inline] |
Definition at line 195 of file TerrainOptions.
{ return _compositingTech; }
optional<ElevationInterpolation>& osgEarth::TerrainOptions::elevationInterpolation | ( | void | ) | [inline] |
The interpolation method to use when sampling heightfields.
Definition at line 212 of file TerrainOptions.
{ return _elevationInterpolation; }
const optional<ElevationInterpolation>& osgEarth::TerrainOptions::elevationInterpolation | ( | void | ) | const [inline] |
Definition at line 213 of file TerrainOptions.
{ return _elevationInterpolation;}
optional<bool>& osgEarth::TerrainOptions::enableLighting | ( | ) | [inline] |
Whether to explicity enable or disable GL lighting on the map node.
Definition at line 206 of file TerrainOptions.
{ return _enableLighting; }
const optional<bool>& osgEarth::TerrainOptions::enableLighting | ( | ) | const [inline] |
Definition at line 207 of file TerrainOptions.
{ return _enableLighting; }
optional<bool>& osgEarth::TerrainOptions::enableMipmapping | ( | ) | [inline] |
Whether to enable mipmaping and mipmap generation on textures
Definition at line 218 of file TerrainOptions.
{ return _enableMipmapping; }
const optional<bool>& osgEarth::TerrainOptions::enableMipmapping | ( | ) | const [inline] |
Definition at line 219 of file TerrainOptions.
{ return _enableMipmapping; }
void TerrainOptions::fromConfig | ( | const Config & | conf | ) | [private] |
Reimplemented from osgEarth::DriverConfigOptions.
Reimplemented in osgEarth::Drivers::OSGTerrainOptions, and osgEarth::Drivers::SeamlessOptions.
Definition at line 141 of file TerrainOptions.cpp.
{ conf.getObjIfSet( "loading_policy", _loadingPolicy ); conf.getIfSet( "vertical_scale", _verticalScale ); conf.getIfSet( "sample_ratio", _heightFieldSampleRatio ); conf.getIfSet( "min_tile_range_factor", _minTileRangeFactor ); conf.getIfSet( "normalize_edges", _normalizeEdges ); conf.getIfSet( "combine_layers", _combineLayers ); conf.getIfSet( "max_lod", _maxLOD ); conf.getIfSet( "lighting", _enableLighting ); conf.getIfSet( "attenuation_distance", _attenuationDistance ); conf.getIfSet( "lod_transition_time", _lodTransitionTimeSeconds ); conf.getIfSet( "mipmapping", _enableMipmapping ); conf.getIfSet( "compositor", "auto", _compositingTech, COMPOSITING_AUTO ); conf.getIfSet( "compositor", "texture_array", _compositingTech, COMPOSITING_TEXTURE_ARRAY ); conf.getIfSet( "compositor", "multitexture", _compositingTech, COMPOSITING_MULTITEXTURE_GPU ); conf.getIfSet( "compositor", "multitexture_gpu", _compositingTech, COMPOSITING_MULTITEXTURE_GPU ); conf.getIfSet( "compositor", "multitexture_ffp", _compositingTech, COMPOSITING_MULTITEXTURE_FFP ); conf.getIfSet( "compositor", "multipass", _compositingTech, COMPOSITING_MULTIPASS ); conf.getIfSet( "elevation_interpolation", "nearest", _elevationInterpolation, INTERP_NEAREST); conf.getIfSet( "elevation_interpolation", "average", _elevationInterpolation, INTERP_AVERAGE); conf.getIfSet( "elevation_interpolation", "bilinear", _elevationInterpolation, INTERP_BILINEAR); conf.getIfSet( "elevation_interpolation", "triangulate", _elevationInterpolation, INTERP_TRIANGULATE); }
Config TerrainOptions::getConfig | ( | ) | const [virtual] |
Gets or sets the name of the object
Reimplemented from osgEarth::DriverConfigOptions.
Reimplemented in osgEarth::Drivers::OSGTerrainOptions, and osgEarth::Drivers::SeamlessOptions.
Definition at line 109 of file TerrainOptions.cpp.
{ Config conf = DriverConfigOptions::getConfig(); conf.key() = "terrain"; conf.updateObjIfSet( "loading_policy", _loadingPolicy ); conf.updateIfSet( "vertical_scale", _verticalScale ); conf.updateIfSet( "sample_ratio", _heightFieldSampleRatio ); conf.updateIfSet( "min_tile_range_factor", _minTileRangeFactor ); conf.updateIfSet( "normalize_edges", _normalizeEdges ); conf.updateIfSet( "combine_layers", _combineLayers ); conf.updateIfSet( "max_lod", _maxLOD ); conf.updateIfSet( "lighting", _enableLighting ); conf.updateIfSet( "attenuation_distance", _attenuationDistance ); conf.updateIfSet( "lod_transition_time", _lodTransitionTimeSeconds ); conf.updateIfSet( "mipmapping", _enableMipmapping ); conf.updateIfSet( "compositor", "auto", _compositingTech, COMPOSITING_AUTO ); conf.updateIfSet( "compositor", "texture_array", _compositingTech, COMPOSITING_TEXTURE_ARRAY ); conf.updateIfSet( "compositor", "multitexture", _compositingTech, COMPOSITING_MULTITEXTURE_GPU ); conf.updateIfSet( "compositor", "multitexture_ffp", _compositingTech, COMPOSITING_MULTITEXTURE_FFP ); conf.updateIfSet( "compositor", "multipass", _compositingTech, COMPOSITING_MULTIPASS ); conf.updateIfSet( "elevation_interpolation", "nearest", _elevationInterpolation, INTERP_NEAREST); conf.updateIfSet( "elevation_interpolation", "average", _elevationInterpolation, INTERP_AVERAGE); conf.updateIfSet( "elevation_interpolation", "bilinear", _elevationInterpolation, INTERP_BILINEAR); conf.updateIfSet( "elevation_interpolation", "triangulate", _elevationInterpolation, INTERP_TRIANGULATE); return conf; }
const optional<float>& osgEarth::TerrainOptions::heightFieldSampleRatio | ( | ) | const [inline] |
Definition at line 136 of file TerrainOptions.
{ return _heightFieldSampleRatio; }
optional<float>& osgEarth::TerrainOptions::heightFieldSampleRatio | ( | ) | [inline] |
The sample ratio for height fields. I.e., the terrain engine will sample heightfield grids at this ratio Default = 1.0
Definition at line 135 of file TerrainOptions.
{ return _heightFieldSampleRatio; }
optional<LoadingPolicy>& osgEarth::TerrainOptions::loadingPolicy | ( | ) | [inline] |
Properties associated with the tile loading subsystem.
Definition at line 164 of file TerrainOptions.
{ return _loadingPolicy; }
const optional<LoadingPolicy>& osgEarth::TerrainOptions::loadingPolicy | ( | ) | const [inline] |
Definition at line 165 of file TerrainOptions.
{ return _loadingPolicy; }
const optional<float>& osgEarth::TerrainOptions::lodTransitionTime | ( | ) | const [inline] |
Definition at line 177 of file TerrainOptions.
{ return _lodTransitionTimeSeconds; }
optional<float>& osgEarth::TerrainOptions::lodTransitionTime | ( | ) | [inline] |
Transition time, in seconds, for tile image fade-in when LOD blending is enabled
Definition at line 176 of file TerrainOptions.
{ return _lodTransitionTimeSeconds; }
optional<int>& osgEarth::TerrainOptions::maxLOD | ( | ) | [inline] |
The maximum level of detail to which the terrain should subdivide.
Definition at line 200 of file TerrainOptions.
{ return _maxLOD; }
const optional<int>& osgEarth::TerrainOptions::maxLOD | ( | ) | const [inline] |
Definition at line 201 of file TerrainOptions.
{ return _maxLOD; }
virtual void osgEarth::TerrainOptions::mergeConfig | ( | const Config & | conf | ) | [inline, protected, virtual] |
Reimplemented from osgEarth::DriverConfigOptions.
Reimplemented in osgEarth::Drivers::OSGTerrainOptions, and osgEarth::Drivers::SeamlessOptions.
Definition at line 225 of file TerrainOptions.
{ DriverConfigOptions::mergeConfig( conf ); fromConfig( conf ); }
const optional<float>& osgEarth::TerrainOptions::minTileRangeFactor | ( | ) | const [inline] |
Definition at line 143 of file TerrainOptions.
{ return _minTileRangeFactor; }
optional<float>& osgEarth::TerrainOptions::minTileRangeFactor | ( | ) | [inline] |
The minimum tile LOD range as a factor of the tile's radius. Default = 6.0.
Definition at line 142 of file TerrainOptions.
{ return _minTileRangeFactor; }
optional<bool>& osgEarth::TerrainOptions::normalizeEdges | ( | ) | [inline] |
Whether to monitor terrain tile boundaries and match up the vertices. Default = false.
Definition at line 149 of file TerrainOptions.
{ return _normalizeEdges; }
const optional<bool>& osgEarth::TerrainOptions::normalizeEdges | ( | ) | const [inline] |
Definition at line 150 of file TerrainOptions.
{ return _normalizeEdges; }
const optional<float>& osgEarth::TerrainOptions::verticalScale | ( | ) | const [inline] |
Definition at line 128 of file TerrainOptions.
{ return _verticalScale; }
optional<float>& osgEarth::TerrainOptions::verticalScale | ( | ) | [inline] |
Sets or gets the scale factor for height-field values. Default = 1.0
Definition at line 127 of file TerrainOptions.
{ return _verticalScale; }
optional<float> osgEarth::TerrainOptions::_attenuationDistance [private] |
Definition at line 242 of file TerrainOptions.
optional<bool> osgEarth::TerrainOptions::_combineLayers [private] |
Definition at line 237 of file TerrainOptions.
Definition at line 239 of file TerrainOptions.
optional<ElevationInterpolation> osgEarth::TerrainOptions::_elevationInterpolation [private] |
Definition at line 250 of file TerrainOptions.
optional<bool> osgEarth::TerrainOptions::_enableLighting [private] |
Definition at line 241 of file TerrainOptions.
optional<bool> osgEarth::TerrainOptions::_enableMipmapping [private] |
Definition at line 245 of file TerrainOptions.
optional<float> osgEarth::TerrainOptions::_heightFieldSampleRatio [private] |
Definition at line 234 of file TerrainOptions.
Definition at line 238 of file TerrainOptions.
optional<bool> osgEarth::TerrainOptions::_lodBlending [private] |
Definition at line 243 of file TerrainOptions.
optional<float> osgEarth::TerrainOptions::_lodTransitionTimeSeconds [private] |
Definition at line 244 of file TerrainOptions.
optional<int> osgEarth::TerrainOptions::_maxLOD [private] |
Definition at line 240 of file TerrainOptions.
optional<float> osgEarth::TerrainOptions::_minTileRangeFactor [private] |
Definition at line 235 of file TerrainOptions.
optional<bool> osgEarth::TerrainOptions::_normalizeEdges [private] |
Definition at line 236 of file TerrainOptions.
optional<float> osgEarth::TerrainOptions::_verticalScale [private] |
Definition at line 233 of file TerrainOptions.