Implements coordinate wrapping behaviour for rectangular map rasters.
struct
|
MapWrap
|
A rectangular map has two MapWrap values, one for each axis.
For
a
map
of
size
S
,
valid
coordinate
values
C
lie
within
the
range
[0..S].
Valid
coordinate
values
will
remain
unchanged
when
passed
to
Coordinate
.
All
other
coordinate
values
will
be
modified
according
to
the
specified
behaviour
(see
Clamp,
Void
and
Wrap).
Map coordinates are clamped at Size?
public
property
|
IsClampMax
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
coordinates
are
clamped,
false
if
not. |
Map
coordinates
are
clamped
at
0
?
public
property
|
IsClampMin
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
coordinates
are
clamped,
false
if
not. |
Map coordinates wrap around at [0..Size]?
public
property
|
IsWrap
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
coordinates
wrap,
false
if
not. |
The map size (edge length, not sample count).
public
property
|
Size
{
get
}
|
||
type
|
int32
|
||
value
|
|
The map size. |
Clamps map coordinates to the range [0..size].
public
static
method
|
Clamp
(int32 size,
bool min = true,
bool max = true)
|
||
type
|
MapWrap
|
||
params
|
size
|
[>0]
|
The map size (edge length, not sample count). |
min
|
Clamp
at
minimum
bound
(0 )?
Defaults
to
true . |
||
max
|
Clamp
at
maximum
bound
(size )?
Defaults
to
true . |
||
returns
|
The map wrapping behaviour. |
Coordinates outside of the range [0..size] are considered to be void.
public
static
method
|
Void
(int32 size)
|
||
type
|
MapWrap
|
||
params
|
size
|
[>0]
|
The map size (edge length, not sample count). |
returns
|
The map wrapping behaviour. |
Wraps map coordinates to the range [0..size].
public
static
method
|
Wrap
(int32 size)
|
||
type
|
MapWrap
|
||
params
|
size
|
[>0]
|
The map size (edge length, not sample count). |
returns
|
The map wrapping behaviour. |
Wraps the given map coordinate.
public
method
|
Coordinate
(int32 coordinate)
|
||
type
|
int32
|
||
params
|
coordinate
|
The map coordinate. | |
returns
|
|
The
wrapped
map
or
clamped
coordinate.
[<0] If the coordinate refers to a void sample. |
Wraps the given map coordinate.
public
method
|
Coordinate
(float64 coordinate)
|
||
type
|
float64
|
||
params
|
coordinate
|
The map coordinate. | |
returns
|
|
The
wrapped
map
or
clamped
coordinate.
[<0] If the coordinate refers to a void sample. |