osgEarth 2.1.1
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

osgEarth::TerrainOptions Class Reference

Inheritance diagram for osgEarth::TerrainOptions:
Collaboration diagram for osgEarth::TerrainOptions:

List of all members.

Public Types

enum  CompositingTechnique {
  COMPOSITING_AUTO, COMPOSITING_TEXTURE_ARRAY, COMPOSITING_MULTITEXTURE_GPU, COMPOSITING_MULTITEXTURE_FFP,
  COMPOSITING_MULTIPASS
}

Public Member Functions

 TerrainOptions (const ConfigOptions &options=ConfigOptions())
optional< float > & verticalScale ()
const optional< float > & verticalScale () const
optional< float > & heightFieldSampleRatio ()
const optional< float > & heightFieldSampleRatio () const
optional< float > & minTileRangeFactor ()
const optional< float > & minTileRangeFactor () const
optional< bool > & normalizeEdges ()
const optional< bool > & normalizeEdges () const
optional< bool > & combineLayers ()
const optional< bool > & combineLayers () const
optional< LoadingPolicy > & loadingPolicy ()
const optional< LoadingPolicy > & loadingPolicy () const
optional< float > & attenuationDistance ()
const optional< float > & attentuationDistance () const
optional< float > & lodTransitionTime ()
const optional< float > & lodTransitionTime () const
optional< CompositingTechnique > & compositingTechnique ()
const optional
< CompositingTechnique > & 
compositingTechnique () const
optional< int > & maxLOD ()
const optional< int > & maxLOD () const
optional< bool > & enableLighting ()
const optional< bool > & enableLighting () const
optional
< ElevationInterpolation > & 
elevationInterpolation (void)
const optional
< ElevationInterpolation > & 
elevationInterpolation (void) const
optional< bool > & enableMipmapping ()
const optional< bool > & enableMipmapping () const
virtual Config getConfig () const

Protected Member Functions

virtual void mergeConfig (const Config &conf)

Private Member Functions

void fromConfig (const Config &conf)

Private Attributes

optional< float > _verticalScale
optional< float > _heightFieldSampleRatio
optional< float > _minTileRangeFactor
optional< bool > _normalizeEdges
optional< bool > _combineLayers
optional< LoadingPolicy_loadingPolicy
optional< CompositingTechnique_compositingTech
optional< int > _maxLOD
optional< bool > _enableLighting
optional< float > _attenuationDistance
optional< bool > _lodBlending
optional< float > _lodTransitionTimeSeconds
optional< bool > _enableMipmapping
optional< ElevationInterpolation > _elevationInterpolation

Detailed Description

Base class for the configuration for a terrain engine driver.

Definition at line 118 of file TerrainOptions.


Member Enumeration Documentation

Available techniques for compositing image layers at runtime.

Enumerator:
COMPOSITING_AUTO 
COMPOSITING_TEXTURE_ARRAY 
COMPOSITING_MULTITEXTURE_GPU 
COMPOSITING_MULTITEXTURE_FFP 
COMPOSITING_MULTIPASS 

Definition at line 182 of file TerrainOptions.


Constructor & Destructor Documentation

TerrainOptions::TerrainOptions ( const ConfigOptions options = ConfigOptions())

Definition at line 88 of file TerrainOptions.cpp.

Here is the call graph for this function:


Member Function Documentation

const optional<float>& osgEarth::TerrainOptions::attentuationDistance ( ) const [inline]

Definition at line 171 of file TerrainOptions.

Here is the caller graph for this function:

optional<float>& osgEarth::TerrainOptions::attenuationDistance ( ) [inline]

The image-layer fading attenuation distance

Definition at line 170 of file TerrainOptions.

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; }

Here is the caller graph for this function:

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.

Here is the caller graph for this function:

const optional<ElevationInterpolation>& osgEarth::TerrainOptions::elevationInterpolation ( void  ) const [inline]

Definition at line 213 of file TerrainOptions.

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; }

Here is the caller graph for this function:

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);
}

Here is the call graph for this function:

Here is the caller graph for this function:

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;
}

Here is the call graph for this function:

Here is the caller graph for this function:

const optional<float>& osgEarth::TerrainOptions::heightFieldSampleRatio ( ) const [inline]

Definition at line 136 of file TerrainOptions.

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.

Here is the caller graph for this function:

optional<LoadingPolicy>& osgEarth::TerrainOptions::loadingPolicy ( ) [inline]

Properties associated with the tile loading subsystem.

Definition at line 164 of file TerrainOptions.

{ return _loadingPolicy; }

Here is the caller graph for this function:

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.

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.

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; }

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

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; }

Here is the caller graph for this function:

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; }

Here is the caller graph for this function:

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; }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 242 of file TerrainOptions.

Definition at line 237 of file TerrainOptions.

Definition at line 239 of file TerrainOptions.

Definition at line 250 of file TerrainOptions.

Definition at line 241 of file TerrainOptions.

Definition at line 245 of file TerrainOptions.

Definition at line 234 of file TerrainOptions.

Definition at line 238 of file TerrainOptions.

Definition at line 243 of file TerrainOptions.

Definition at line 244 of file TerrainOptions.

Definition at line 240 of file TerrainOptions.

Definition at line 235 of file TerrainOptions.

Definition at line 236 of file TerrainOptions.

Definition at line 233 of file TerrainOptions.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines