ICanvasTransform

Description

interface Tinman.Terrain.Mapping.ICanvasTransform

Derived from

IMapTransform

Base interface for classes that provide different coordinate spaces and transformations between them.

The methods of this interface refer to the following coordinate space definitions:

  • Canvas space:
    Coordinates that refer to locations on a canvas, defined by the implementing class (for example: screen viewport coordinates, image pixel coordinates, unfolded cubemaps).

  • Dataset space:
    Coordinates that refer to samples in a rectangular or cubemap dataset, see IMapTransform.DatasetSpace. For rectangular datasets, the Z-coordinate of cubemap coordinates will always be 0 and the cubemap face will always be CubemapFace.NegZ.

  • Map space:
    Coordinates that refer to locations in a geo-referencing coordinate system, see IMapTransform.MapSpace.

Public / Methods

Canvas​To​Dataset​Cube


public method CanvasToDatasetCube → (2)

canvasX in : float64

The X-coordinate in canvas space.

canvasY in : float64

The Y-coordinate in canvas space.

returns → Vec3D

The coordinates in dataset space. Will be Vec3D.Undefined if the transformation is not possible.

Transforms the given coordinates from canvas space to dataset space.

Canvas​To​Dataset​Face


public method CanvasToDatasetFace → (2)

canvasX in : float64

The X-coordinate in canvas space.

canvasY in : float64

The Y-coordinate in canvas space.

returns → CubemapFaceCoordsD

The coordinates in dataset space. Will be CubemapFaceCoordsD.Undefined if the transformation is not possible.

Transforms the given coordinates from canvas space to dataset space.

Canvas​To​Map


public method CanvasToMap → (2)

canvasX in : float64

The X-coordinate in canvas space.

canvasY in : float64

The Y-coordinate in canvas space.

returns → Vec2D

The coordinates in map space. Will be Vec3D.Undefined if the transformation is not possible.

Transforms the given coordinates from canvas space to map space.

Dataset​To​Canvas

2 overloads


public method DatasetToCanvas1 → (3)

cubeX in : float64

The cubemap X-coordinate in dataset space.

cubeY in : float64

The cubemap Y-coordinate in dataset space.

cubeZ in : float64

The cubemap Z-coordinate in dataset space.

returns → Vec2D

The coordinates in canvas space. Will be Vec3D.Undefined if the transformation is not possible.

Transforms the given coordinates from dataset space to canvas space.


public method DatasetToCanvas2 → (3)

faceX in : float64

The cubemap face X-coordinate in dataset space.

faceY in : float64

The cubemap face Y-coordinate in dataset space.

face opt : CubemapFace = CubemapFace.NegZ

The cubemap face in dataset space.

returns → Vec2D

The coordinates in canvas space. Will be Vec3D.Undefined if the transformation is not possible.

Transforms the given coordinates from dataset space to canvas space.

Map​To​Canvas


public method MapToCanvas → (2)

mapX in : float64

The X-coordinate in map space.

mapY in : float64

The Y-coordinate in map space.

returns → Vec2D

The coordinates in canvas space. Will be Vec3D.Undefined if the transformation is not possible.

Transforms the given coordinates from map space to canvas space.

Public / Attributes

Canvas​Size


[Constant]
public attribute CanvasSize → (get)

value : Vec2D

The coordinate bounds of canvas space.

Returns the coordinate bounds of canvas space.

The bounds of canvas space are axis-aligned and are defined by the points (0;0) and (W;H), where W and H refer to Vec2D.X and Vec2D.Y.

Extensions

Canvas​To​Dataset​Cube


public static method CanvasToDatasetCube → (1)

canvas in : Vec2D

The coordinates in canvas space.

returns → Vec3D

The coordinates in dataset space. Will be Vec3D.Undefined if the transformation is not possible.

Transforms the given coordinates from canvas space to dataset space.

Canvas​To​Dataset​Face


public static method CanvasToDatasetFace → (1)

canvas in : Vec2D

The coordinates in canvas space.

returns → CubemapFaceCoordsD

The coordinates in dataset space. Will be CubemapFaceCoordsD.Undefined if the transformation is not possible.

Transforms the given coordinates from canvas space to dataset space.

Canvas​To​Map


public static method CanvasToMap → (1)

canvas in : Vec2D

The coordinates in canvas space.

returns → Vec2D

The coordinates in map space. Will be Vec3D.Undefined if the transformation is not possible.

Transforms the given coordinates from canvas space to map space.

Dataset​To​Canvas

4 overloads


public static method DatasetToCanvas1 → (1)

cube in : Vec3D

The cubemap coordinates in dataset space.

returns → Vec2D

The coordinates in canvas space. Will be Vec3D.Undefined if the transformation is not possible.

Transforms the given coordinates from dataset space to canvas space.


public static method DatasetToCanvas2 → (1)

cube in : Vec3I

The cubemap coordinates in dataset space.

returns → Vec2D

The coordinates in canvas space. Will be Vec3D.Undefined if the transformation is not possible.

Transforms the given coordinates from dataset space to canvas space.


public static method DatasetToCanvas3 → (1)

face in : CubemapFaceCoordsD

The cubemap face coordinates in dataset space.

returns → Vec2D

The coordinates in canvas space. Will be Vec3D.Undefined if the transformation is not possible.

Transforms the given coordinates from dataset space to canvas space.


public static method DatasetToCanvas4 → (1)

face in : CubemapFaceCoordsI

The cubemap face coordinates in dataset space.

returns → Vec2D

The coordinates in canvas space. Will be Vec3D.Undefined if the transformation is not possible.

Transforms the given coordinates from dataset space to canvas space.

Map​To​Canvas


public static method MapToCanvas → (1)

map in : Vec2D

The coordinates in map space.

returns → Vec2D

The coordinates in canvas space. Will be Vec3D.Undefined if the transformation is not possible.

Transforms the given coordinates from map space to canvas space.