Provides information about a map raster.
struct
|
MapInfo
|
implements
|
IEquatable<MapInfo>
|
A map raster is a lattice of evenly spaced data points (the spacing is defined as 1):
(0|0) O---O---O---O---O | | | | | O---O---O---O---O O := data point | | | | | w := raster width (here: 4) O---O---O---O---O h := raster height (here: 3) | | | | | O---O---O---O---O (w|h)The raster width resp. height always refers to the edge length of the map (in spacing units), regardless of the Coverage semantic of the underlying dataset; which can be a geocoded image (see IImage), a heightmap (see IHeightmap) or a pyramid (see IPyramid).
countX
resp.
countY
samples
along
the
X-axis
resp.
Y-axis
will
have
these
raster
dimensions:
countX
and
the
raster
height
will
be
countY
.
A
dataset
sample
identified
by
the
coordinates
(x,y)
represents
a
unit
square
in
raster
space,
covering
the
area
(x,y)
to
(x+1,y+1)
.
countX-1
and
the
raster
height
will
be
countY-1
.
A
dataset
sample
identified
by
the
coordinates
(x,y)
represents
a
point
in
raster
space
at
(x,y)
.
Map rasters can be rectangular or cubic (see MapType).
(0|0) (w|0) (s|0) +-------------+-----+ Y- | | | | | | | | | | | X- ---O--- X+ | | | | | | | | (0|h) +-------------+ | Y+ | (w|h) | | | w := raster width | | h := raster height +-------------------+ s := internal raster size (power of two) (0|s) (s|s)The raster width
w
and
height
h
of
rectangular
maps
can
have
arbitrary
values.
The
internal
size
s
however
is
always
a
power
of
two
and
is
greater
than
or
equal
to
both
w
and
h
.
(0|0|s) (s|0|s) +-------------+ Y- | / Z+ /| /| | / / | / | |/ (0|0|0)/ | (s|0|0)/ | X- ----O---- X+ +-------------+ | /| | | | | / | | +---------|---+ Z- / | Y+ | /(0|s|s) | /(s|s|s) | / | / s := cubemap raster size (power of two) |/ |/ w := s +-------------+ h := s (0|s|0) (s|s|0)The raster size
s
of
a
cubemap
is
always
a
power
of
two,
and
the
raster
width
w
and
raster
height
h
are
equal
to
s
.
The pixel coverage semantic of the underlying dataset.
public
readonly
field
|
Coverage
|
||
type
|
PixelCoverage
|
Remarks:
For PixelIsPoint, dataset coordinates and raster coordinates are equivalent.
For PixelIsArea, the following relationship between dataset coordinates and raster coordinates exists:
raster = dataset + 0.5 dataset = raster - 0.5where
dataset
resp.
raster
is
a
component
of
the
dataset
coordinates
resp.
raster
coordinates.
Returns the corresponding dataset size.
public
property
|
Dataset
{
get
}
|
||
type
|
Vec2I
|
||
value
|
The dataset size, in dataset samples. |
Returns the minimum CubemapFace of the map.
public
property
|
FaceFirst
{
get
}
|
||
type
|
CubemapFace
|
||
value
|
The minimum CubemapFace value. |
Returns the maximum CubemapFace of the map.
public
property
|
FaceLast
{
get
}
|
||
type
|
CubemapFace
|
||
value
|
The maximum CubemapFace value. |
The raster height of the map (edge length, not sample count).
public
readonly
field
|
Height
|
||
type
|
int32
|
See also:
MappingUtil.MinSizeThe internal resp. cubemap raster size of the map (always a power of two).
public
readonly
field
|
Size
|
||
type
|
int32
|
See also:
MappingUtil.MinSizeThe type of the map (rectangular or cubic).
public
readonly
field
|
Type
|
||
type
|
MapType
|
The raster width of the map (edge length, not sample count).
public
readonly
field
|
Width
|
||
type
|
int32
|
See also:
MappingUtil.MinSizeCreates a new instance of MapInfo for a cubic map raster (see Cube).
[Pure]
|
||||
public
static
method
|
Cube
(int32 size = MappingUtil.MaxSize,
PixelCoverage coverage = PixelCoverage.PixelIsPoint)
|
|||
type
|
MapInfo
|
|||
params
|
size
|
[pow2]
|
The raster size. Defaults to MaxSize. | |
coverage
|
The pixel coverage of the underlying dataset. Defaults to PixelIsPoint. | |||
returns
|
The map info value. |
Creates a new instance of MapInfo for the given map type.
[Pure]
|
||||
public
static
method
|
For
(MapType type,
int32 width,
int32 height,
PixelCoverage coverage = PixelCoverage.PixelIsPoint)
|
|||
type
|
MapInfo
|
|||
params
|
type
|
The map type. | ||
width
|
[>0]
|
The raster width. | ||
height
|
[>0]
|
The raster height. | ||
coverage
|
The pixel coverage of the underlying dataset. Defaults to PixelIsPoint. | |||
returns
|
The map info value. |
Creates a new instance of MapInfo for a rectangular map raster (see Rect).
[Pure]
|
||||
public
static
method
|
Rect
(int32 width,
int32 height,
PixelCoverage coverage = PixelCoverage.PixelIsPoint)
|
|||
type
|
MapInfo
|
|||
params
|
width
|
[>0]
|
The raster width. | |
height
|
[>0]
|
The raster height. | ||
coverage
|
The pixel coverage of the underlying dataset. Defaults to PixelIsPoint. | |||
returns
|
The map info value. |
Computes the shift amount for translating from this map to the given map.
[Pure]
|
||||
public
method
|
ComputeShiftTo
(MapInfo other)
|
|||
type
|
int32
|
|||
params
|
other
|
The other map. | ||
returns
|
The shift amount. |
See also:
CubemapFaceCoordsI.Shift
public
method
|
Equals
(MapInfo other)
|
||
type
|
bool
|
||
params
|
other
|
public
override
method
|
ToString
()
|
||
type
|
string
|