Default implementation of the IMapRegion interface.
sealed class
|
MapRegion
|
implements
|
ICollector<CubemapFaceRect>
|
||
extends
|
MapRegionBase
|
The map height.
public
property
|
Height
{
get
}
|
||
type
|
int32
|
||
value
|
|
The map height, in samples. | |
inherited
|
MapRegionBase.Height
|
Returns a MapInfo value that describes the used map raster.
public
override
property
|
Map
{
get
}
|
||
type
|
MapInfo
|
||
value
|
The map info value. | ||
implements
|
MapRegionBase.Map
|
The map type.
public
property
|
Type
{
get
}
|
||
type
|
MapType
|
||
value
|
The map type. | ||
inherited
|
MapRegionBase.Type
|
The map width.
public
property
|
Width
{
get
}
|
||
type
|
int32
|
||
value
|
|
The map width, in samples. | |
inherited
|
MapRegionBase.Width
|
Creates a copy of the given map region.
public
static
method
|
Copy
(IMapRegion region)
|
||
type
|
MapRegion
|
||
params
|
region
|
[not-null]
|
The map region. |
returns
|
|
The copied map region. |
Returns a new cubemap region that is initially empty.
public
static
method
|
Cube
(int32 cubeSize,
PixelCoverage coverage = PixelCoverage.PixelIsPoint)
|
||
type
|
MapRegion
|
||
params
|
cubeSize
|
[pow2+1]
|
The cubemap size, in samples. |
coverage
|
The pixel coverage semantic. Defaults to PixelIsPoint. | ||
returns
|
|
The map region. |
Returns a new map region for the given map that is initially empty.
public
static
method
|
For
(MapInfo map)
|
||
type
|
MapRegion
|
||
params
|
map
|
The map raster. | |
returns
|
|
The map region. |
Returns a new map region for the given map that is initially empty.
public
static
method
|
For
(IMapInfo map)
|
||
type
|
MapRegion
|
||
params
|
map
|
[not-null]
|
The map raster. |
returns
|
|
The map region. |
Returns a new rectangular map region that is initially empty.
public
static
method
|
Rect
(int32 width,
int32 height,
PixelCoverage coverage = PixelCoverage.PixelIsPoint)
|
||
type
|
MapRegion
|
||
params
|
width
|
[>0]
|
The map width, in samples. |
height
|
[>0]
|
The map height, in samples. | |
coverage
|
The pixel coverage semantic. Defaults to PixelIsPoint. | ||
returns
|
|
The map region. |
Adds the given element to this collection.
public
method
|
Add
(CubemapFaceRect element)
|
||
type
|
bool
|
||
params
|
element
|
The element to add. | |
returns
|
true
if
the
collection
has
changed,
false
if
not. |
||
implements
|
ICollector.Add
|
Remarks:
Implementing
methods
shall
return
false
iff
the
element
has
already
been
collected,
i.e.
it
is
contained
in
the
collection.
If
in
doubt,
return
true
.
Adds all cubemap face rectangles of the given map region to this map region.
public
method
|
AddAll
(IMapRegion other)
|
||
params
|
other
|
[not-null]
|
The other map region. |
Adds a region.
public
method
|
AddBox
(Box3I box)
|
||
type
|
bool
|
||
params
|
box
|
The region to add, in cubemap coordinates. | |
returns
|
true
if
the
region
has
been
modified
by
this
addition,
false
if
not.
|
Adds a region.
public
method
|
AddRect
(int32 x,
int32 y,
int32 width,
int32 height,
CubemapFace face = CubemapFace.NegZ)
|
||
type
|
bool
|
||
params
|
x
|
Top-left cubemap face X-coordinate. | |
y
|
Top-left cubemap face Y-coordinate. | ||
width
|
Width of region. | ||
height
|
Height of region. | ||
face
|
The cubemap face. Defaults to NegZ. | ||
returns
|
true
if
the
region
has
been
modified
by
this
addition,
false
if
not.
|
Clears all rectangles from this map region.
public
method
|
Clear
()
|
Does this map region contain the given map sample?
public
override
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.
|
||
implements
|
MapRegionBase.Contains
|
Does this map region contain the given map sample rectangle?
public
override
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.
|
||
implements
|
MapRegionBase.ContainsRect
|
Fill this map region.
public
method
|
Fill
()
|
Enumerates all cubemap face rectangles that belong to this map region.
public
method
|
RectanglesEnumerate
(CollectorDelegate<CubemapFaceRect> collector)
|
||
params
|
collector
|
[not-null]
|
The object that collects the resulting cubemap face rectangles. |
inherited
|
MapRegionBase.RectanglesEnumerate
|
Removes all cubemap face rectangles of the given map region from this map region.
public
method
|
RemoveAll
(IMapRegion other)
|
||
params
|
other
|
[not-null]
|
The other map region. |
Removes a region.
public
method
|
RemoveBox
(Box3I box)
|
||
type
|
bool
|
||
params
|
box
|
The region to remove, in cubemap coordinates. | |
returns
|
true
if
the
region
has
been
modified
by
this
removal,
false
if
not.
|
Removes a region.
public
method
|
RemoveRect
(CubemapFaceRect faceRect)
|
||
type
|
bool
|
||
params
|
faceRect
|
The region to remove. | |
returns
|
true
if
the
region
has
been
modified
by
this
removal,
false
if
not.
|
Removes a region.
public
method
|
RemoveRect
(int32 x,
int32 y,
int32 width,
int32 height,
CubemapFace face = CubemapFace.NegZ)
|
||
type
|
bool
|
||
params
|
x
|
Top-left cubemap face X-coordinate. | |
y
|
Top-left cubemap face Y-coordinate. | ||
width
|
Width of region. | ||
height
|
Height of region. | ||
face
|
The cubemap face. Defaults to NegZ. | ||
returns
|
true
if
the
region
has
been
modified
by
this
removal,
false
if
not.
|
Does this map region contain the given map sample rectangle?
method
|
ContainsRect
(CubemapFaceRect faceRect)
|
||
type
|
int32
|
||
params
|
faceRect
|
The cubemap face rectangle. | |
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)
and
1
if
the
given
rectangle
is
fully
enclosed
by
this
map
region.
|