The map view class computes geometry batches for rendering an orthogonal 2D map using texture pyramids and custom map projections.
sealed class
|
MapView
|
implements
|
IOpaque
|
||
ITextureCacheDependent
|
The current map view batches.
public
property
|
Batches
{
get
}
|
||
type
|
IArrayVector<MapViewBatch>
|
||
value
|
|
The list of map view batches. |
See also:
ComputeBatchesReturns the geographic coordinate range of the current batches.
public
property
|
GeographicRange
{
get
}
|
||
type
|
LatLonRange
|
||
value
|
The geographic range. |
Has the current set of batches become dirty?
public
property
|
IsDirty
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
the
current
batches
are
dirty
and
ComputeBatches
should
be
called
again,
false
if
not.
|
The valid map bounds.
public
property
|
MapBounds
{
get
set
}
|
||
type
|
Box2D
|
||
value
|
The map bounds, see MapGeoref. |
Remarks:
Defaults to Max.
The georeference of the map.
public
property
|
MapGeoref
{
get
set
}
|
||
type
|
CoordinateSystem
|
||
value
|
|
The map georeference. |
Remarks:
Defaults to PopularMercator.
Use opaque texturing mode?
public
property
|
Opaque
{
get
set
}
|
||
type
|
bool
|
||
value
|
true
to
use
opaque
texturing,
false
to
use
sparse
texturing. |
||
implements
|
IOpaque.Opaque
|
Remarks:
In opaque mode, missing areas (see Empty and Void) are covered with the texture of the parent mesh sector quadrant. In non-opaque mode, missing areas are not rendered.
Opaque mode is usually used for surface imagery that has varying levels of detail, where the best available level of detail needs to be used for rendering.
Non-opaque mode can be used for rasterized vector shapes, where only the most detailed level is rendered.
Defaults
to
true
.
The screen size, in pixels.
public
property
|
ScreenSize
{
get
set
}
|
||
type
|
Vec2I
|
||
value
|
The screen size. |
Transformation matrix from screen space to map space.
public
property
|
ScreenTransform
{
get
set
}
|
||
type
|
Mat3D
|
||
value
|
The homogeneous 2D transformation matrix. |
The overall ratio between texels and screen pixels.
public
property
|
TexelsPerPixel
{
get
set
}
|
||
type
|
float64
|
||
value
|
|
The texel-per-pixel ratio. |
Remarks:
The
default
value
is
1
.
The TextureCache that is used.
public
property
|
TextureCache
{
get
}
|
||
type
|
TextureAtlas
|
||
value
|
The used TextureCache object. | ||
implements
|
ITextureCacheDependent.TextureCache
|
See also:
ITextureCacheDependent.SetTextureThe texel pyramid that is used.
public
property
|
TextureId
{
get
}
|
||
type
|
int32
|
||
value
|
The texel pyramid ID (see PyramidIdAllocate). | ||
implements
|
ITextureCacheDependent.TextureId
|
See also:
ITextureCacheDependent.SetTextureThe vertices which the computed map view batched refer to.
public
property
|
Vertices
{
get
}
|
||
type
|
IArrayVector<Vertex>
|
||
value
|
|
The vertex array. |
See also:
MapViewBatch.VertexCreates a new instance of MapView.
public
constructor
|
MapView
()
|
Clears the current map view batches.
public
method
|
ClearBatches
()
|
Computes the map view batches using the current configuration.
public
method
|
ComputeBatches
()
|
See also:
BatchesTransforms the given cubemap coordinates (see MaxSize) to screen coordinates (see ScreenSize).
public
method
|
CubeToScreen
(Vec3D cube)
|
||
type
|
Vec2D
|
||
params
|
cube
|
The cubemap coordinates. | |
returns
|
The screen coordinates. |
Transforms the given cubemap coordinates (see MaxSize) to screen coordinates (see ScreenSize).
public
method
|
CubeToScreen
(float64 x,
float64 y,
float64 z)
|
||
type
|
Vec2D
|
||
params
|
x
|
The cubemap X-coordinate. | |
y
|
The cubemap Y-coordinate. | ||
z
|
The cubemap Z-coordinate. | ||
returns
|
The screen coordinates. |
Transforms the given coordinates to the screen.
public
method
|
FaceToScreen
(CubemapFaceCoordsI coords)
|
||
type
|
Vec2D
|
||
params
|
coords
|
The input cubemap face coordinates (see MaxSize). | |
returns
|
The screen coordinates (see ScreenSize). |
Transforms the given coordinates to the screen.
public
method
|
FaceToScreen
(CubemapFaceCoordsD coords)
|
||
type
|
Vec2D
|
||
params
|
coords
|
The input cubemap face coordinates (see MaxSize). | |
returns
|
The screen coordinates (see ScreenSize). |
Transforms the given coordinates to the screen.
public
method
|
FaceToScreen
(float64 x,
float64 y,
CubemapFace face)
|
||
type
|
Vec2D
|
||
params
|
x
|
The input cubemap face X-coordinate (see MaxSize). | |
y
|
The input cubemap face Y-coordinate (see MaxSize). | ||
face
|
The input cubemap face. | ||
returns
|
The screen coordinates (see ScreenSize). |
Is the given point visible on the screen?
public
method
|
IsOnScreen
(Vec2D coords)
|
||
type
|
bool
|
||
params
|
coords
|
The point coordinates, in screen space. | |
returns
|
true
if
the
point
is
visible
on
the
screen,
false
if
not. |
The georeference of the map (MapGeoref) has changed outside of the scope of this MapView instance.
public
method
|
MapGeorefChanged
()
|
Transforms the given coordinates to the screen.
public
method
|
MapToScreen
(Vec2D map)
|
||
type
|
Vec2D
|
||
params
|
map
|
The input map coordinates (see MapGeoref). | |
returns
|
The screen coordinates (see ScreenSize). |
Transforms the given coordinates to the screen.
public
method
|
MapToScreen
(float64 x,
float64 y)
|
||
type
|
Vec2D
|
||
params
|
x
|
The input map X-coordinate (see MapGeoref). | |
y
|
The input map Y-coordinate (see MapGeoref). | ||
returns
|
The screen coordinates (see ScreenSize). |
Transforms the given screen coordinates into pyramid coordinates (relative to MaxSize).
public
method
|
ScreenToCube
(Vec2D coords)
|
||
type
|
Vec3D
|
||
params
|
coords
|
The screen coordinates. | |
returns
|
The cubemap coordinates (see MaxSize). |
Remarks:
The
screen
coordinates
(0|0)
refer
to
the
top-left
corner
of
the
top-left
pixel,
the
coordinates
(w|h)
refer
to
the
bottom-right
corner
of
the
bottom-right
pixel,
where
w
and
h
are
the
screen
width
resp.
height
in
pixels
(see
ScreenSize).
Transforms the given screen coordinates into pyramid coordinates (relative to MaxSize).
public
method
|
ScreenToCube
(float64 x,
float64 y)
|
||
type
|
Vec3D
|
||
params
|
x
|
The screen X-coordinate. | |
y
|
The screen Y-coordinate. | ||
returns
|
The cubemap coordinates (see MaxSize). |
Remarks:
The
screen
coordinates
(0|0)
refer
to
the
top-left
corner
of
the
top-left
pixel,
the
coordinates
(w|h)
refer
to
the
bottom-right
corner
of
the
bottom-right
pixel,
where
w
and
h
are
the
screen
width
resp.
height
in
pixels
(see
ScreenSize).
Transforms the given screen coordinates to pyramid coordinates.
public
method
|
ScreenToFace
(Vec2D coords,
CubemapFace face = CubemapFace.None)
|
||
type
|
Vec2D
|
||
params
|
coords
|
The screen coordinates. | |
face
|
The required cubemap face or None. | ||
returns
|
The pyramid coordinates. |
Transforms the given screen coordinates to pyramid coordinates.
public
method
|
ScreenToFace
(float64 x,
float64 y,
CubemapFace face = CubemapFace.None)
|
||
type
|
Vec2D
|
||
params
|
x
|
The screen X-coordinate. | |
y
|
The screen Y-coordinate. | ||
face
|
The required cubemap face or None. | ||
returns
|
The pyramid coordinates. |
Transforms the given screen coordinates to map coordinates.
public
method
|
ScreenToMap
(Vec2D coords)
|
||
type
|
Vec2D
|
||
params
|
coords
|
The screen coordinates. | |
returns
|
The map coordinates. |
Transforms the given screen coordinates to map coordinates.
public
method
|
ScreenToMap
(float64 x,
float64 y)
|
||
type
|
Vec2D
|
||
params
|
x
|
The screen X-coordinate. | |
y
|
The screen Y-coordinate. | ||
returns
|
The map coordinates. |
Specifies the texture atlas and texel pyramid to use.
public
method
|
SetTexture
(TextureAtlas textureAtlas,
int32 pyramidId = 0)
|
||
params
|
textureAtlas
|
The
texture
atlas
to
use
or
null
if
there
is
no
GPU
context.
|
|
pyramidId
|
The
texel
pyramid
ID
to
use
(see
PyramidIdAllocate).
Defaults
to
0 .
|
||
implements
|
ITextureCacheDependent.SetTexture
|