IScene

Description

interface Tinman.Engine.Scenes.IScene

Represents a high-level API for animated 3D-scenes that are based on a terrain.

Access to scene functionality is provided by a hierarchy of interfaces and classes. As best practice, at a specific location in the code, the type with the highest generalization should be used:

  • IScene
    General purpose scene management, not including callbacks for application loop integration.

  • Scene
    Implementation class that provides access to the callback for application loop integration.

See also

SceneOptions

Public / Methods

Atlas​Id


public method AtlasId → (1)

atlasId in : string

[not-empty]
The texture atlas ID.

returns → int32

The cache ordinal. Will be -1 iff not found.

Returns the ordinal for the given texture atlas ID.

Cache​Id


public method CacheId → (1)

cacheId in : string

[not-empty]
The cache ID.

returns → int32

The cache ordinal. Will be -1 iff not found.

Returns the ordinal for the given cache ID.

Clear​Dataset​Cache


public method ClearDatasetCache → ()

Clears the dataset cache, if configured.

IOException

If an I/O error has occurred.

Clear​Imagery​Cache


public method ClearImageryCache → ()

Clears the imagery cache, if configured.

IOException

If an I/O error has occurred.

Clear​Texture​Cache


public method ClearTextureCache → ()

Clears the texture cache, if configured.

IOException

If an I/O error has occurred.

Distance​To​Ground


[Pure]
public method DistanceToGround → (1)

point in : Vec3D

The point.

returns → float64

The distance of point in to the ground.

Computes the distance to the ground, in any direction.

Evict


public method Evict → (1)

resource in : IResourceHandle

The resource handle that shall be evicted.

The given resource is no longer used and may be evicted from all GPU caches.

It is not necessary to call this method. However, if it is considered best practice that all scene entities tell their scene when a resource will never be used again, so that cleanup can be performed up-front.

Heading​To​North


[Pure]
public method HeadingToNorth → (2)

point in : Vec3D

The point, in terrain-space.

direction in : Vec3D

The direction vector, in terrain-space.

returns → float64

The heading angle, in degrees (0 is North, 90 is West, 180 is South, 270 is West).

Computes the heading angle to North.

Inclination​To​Ground


[Pure]
public method InclinationToGround → (2)

point in : Vec3D

The point, in terrain-space.

direction in : Vec3D

The direction vector, in terrain-space.

returns → float64

