The ConeCulling class traverses the filtered mesh (see FilterIn), performs a visibility tests for each mesh sector with the configured cone (see ConeOrigin, ConeDirection and ConeAngle) and culls away all sectors that are outside of it (see SectorCull).
sealed class
|
ConeCulling
|
implements
|
IMeshAction
|
||
IMeshBoundMinRadius
|
|||||
IMeshBoundMinSize
|
|||||
extends
|
MeshTraversal
|
Each visited mesh sector is tested against the cone. If it lies outside the frustum, it will be culled away (see SectorCull).
If CameraInfo or Viewport is left uninitialized, the MinSize settings will be ignored during cone culling.
The following vertex data semantics are used by this class:
The object that provides the current camera position.
public
property
|
CameraInfo
{
get
set
}
|
||
type
|
CameraInfo
|
||
value
|
|
The camera position provider. | |
implements
|
ICameraInfoDependent.CameraInfo
|
Can the action be performed?
public
property
|
CanPerform
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
the
CLOD
mesh
action
can
be
performed,
false
if
not
(calling
Perform
will
return
silently
in
this
case).
|
||
implements
|
IMeshAction.CanPerform
|
The cone opening angle.
public
property
|
ConeAngle
{
get
set
}
|
||
type
|
float64
|
||
value
|
|
The opening angle, in degrees. |
Direction vector, pointing from cone apex vertex towards cone opening.
public
property
|
ConeDirection
{
get
set
}
|
||
type
|
Vec3D
|
||
value
|
The unit-length cone direction vector, in terrain-space. |
Coordinates of cone apex vertex.
public
property
|
ConeOrigin
{
get
set
}
|
||
type
|
Vec3D
|
||
value
|
The cone origin, in terrain-space. |
The mesh tree input filter to use for querying sector culling and marks.
public
property
|
FilterIn
{
get
set
}
|
||
type
|
MeshTreeFilter
|
||
value
|
The
filter
or
null . |
||
inherited
|
MeshTraversal.FilterIn
|
Remarks:
The
default
value
is
null
(i.e.
all
mesh
sectors
are
visited).
See also:
MeshTree.GetRootThe mesh tree output filter to use for performing sector culling and marking.
public
property
|
FilterOut
{
get
set
}
|
||
type
|
MeshTreeFilter
|
||
value
|
The mesh tree filter object. | ||
inherited
|
MeshTraversal.FilterOut
|
Remarks:
This MeshTreeFilter is not reset automatically. The application is responsible to call Reset.
The
default
value
is
null
(i.e.
the
input
filter
is
used
in
that
case).
See also:
MeshTree.SectorCullHas this object been bound to an IMesh object?
public
property
|
HasMesh
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
this
object
is
currently
bound
to
an
IMesh,
false
if
not.
|
||
inherited
|
MeshBoundBase.HasMesh
|
The CLOD mesh this object is currently bound to.
public
property
|
Mesh
{
get
}
|
||
type
|
IMesh
|
||
value
|
The
CLOD
mesh
or
null . |
||
inherited
|
MeshBoundBase.Mesh
|
The mesh sector quadtree is traversed until the bounding sphere radius of a mesh sector falls below this limit.
public
property
|
MinRadius
{
get
set
}
|
||
type
|
float32
|
||
value
|
|
The minimum bounding sphere radius, in terrain-space. | |
implements
|
IMeshBoundMinRadius.MinRadius
|
Remarks:
The
default
value
is
0
(i.e.
the
entire
mesh
is
traversed).
The mesh sector quadtree is traversed until the projected screen-size of a mesh sector falls below this limit.
public
property
|
MinSize
{
get
set
}
|
||
type
|
float32
|
||
value
|
|
Minimum sector size, in screen-space. | |
implements
|
IMeshBoundMinSize.MinSize
|
Remarks:
This value is the square root of the approximated pixel area of the mesh sector on the screen.
The
default
value
is
256.0f
pixels.
The filtered MeshTree of this mesh traversal object.
public
property
|
Tree
{
get
}
|
||
type
|
MeshTree
|
||
value
|
|
The
filtered
MeshTree
object
or
null
if
this
object
is
not
bound.
|
|
inherited
|
MeshTraversal.Tree
|
The current viewport object.
public
property
|
Viewport
{
get
set
}
|
||
type
|
Viewport
|
||
value
|
|
The viewport object. | |
implements
|
IViewportDependent.Viewport
|
Creates a new instance of ConeCulling.
public
constructor
|
ConeCulling
()
|
Binds this object to the given IMesh.
public
override
method
|
MeshBind
(IMesh mesh)
|
||
params
|
mesh
|
The mesh object. | |
overrides
|
MeshTraversal.MeshBind
|
Unbinds this object from its current IMesh.
public
override
method
|
MeshUnbind
()
|
||
overrides
|
MeshBoundBase.MeshUnbind
|
Performs the action on the currently bound CLOD mesh.
public
method
|
Perform
()
|
||
implements
|
IMeshAction.Perform
|
See also:
IMeshAction.CanPerformVisits the given mesh root sectors.
public
method
|
VisitFaces
(CubemapFace meshFace = CubemapFace.All)
|
||
params
|
meshFace
|
The mesh face to traverse. Defaults to All. | |
inherited
|
MeshTraversal.VisitFaces
|
Visits a quadrant of the given mesh sector on the current face, assuming that the corresponding child mesh sector does not exist.
public
override
method
|
VisitQuadrant
(int32 sector,
int32 childIdx)
|
||
params
|
sector
|
Index of center vertex of sector to visit. | |
childIdx
|
Index of non-existing child sector in sector. | ||
implements
|
MeshTraversal.VisitQuadrant
|
Remarks:
The quadtree data structure for visiting the given sector can be obtained by getting the Tree property of the current mesh (see MeshBind.
Visits the given mesh sector on the current face.
public
override
method
|
VisitSector
(int32 sector)
|
||
params
|
sector
|
Index of center vertex of sector to visit. | |
implements
|
MeshTraversal.VisitSector
|
Remarks:
The quadtree data structure for visiting the given sector can be obtained by getting the Tree property of the current mesh (see MeshBind.