MapView

Description

sealed class Tinman.Terrain.Tools.MapView

The map view class computes geometry batches for rendering an orthogonal 2D map using texture pyramids and custom map projections.

Public / Constructors

Map​View


public constructor MapView → ()

Creates a new instance of MapView.

Public / Methods

Clear​Batches


public method ClearBatches → ()

Clears the current map view batches.

Compute​Batches


public method ComputeBatches → ()

Computes the map view batches using the current configuration.

See also

MapView.Batches

Is​On​Screen


public method IsOnScreen → (1)

coords in : Vec2D

The point coordinates, in screen space.

returns → bool

true if the point is visible on the screen, false if not.

Is the given point visible on the screen?

Map​Space​Changed


public method MapSpaceChanged → ()

The geo-reference of the map (IMapTransform.MapSpace) has changed outside of the scope of this MapView instance.

Set​Map

2 overloads


public method SetMap1 → (1)

map in : IMapTransform

[not-null]
The map transform from which to copy the specification.

Sets the specification for map space.

See also

MapView.SetMap2


public method SetMap2 → (2)

mapSpace in : CoordinateSystem

[not-null]
The coordinate system of map space, see IMapTransform.MapSpace.

mapBounds in : Box2D

The coordinate bounds of map space, see IMapTransform.MapBounds.

Sets the specification for map space.

Public / Attributes

Batches


public attribute Batches → (get)

value : IArrayVector<MapViewBatch>

[not-null]
The list of map view batches.

The current map view batches.

Canvas​Size


public attribute CanvasSize → (get,set)

value : Vec2I

The screen viewport size, in pixels.

The size of the screen viewport.

Canvas​Transform


public attribute CanvasTransform → (get,set)

value : Mat3D

The homogeneous 2D transformation matrix.

Transformation matrix from screen space to map space.

Geographic​Range


public attribute GeographicRange → (get)

value : LatLonRange

The geographic range.

Returns the geographic coordinate range of the current batches.

Is​Dirty


public attribute IsDirty → (get)

value : bool

true if the current batches are dirty and ComputeBatches should be called again,
false if not.

Has the current set of batches become dirty?

Texels​Per​Pixel


public attribute TexelsPerPixel → (get,set)

value : float64

[>0]
The texel-per-pixel ratio.

The overall ratio between texels and screen pixels.

The default value is 1.

Transform


public attribute Transform → (get)

value : ICanvasTransform

The ICanvasTransform object or null if the required geo-reference information is missing or incomplete.

Returns the ICanvasTransform object that represents the transformation between dataset space (the texture pyramids), map space (the chosen map projection) and canvas space (the screen viewport), computing it if necessary.

Vertices


public attribute Vertices → (get)

value : IArrayVector<Vertex>

[not-null]
The vertex array.

The vertices which the computed map view batches refer to.

Logging

Logger


public static readonly attribute Logger → (ILogger)

The logger object of this class.