SceneOptions
Description
- Derived from
-
Disposable abstract
IValidatable
IHeightmapProvider
Configuration options for creating a Scene.
To specify a valid set of scene options, please work through the following steps:
-
If the scene streams raster datasets (see IHeightmap) from online sources, a local dataset cache may be used, to speed up loading of commonly used data. To enable the cache, set the DatasetCachePath property. To further customize the cache, use the DatasetCacheMaximumSize and DatasetCacheFilter properties. To utilize the configured cache, use either IHeightmapProvider.OpenHeightmapDataset or IDataset.UseCache with DatasetCache.
-
Elevation data must be specified via the TerrainHeightmap property. If the given heightmap is not geo-referenced, the terrain geometry must be specified via TerrainGeometry. To use gravity-related heights, the TerrainGeoid and TerrainElevationMode properties must be set accordingly.
-
In most cases, the terrain will have one or more texture layers. Texture data on the GPU is managed by TextureAtlas objects, which must be declared up-front with TextureAtlas. Later, the IScene.AtlasId method may be used to map an atlas identifier to the texture atlas index, see TerrainBufferResource.TextureAtlasAt.The second step is usually performed under the hood by the built-in ISceneEntity implementations (for example TextureLayer).
-
If the scene streams pyramid datasets (see IPixelPyramid) from online sources, a local imagery cache may be used. To enable the cache, set the ImageryCachePath property. To further customize the cache, use the ImageryCacheOptions property.
-
To speed up loading of terrain textures during rendering, a local texture cache may be used. To enable the cache, set the TextureCachePath. To further customize the cache, use the TextureCacheOptions property.
-
To utilize the configured imagery and texture caches, a set of cache identifiers must be declared up-front by calling the CacheId method. Later, the IScene.CacheId method may be used to map a cache identifier to the persistent ordinal number that is used by the underlying PyramidFileCache object. The second step is usually performed under the hood by the built-in ISceneEntity implementations (for example TextureLayer). Cached imagery and texture data remains valid as long as the distinct ordered set of cache identifiers remains unchanged.
-
Additional low-level behaviour of the underlying terrain mesh may be specified via TerrainFlags, TerrainModifier and VertexCapacity.
-
Finally, call CreateScene to create the IScene object.
Public / Methods
CacheId
Declares a cache ID.
When creating scene entities for terrain layers later, a declared cache ID must be given.
CreateScene
Creates a Scene from the current options.
The following validations are performed on the scene options:
-
TerrainHeightmap must be set to a non-null value.
The following geo-referencing information must be available:
-
The IGeometry object obtained from the specification of TerrainGeometry must return a non-null Geocentric object via IGeometry.ToGeocentric.
- IOException
-
If an I/O error has occurred.
- ValidatingException
-
If the scene options are invalid.
- GeorefException
-
If the provided geo-referencing information is invalid or incomplete (see remarks).
UseDatasetCacheIfNotLocal
A PredicateDelegate that returns true
for non-local files (see IFile.IsLocal).
Public / Attributes
DatasetCache
Returns the dataset file cache, creating it if necessary.
- IOException
-
If an I/O error has occurred.
DatasetCacheFilter
The filter to use for deciding whether to cache a dataset or not.
Defaults to UseDatasetCacheIfNotLocal.
- See also
DatasetCacheMaximumSize
Maximum size of the dataset file cache.
The default value is 1024
megabytes.
- See also
ImageryCache
Returns the imagery tile cache, creating it if necessary.
- IOException
-
If an I/O error has occurred.
ImageryCacheOptions
Options to use for creating the imagery tile cache.
Defaults to an instance of PyramidFileCacheOptions with default values.
- See also
TerrainElevationMode
Depicts how to interpret the elevation values in TerrainHeightmap.
Defaults to false
.
- See also
TerrainGeoid
The gravity model of the terrain.
Using a gravity model allows to distinguish between vertical coordinates of types VerticalType.Ellipsoid and VerticalType.Gravity.
Defaults to null
.
- See also
TerrainGeometry
The geometry to use for the terrain.
If null
, a IGeometry object is created with Geometry.ForGeoref, passing TerrainHeightmap as argument.
Defaults to null
.
TextureCacheOptions
Options to use for creating the texture tile cache.
Defaults to an instance of PyramidFileCacheOptions with default values.
- See also