TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class Tinman.Canvas

Short Name:
  • class Canvas

Maps a rectangular map or a cubemap onto a contiguous pixel layer.

Putting a rectangular map or a cubemap onto a pixel layer involves these steps:

Cubemaps are unfolded onto the canvas as follows:

         +--------+
         |        |
         |        |
         |        |
+--------+--------+--------+--------+
|        |        |        |        |
|        | Center |        |        |
|        |        |        |        |
+--------+--------+--------+--------+
         |        |
         |        |
         |        |
         +--------+

The Face of Center depicts which cubemap face will be the Center one (see figure). By default, the canvas X- and Y-axis correspond to the cubemap face axes. The other faces will be unfolded and displayed accordingly. When the map rectangular, only the Center face (always Face.NegZ) will be displayed.

When the pixel layer has a Coverage.Type.PixelIsPoint coverage, blocks are mapped onto the canvas as follows:

0   4   8   12  16  20  24  28  32     .-->
+---+---+---+---+---+---+---+---+      | Canvas X- and Y-axis
|   |   |   |   |   |   |   |   |      V
+---+---oooo#oooo---ooooo---+---+ 4
|   |   o   #   o   o   o   |   |      o := Block edge samples
+---+---oooo#oooo---#####---+---+ 8    # := Shared edge samples
|   |   |   |   |   o   o   |   |
+---+---+---+---+---ooooo---+---+ ...

The block size is always a power of two plus one. Adjacent blocks have overlapping edges (one raster sample). Pixel coordinates are mapped directly to canvas raster coordinates.

When the pixel layer has a Coverage.Type.PixelIsArea coverage, blocks are mapped onto the canvas as follows:

0   4   8   12  16  20  24  28  32     .-->
+---+---+---+---+---+---+---+---+      | Canvas X- and Y-axis
|   |   |   |   |   |   |   |   |      V
+---+---+---+---+---+---+---+---+ 4
|   |   |###|###|   |###|   |   |      # := Block samples
+---+---+---+---+---+---+---+---+ 8
|   |   |   |   |   |###|   |   |
+---+---+---+---+---+---+---+---+ ...

The block size is always a power of two. Adjacent blocks are disjoint. Pixel coordinates are mapped to the top-left corner of the corresponding pixel on the canvas raster.

Usages

The following table shows all usages of this config type.

Extended By: Used By: