The ScreenVisibleCheck is the default implementation of the IVisibleCheck interface for screen-space visible checks.
sealed class
|
ScreenVisibleCheck
|
extends
|
DefaultVisibleCheck
|
||
implements
|
ICameraInfoDependent
|
||||
IViewportDependent
|
Use this class for view-dependent rendering.
The following vertex data semantics are used by this class:
Maximum backfacing angle to allow before culling vertices, in degrees.
public
property
|
BackfaceAngle
{
get
set
}
|
||
type
|
float64
|
||
value
|
|
The maximum backfacing angle, in degrees. |
Remarks:
Setting
this
to
90°
will
disable
backface
culling.
Defaults
to
5°
.
See also:
Semantic.NormalThe object that provides the current camera position.
public
property
|
CameraInfo
{
get
set
}
|
||
type
|
CameraInfo
|
||
value
|
|
The camera position provider. | |
implements
|
ICameraInfoDependent.CameraInfo
|
Include surface materials (see Material) in visible check?
public
property
|
ErrorMaterial
{
get
set
}
|
||
type
|
bool
|
||
value
|
true
if
surface
materials
are
included
in
the
visible
check,
false
if
not.
|
||
inherited
|
DefaultVisibleCheck.ErrorMaterial
|
See also:
Semantic.ErrorMaterialInclude surface normals (see Normal) in visible check?
public
property
|
ErrorNormal
{
get
set
}
|
||
type
|
bool
|
||
value
|
true
if
surface
normals
are
included
in
the
visible
check,
false
if
not.
|
||
inherited
|
DefaultVisibleCheck.ErrorNormal
|
See also:
Semantic.ErrorNormalInclude surface geometry (see Position) in visible check?
public
property
|
ErrorPosition
{
get
set
}
|
||
type
|
bool
|
||
value
|
true
if
surface
geometry
is
included
in
the
visible
check,
false
if
not.
|
||
inherited
|
DefaultVisibleCheck.ErrorPosition
|
See also:
Semantic.ErrorPositionCustom scale factors for precomputed error metric values.
public
property
|
ErrorScale
{
get
set
}
|
||
type
|
Vec4F
|
||
value
|
The
custom
scale
factors:
X: ErrorPosition Y: ErrorNormal Z: ErrorTexture W: ErrorMaterial |
Remarks:
The error scale values can be used to fine-tune mesh detail.
Defaults
to
(1,1,1,1)
.
Include surface texture (see Texture) in visible check?
public
property
|
ErrorTexture
{
get
set
}
|
||
type
|
bool
|
||
value
|
true
if
surface
texture
is
included
in
the
visible
check,
false
if
not.
|
||
inherited
|
DefaultVisibleCheck.ErrorTexture
|
See also:
Semantic.ErrorTextureSpecifies the camera distance range where the surface material tokens fade out.
public
property
|
FadeMaterial
{
get
set
}
|
||
type
|
Vec2D
|
||
value
|
The fade range (see remarks) or Zero to disable fading. |
Remarks:
The camera distance at which material tokens colors are fully faded in is given by X. The distance at which the tokens are completely dissolved is specified with Y.
Specifies the camera distance range where the surface texture colors fade out.
public
property
|
FadeTexture
{
get
set
}
|
||
type
|
Vec2D
|
||
value
|
The fade range (see remarks) or Zero to disable fading. |
Remarks:
The camera distance at which surface texture colors are fully faded in is given by X. The distance at which the colors are completely dissolved is specified with Y.
Light direction vector of prominent light source in the scene.
public
property
|
LightDirection
{
get
set
}
|
||
type
|
Vec3D
|
||
value
|
The light direction vector or Zero to disable the light metric. |
Remarks:
More terrain detail is generated in lit areas where the normal and light vectors are nearly perpendicular, which increases the quality of vertex-based shading.
Scale factor for the light metric.
public
property
|
LightScale
{
get
set
}
|
||
type
|
float64
|
||
value
|
|
The light metric scale factor. |
Remarks:
Defaults
to
0
(i.e.
the
light
metric
is
disabled).
Maximum sector size, in screen-space.
public
property
|
MaxSectorSize
{
get
set
}
|
||
type
|
float64
|
||
value
|
|
Maximum sector size, in screen-space. |
Remarks:
This value is the square root of the approximated pixel area of the mesh sector on the screen.
The
default
value
is
128.0f
pixels.
The current viewport object.
public
property
|
Viewport
{
get
set
}
|
||
type
|
Viewport
|
||
value
|
|
The viewport object. | |
implements
|
IViewportDependent.Viewport
|
Creates a new instance of ScreenVisibleCheck.
public
constructor
|
ScreenVisibleCheck
(CameraInfo cameraInfo = null,
Viewport viewport = null,
float32 maxSectorSize = 128)
|
||
params
|
cameraInfo
|
The
terrain-space
camera
position.
If
null ,
a
new
instance
of
CameraInfo
will
be
used.
Defaults
to
null .
|
|
viewport
|
The
projection
viewport.
If
null ,
a
new
instance
of
Viewport
will
be
used.
Defaults
to
null .
|
||
maxSectorSize
|
[>0]
|
Maximum
mesh
sector
in
screen-space.
Defaults
to
128 .
|
Adds
the
given
visibility
check
to
this
one,
so
that
a
mesh
vertex
will
be
visible
if
at
least
one
of
both
returns
true
.
[Pure]
|
||||
public
virtual
method
|
Add
(IVisibleCheck check)
|
|||
type
|
IVisibleCheck
|
|||
params
|
check
|
[not-null]
|
The visibility check to add. | |
returns
|
|
The resulting visibility check. | ||
inherited
|
VisibleCheck.Add
|
See also:
IVisibleCheck.RemoveDoes this visible check contain the given one?
[Pure]
|
||||
public
virtual
method
|
Contains
(IVisibleCheck check)
|
|||
type
|
bool
|
|||
params
|
check
|
[not-null]
|
The visible check. | |
returns
|
true
if
check
is
contained,
i.e.
calling
Add
will
return
this .
false
if
check
is
not
contained,
i.e.
calling
Remove
will
return
this .
|
|||
inherited
|
VisibleCheck.Contains
|
Computes whether the given vertex shall be visible in the terrain mesh or not.
[Pure]
|
||||
public
override
method
|
IsVertexVisible
(int32 v,
int32 g,
int32 a,
float64 thresholdSqr)
|
|||
type
|
bool
|
|||
params
|
v
|
The vertex to check for visibility. | ||
g
|
Grand-parent of v. | |||
a
|
Ancestor vertex of v. | |||
thresholdSqr
|
The tolerated squared terrain-space vertex error. | |||
returns
|
true
if
the
squared
terrain-space
vertex
error
value
is
greater
than
thresholdSqr
(i.e.
the
vertex
will
be
visible
in
the
terrain
mesh),
false
if
not
(i.e.
the
vertex
will
be
invisible).
|
|||
implements
|
VisibleCheck.IsVertexVisible
|
Remarks:
This method will be called repeatedly only by the refinement thread of the MeshBuffer. Thus, as long as no other code is called it, thread-safe code is not required here.
Removes
the
given
vertex
visibility
check
from
this
one,
so
that
a
mesh
vertex
will
only
be
visible
if
this
one
returns
true
.
[Pure]
|
||||
public
virtual
method
|
Remove
(IVisibleCheck check)
|
|||
type
|
IVisibleCheck
|
|||
params
|
check
|
[not-null]
|
The visibility check to remove. | |
returns
|
|
The resulting visibility check. | ||
inherited
|
VisibleCheck.Remove
|
See also:
IVisibleCheck.AddSets the vertex data containers from which this vertex converter shall read vertex data.
public
override
method
|
SetVertexArrays
(VertexArrays vertexArrays)
|
||
params
|
vertexArrays
|
[not-null]
|
The vertex data collection. |
overrides
|
DefaultVisibleCheck.SetVertexArrays
|
[Pure]
|
||||
public
override
method
|
ToString
()
|
|||
type
|
string
|
|||
overrides
|
DefaultVisibleCheck.ToString
|