osgEarth 2.1.1
Public Types | Public Member Functions | Protected Attributes

osgEarth::LoadingPolicy Class Reference

Collaboration diagram for osgEarth::LoadingPolicy:

List of all members.

Public Types

enum  Mode {
  MODE_SERIAL, MODE_PARALLEL, MODE_SEQUENTIAL, MODE_PREEMPTIVE,
  MODE_STANDARD = MODE_SERIAL
}

Public Member Functions

 LoadingPolicy (const Config &conf=Config())
 LoadingPolicy (const Mode &mode)
virtual Config getConfig () const
virtual void fromConfig (const Config &conf)
optional< Mode > & mode ()
const optional< Mode > & mode () const
optional< float > & numLoadingThreadsPerCore ()
const optional< float > & numLoadingThreadsPerCore () const
const optional< int > & numLoadingThreads () const
optional< int > & numLoadingThreads ()
const optional< int > & numCompileThreads () const
optional< int > & numCompileThreads ()
const optional< float > & numCompileThreadsPerCore () const
optional< float > & numCompileThreadsPerCore ()

Protected Attributes

optional< Mode_mode
optional< int > _numLoadingThreads
optional< float > _numLoadingThreadsPerCore
optional< int > _numCompileThreads
optional< float > _numCompileThreadsPerCore

Detailed Description

The LoadingPolicy configures how the terrain engine loads map data.

Definition at line 31 of file TerrainOptions.


Member Enumeration Documentation

Tile loading modes.

Enumerator:
MODE_SERIAL 

Load tiles one LOD at a tile, serially

MODE_PARALLEL 

Load tiles one LOD at a tile, in parallel

MODE_SEQUENTIAL 

Load tiles using a task service thread pool, enforcing sequential display of tile LODs.

MODE_PREEMPTIVE 

Load tiles using a task service thread pool, but prioritize loading of the highest visible LOD for imagery (elevation data is always sequential).

MODE_STANDARD 

Load tiles using the standard OSG database pager mechanism. The default.

Definition at line 35 of file TerrainOptions.


Constructor & Destructor Documentation

LoadingPolicy::LoadingPolicy ( const Config conf = Config())

Definition at line 28 of file TerrainOptions.cpp.

Here is the call graph for this function:

osgEarth::LoadingPolicy::LoadingPolicy ( const Mode mode)

Member Function Documentation

void LoadingPolicy::fromConfig ( const Config conf) [virtual]

Definition at line 39 of file TerrainOptions.cpp.

{
    conf.getIfSet( "mode", "standard", _mode, MODE_SERIAL );
    conf.getIfSet( "mode", "serial", _mode, MODE_SERIAL );
    conf.getIfSet( "mode", "parallel", _mode, MODE_PARALLEL );
    conf.getIfSet( "mode", "sequential", _mode, MODE_SEQUENTIAL );
    conf.getIfSet( "mode", "preemptive", _mode, MODE_PREEMPTIVE );
    conf.getIfSet( "loading_threads", _numLoadingThreads );
    conf.getIfSet( "loading_threads_per_logical_processor", _numLoadingThreadsPerCore );
    conf.getIfSet( "loading_threads_per_core", _numLoadingThreadsPerCore );
    conf.getIfSet( "compile_threads", _numCompileThreads );
    conf.getIfSet( "compile_threads_per_core", _numCompileThreadsPerCore );
}

Here is the call graph for this function:

Here is the caller graph for this function:

Config LoadingPolicy::getConfig ( ) const [virtual]

Definition at line 54 of file TerrainOptions.cpp.

{
    Config conf( "loading_policy" );
    conf.addIfSet( "mode", "standard", _mode, MODE_STANDARD ); // aka MODE_SERIAL
    conf.addIfSet( "mode", "parallel", _mode, MODE_PARALLEL );
    conf.addIfSet( "mode", "sequential", _mode, MODE_SEQUENTIAL );
    conf.addIfSet( "mode", "preemptive", _mode, MODE_PREEMPTIVE );
    conf.addIfSet( "loading_threads", _numLoadingThreads );
    conf.addIfSet( "loading_threads_per_core", _numLoadingThreadsPerCore );
    conf.addIfSet( "compile_threads", _numCompileThreads );
    conf.addIfSet( "compile_threads_per_core", _numCompileThreadsPerCore );
    return conf;
}

Here is the call graph for this function:

const optional<Mode>& osgEarth::LoadingPolicy::mode ( ) const [inline]

Definition at line 67 of file TerrainOptions.

{ return _mode; }
optional<Mode>& osgEarth::LoadingPolicy::mode ( ) [inline]

Gets or sets the tile loading mode.

Definition at line 66 of file TerrainOptions.

{ return _mode; }

Here is the caller graph for this function:

const optional<int>& osgEarth::LoadingPolicy::numCompileThreads ( ) const [inline]

Gets or sets the number of threads to allocate for regenerating terrain tiles in the background. This only applies in SEQUENTIAL or PREEMPTIVE mode.

Definition at line 94 of file TerrainOptions.

{ return _numCompileThreads; }

Here is the caller graph for this function:

optional<int>& osgEarth::LoadingPolicy::numCompileThreads ( ) [inline]

Definition at line 95 of file TerrainOptions.

{ return _numCompileThreads; }
const optional<float>& osgEarth::LoadingPolicy::numCompileThreadsPerCore ( ) const [inline]

Gets or sets the number of threads to allocate for regenerating terrain tiles in the background. This only applies in SEQUENTIAL or PREEMPTIVE mode.

Definition at line 102 of file TerrainOptions.

Here is the caller graph for this function:

optional<float>& osgEarth::LoadingPolicy::numCompileThreadsPerCore ( ) [inline]

Definition at line 103 of file TerrainOptions.

const optional<int>& osgEarth::LoadingPolicy::numLoadingThreads ( ) const [inline]

Gets or sets the total number of loading threads to use.

In STANDARD mode, this affects the number of OSG database pager threads; in SEQUENTIAL or PREEMPTIVE mode, this sets the number of task thread pool threads.

Definition at line 86 of file TerrainOptions.

{ return _numLoadingThreads; }

Here is the caller graph for this function:

optional<int>& osgEarth::LoadingPolicy::numLoadingThreads ( ) [inline]

Definition at line 87 of file TerrainOptions.

{ return _numLoadingThreads; }
optional<float>& osgEarth::LoadingPolicy::numLoadingThreadsPerCore ( ) [inline]

Gets or sets the number of loading threads to use per CPU core.

In STANDARD mode, this affects the number of OSG database pager threads; in SEQUENTIAL or PREEMPTIVE mode, this sets the number of task thread pool threads.

Definition at line 76 of file TerrainOptions.

Here is the caller graph for this function:

const optional<float>& osgEarth::LoadingPolicy::numLoadingThreadsPerCore ( ) const [inline]

Definition at line 77 of file TerrainOptions.


Member Data Documentation

Definition at line 106 of file TerrainOptions.

Definition at line 109 of file TerrainOptions.

Definition at line 110 of file TerrainOptions.

Definition at line 107 of file TerrainOptions.

Definition at line 108 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