The inclination angle, in degrees (0 is horizontal, -90 is vertical down, 90 is vertical up.

Computes the inclination angle to the ground, not taking into account the elevation model.

Transform


[Pure]
public method Transform → (2)

coordinates in : LatLonHeight

The geographic coordinates.

headingPitchRoll in : Vec3D

The rotation angles to apply in local-space:
Vec3D.X : the geographic heading of the positive Z-axis in local-space, in degrees, see YawPitchRollTransform.Yaw,
Vec3D.Y : the pitch angle, see YawPitchRollTransform.Pitch,
Vec3D.Z : the roll angle, see YawPitchRollTransform.Roll,

returns → AffineTransform

The transformation.

Computes a transformation matrix from the given local-space to terrain-space.

Transform​Ground


[Pure]
public method TransformGround → (4)

coordinates in : LatLon

The geographic coordinates.

tripod in : Tripod

[not-null]
The tripod helper to use for ground-alignment.

heading opt : float64 = 0

The geographic heading of the positive Z-axis in local-space, in degrees, see YawPitchRollTransform.Yaw.

invariant opt : bool = true

true to use VerticalType.Height,
false to use VerticalType.HeightMesh.

returns → AffineTransform

The transformation.

Computes a ground-aligned transformation matrix from the given local-space to terrain-space.

This method is intended to be used for placing objects statically in the scene and thus uses VerticalType.Height by default. When placing objects dynamically, please consider passing false to invariant opt.

Public / Attributes

Correction


[Constant]
public attribute Correction → (get)

value : CorrectionLayer

[not-null]
The terrain corrections.

The terrain corrections.

Dataset​Cache


[Constant]
public attribute DatasetCache → (get)

value : DatasetFileCache

The dataset file cache or null if none.

Returns the dataset file cache.

The cache will never be in read-only mode (see DatasetFileCache.IsReadOnly).

Entities


[Constant]
public attribute Entities → (get)

value : IArrayVector<ISceneEntity>

[not-null]
The scene entities.

Returns the entities that are currently attached to this scene.

This is a flat list that contains all scene entities, including those that have been added implicitly to the scene via SceneEntity objects. It is sorted in ascending order, according to the ISceneObject.Order values of the contained scene entities.

Geocentric


[Constant]
public attribute Geocentric → (get)

value : Geocentric

[not-null]
The Geocentric object.

The Geocentric helper object, as returned by TerrainMesh.Geocentric.

Imagery​Cache


[Constant]
public attribute ImageryCache → (get)

value : PyramidFileCache

The imagery tile cache or null if none.

Returns the imagery tile cache.

The value of PyramidFileCache.IsReadOnly may be specified at creation time, by setting SceneOptions.ImageryCacheOptions to null.

Setting PyramidFileCache.Locked to true will prevent accesses to the underlying IPixelPyramid objects. This can be used to avoid billable transactions at a streaming provider such as GoogleMaps or BingMaps.

Terrain


[Constant]
public attribute Terrain → (get)

value : TerrainMesh

[not-null]
The terrain mesh object.

The terrain mesh of this scene.

Terrain​Elevation


[Constant]
public attribute TerrainElevation → (get)

value : VerticalRange

The elevation range.

Returns the elevation range of the terrain.

Terrain​Geometry


[Constant]
public attribute TerrainGeometry → (get)

value : IGeometry

[not-null]
The geometry.

Returns the IGeometry of the terrain.

Terrain​Heightmap


[Constant]
public attribute TerrainHeightmap → (get)

value : IHeightmap

[not-null]
The heightmap.

Returns the IHeightmap of the terrain.

Terrain​Transform


[Constant]
public attribute TerrainTransform → (get)

value : IMapTransform

[not-null]
The map transform.

Returns the IMapTransform of the terrain heightmap.

Texture​Cache


[Constant]
public attribute TextureCache → (get)

value : PyramidFileCache

The texture tile cache or null if none.

Returns the texture tile cache.

The PyramidFileCache.Locked property of the texture file cache should not be set to true.

Views


[Constant]
public attribute Views → (get)

value : IVectorConst<SceneView>

[not-null]
The scene views.

Returns the views that have been created on this scene.

World


[Constant]
public attribute World → (get)

value : ICameraWorld

[not-null]
The camera world.

Returns a ICameraWorld object for this Scene.

The returned object will use spatial queries based on ISceneQueryProvider.QueryDistance and SceneQueryOp.ForRay, which take a spatial query filter mask as a parameter. The parameter value will be taken from WorldMask.

See also

IScene.WorldMask

World​Mask


public attribute WorldMask → (get,set)

value : int64

The spatial query filter mask.

The spatial query filter mask to use for World.

Defaults to ~0.

Extensions

Topocentric


[Pure]
public static method Topocentric → (2)

center in : LatLon

The center of the coordinate system, i.e. the origin of the projected coordinate system.

method opt : int32 = 0

The map projection to use, see CoordinateSystem.Topocentric.

returns → CoordinateSystem

The projected coordinate system.

Computes a topocentric coordinate system.

Transform

5 overloads


[Pure]
public static method Transform1 → (4)

coordinates in : string

The geographic coordinates, see LatLon.ToString2.

heading opt : float64 = 0

The geographic heading of the positive Z-axis in local-space, in degrees (i.e. the yaw angle, see YawPitchRollTransform.Yaw).

vertical opt : float64 = 0

The vertical coordinate.

verticalType opt : VerticalType = VerticalType.Height

The vertical coordinate type.

returns → AffineTransform

The transformation.

Computes a transformation matrix from the given local-space to terrain-space.

This method is intended to be used for placing objects statically in the scene and thus uses VerticalType.Height by default. When placing objects dynamically, please consider passing VerticalType.HeightMesh to verticalType opt.

ValidatingException

If the given coordinates in input string is invalid.


[Pure]
public static method Transform2 → (4)

coordinates in : string

The geographic coordinates, see LatLon.ToString2.

headingPitchRoll in : Vec3D

The rotation angles to apply in local-space:
Vec3D.X : the geographic heading of the positive Z-axis in local-space, in degrees see YawPitchRollTransform.Yaw,
Vec3D.Y : the pitch angle, see YawPitchRollTransform.Pitch,
Vec3D.Z : the roll angle, see YawPitchRollTransform.Roll,

vertical opt : float64 = 0

The vertical coordinate.

verticalType opt : VerticalType = VerticalType.Height

The vertical coordinate type.

returns → AffineTransform

The transformation.

Computes a transformation matrix from the given local-space to terrain-space.

This method is intended to be used for placing objects statically in the scene and thus uses VerticalType.Height by default. When placing objects dynamically, please consider passing VerticalType.HeightMesh to verticalType opt.

ValidatingException

If the given coordinates in input string is invalid.


[Pure]
public static method Transform3 → (4)

coordinates in : LatLon

The geographic coordinates.

heading opt : float64 = 0

The geographic heading of the positive Z-axis in local-space, in degrees (i.e. the yaw angle, see YawPitchRollTransform.Yaw).

vertical opt : float64 = 0

The vertical coordinate.

verticalType opt : VerticalType = VerticalType.Height

The vertical coordinate type.

returns → AffineTransform

The transformation.

Computes a transformation matrix from the given local-space to terrain-space.

This method is intended to be used for placing objects statically in the scene and thus uses VerticalType.Height by default. When placing objects dynamically, please consider passing VerticalType.HeightMesh to verticalType opt.


[Pure]
public static method Transform4 → (4)

coordinates in : LatLon

The geographic coordinates.

headingPitchRoll in : Vec3D

The rotation angles to apply in local-space:
Vec3D.X : the geographic heading of the positive Z-axis in local-space, in degrees see YawPitchRollTransform.Yaw,
Vec3D.Y : the pitch angle, see YawPitchRollTransform.Pitch,
Vec3D.Z : the roll angle, see YawPitchRollTransform.Roll,

vertical opt : float64 = 0

The vertical coordinate.

verticalType opt : VerticalType = VerticalType.Height

The vertical coordinate type.

returns → AffineTransform

The transformation.

Computes a transformation matrix from the given local-space to terrain-space.

This method is intended to be used for placing objects statically in the scene and thus uses VerticalType.Height by default. When placing objects dynamically, please consider passing VerticalType.HeightMesh to verticalType opt.


[Pure]
public static method Transform5 → (2)

coordinates in : LatLonHeight

The geographic coordinates.

heading opt : float64 = 0

The geographic heading of the positive Z-axis in local-space, in degrees see YawPitchRollTransform.Yaw.

returns → AffineTransform

The transformation.

Computes a transformation matrix from the given local-space to terrain-space.

Transform​Ground


[Pure]
public static method TransformGround → (4)

coordinates in : string

The geographic coordinates.

tripod in : Tripod

[not-null]
The tripod helper to use for ground-alignment.

heading opt : float64 = 0

The geographic heading of the positive Z-axis in local-space, in degrees, see YawPitchRollTransform.Yaw.

invariant opt : bool = true

true to use VerticalType.Height,
false to use VerticalType.HeightMesh.

returns → AffineTransform

The transformation.

Computes a ground-aligned transformation matrix from the given local-space to terrain-space.

This method is intended to be used for placing objects statically in the scene and thus uses VerticalType.Height by default. When placing objects dynamically, please consider passing false to invariant opt.

ValidatingException

If the given coordinates in input string is invalid.