MapRegion

Description

sealed class Tinman.Terrain.Mapping.MapRegion

Derived from

MapRegionBase abstract
ICollector<CubemapFaceRect>

Default implementation of the IMapRegion interface.

Public / Constructors

Copy


public static method Copy → (1)

region in : IMapRegion

[not-null]
The map region.

returns → MapRegion

The copied map region.

Creates a copy of the given map region.

Cube


public static method Cube → (2)

cubeSize in : int32

[pow2+1]
The cubemap size, in samples.

coverage opt : PixelCoverage = PixelCoverage.PixelIsPoint

The pixel coverage semantic.

returns → MapRegion

The map region.

Returns a new cubemap region that is initially empty.

For

2 overloads


public static method For1 → (1)

map in : MapInfo

The map raster.

returns → MapRegion

The map region.

Returns a new map region for the given map that is initially empty.


public static method For2 → (1)

map in : IMapInfo

[not-null]
The map raster.

returns → MapRegion

The map region.

Returns a new map region for the given map that is initially empty.

Rect


public static method Rect → (3)

width in : int32

[>0]
The map width, in samples.

height in : int32

[>0]
The map height, in samples.

coverage opt : PixelCoverage = PixelCoverage.PixelIsPoint

The pixel coverage semantic.

returns → MapRegion

The map region.

Returns a new rectangular map region that is initially empty.

Public / Methods

AddAll


public method AddAll → (1)

other in : IMapRegion

[not-null]
The other map region.

Adds all cubemap face rectangles of the given map region to this map region.

AddBox


public method AddBox → (1)

box in : Box3I

The region to add, in cubemap coordinates.

returns → bool

true if the region has been modified by this addition, false if not.

Adds a region.

AddRect


public method AddRect → (5)

in : int32

Top-left cubemap face X-coordinate.

in : int32

Top-left cubemap face Y-coordinate.

width in : int32

Width of region.

height in : int32

Height of region.

face opt : CubemapFace = CubemapFace.NegZ

The cubemap face.

returns → bool

true if the region has been modified by this addition, false if not.

Adds a region.

Clear


public method Clear → ()

Clears all rectangles from this map region.

Fill


public method Fill → ()

Fill this map region.

RemoveAll


public method RemoveAll → (1)

other in : IMapRegion

[not-null]
The other map region.

Removes all cubemap face rectangles of the given map region from this map region.

RemoveBox


public method RemoveBox → (1)

box in : Box3I

The region to remove, in cubemap coordinates.

returns → bool

true if the region has been modified by this removal, false if not.

Removes a region.

RemoveRect

2 overloads


public method RemoveRect1 → (1)

faceRect in : CubemapFaceRect

The region to remove.

returns → bool

true if the region has been modified by this removal, false if not.

Removes a region.


public method RemoveRect2 → (5)

in : int32

Top-left cubemap face X-coordinate.

in : int32

Top-left cubemap face Y-coordinate.

width in : int32

Width of region.

height in : int32

Height of region.

face opt : CubemapFace = CubemapFace.NegZ

The cubemap face.

returns → bool

true if the region has been modified by this removal, false if not.

Removes a region.

Extensions

ContainsRect


public static method ContainsRect → (1)

faceRect in : CubemapFaceRect

The cubemap face rectangle.

returns → int32

-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) and 1 if the given rectangle is fully enclosed by this map region.

Does this map region contain the given map sample rectangle?