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

interface IMapRegion in Tinman.Terrain.Mapping

Base interface for classes that represent arbitrary regions of a map.

interface IMapRegion extends IMapInfo
  base of MapRegionBase

Remarks

An IMapRegion implementation stores a set of rectangles on the cubemap faces (see CubemapFaceRect); each such rectangle defines a subregion.

Attributes

Height

The map height.

property Height { get }
type int32
value [>0] The map height, in samples.

Map

Returns a MapInfo value that describes the used map raster.

property Map { get }
type MapInfo
value The map info value.
inherited IMapInfo.Map

Type

The map type.

property Type { get }
type MapType
value The map type.

Width

The map width.

property Width { get }
type int32
value [>0] The map width, in samples.

Methods

Contains

Does this map region contain the given map sample?

method Contains (int32 faceX, int32 faceY, CubemapFace face = CubemapFace.NegZ)
type bool
params faceX The cubemap face X-coordinate.
  faceY The cubemap face Y-coordinate.
  face The cubemap face. Defaults to NegZ.
returns true if the map region contains the given sample, false if not.

ContainsRect

Does this map region contain the given map sample rectangle?

method ContainsRect (int32 faceX, int32 faceY, int32 width, int32 height, CubemapFace face = CubemapFace.NegZ)
type int32
params faceX The cubemap face X-coordinate of top-left corner of rectangle.
  faceY The cubemap face Y-coordinate of top-left corner of rectangle..
  width Width of rectangle.
  height Height of rectangle.
  face The cubemap face. Defaults to NegZ.
returns -1 if the given rectangle does not intersect with this map region (i.e. not contained).
0 if the given rectangle intersects with this map region but is not fully enclosed (i.e. partially contained).
1 if the given rectangle is fully enclosed by this map region.

RectanglesEnumerate

Enumerates all cubemap face rectangles that belong to this map region.

method RectanglesEnumerate (CollectorDelegate<CubemapFaceRect> collector)
params collector [not-null] The object that collects the resulting cubemap face rectangles.

Extensions

ContainsBox

Does this map region contain the given map sample regions?

method ContainsBox (Box2I box)
type int32
params box The map sample region.
returns -1 if the given box does not intersect with this map region (i.e. not contained), 0 if the given box intersects with this map region but is not fully enclosed (i.e. partially contained) and 1 if the given box is fully enclosed by this map region.

Does this map region contain the given map sample regions?

method ContainsBox (Box3I box)
type int32
params box The map sample region.
returns -1 if the given box does not intersect with this map region (i.e. not contained), 0 if the given box intersects with this map region but is not fully enclosed (i.e. partially contained) and 1 if the given box is fully enclosed by this map region.

ContainsCoords

Does this map region contain the given map sample?

method ContainsCoords (CubemapFaceCoordsI coords)
type bool
params coords The cubemap face coordinates.
returns true if the map region contains the given sample, false if not.

CountSamples

Counts the map samples that are contained in this map region.

method CountSamples ()
type int64
returns [>=0] The count of samples contained in all subregions.

Project

Projects the map regions stored in this object and stores the resulting regions in the given object.

method Project (IMapProjectionFactory projection, MapRegion result)
params projection [not-null] The map projection to use.
  result [not-null] The resulting map regions.

RectanglesArray

Finds all subregions in this region.

method RectanglesArray ()
type CubemapFaceRect[]
returns [not-null] The subregions.

Size

Returns the cubemap size of this map region.

method Size ()
type int32
returns [>0] The cubemap size, in samples.

Remarks:

The cubemap size is the maximum of Width and Height.