RangeCulling

Description

sealed class Tinman.Terrain.Meshing.RangeCulling

The RangeCulling class traverses the filtered mesh (see IMeshFilters.FilterIn), performs a value range test for each mesh sector with the configured range value (see RangeValue) and culls away all sectors that are outside of it (see MeshTree.SectorCull).

Each visited mesh sector is tested against the given value range: first, the RangeValue is used to fetch the minimum and maximum values for the mesh sector which are then interpreted as an interval which is checked for intersection with Range. Then, the result of this check is inverted, if indicated by Invert. Finally, if the check result is false, the mesh sector is culled away (see MeshTree.SectorCull).

The following vertex data semantics are used by this class:

Public / Constructors

Range​Culling


public constructor RangeCulling → ()

Creates a new instance of RangeCulling.

Public / Attributes

Filter​In


public attribute FilterIn → (get,set)

value : MeshTreeFilter

The filter or null.

The mesh tree input filter to use for querying sector culling and marks.

The default value is null (i.e. all mesh sectors are visited).

Invert


public attribute Invert → (get,set)

value : bool

false to cull the mesh sector if its nested minimum/maximum value range does not intersect with the given value range. true to keep a mesh sector if the nested minimum/maximum value range does not intersect with the given value range,

Optionally inverts the culling logic.

Defaults to false.

Range


public attribute Range → (get,set)

value : RangeF

The range of values to keep in the terrain mesh.

The value range to keep.

Defaults to RangeF.Max.

Range​Value


public attribute RangeValue → (get,set)

value : Semantic

[not-null]
The value range semantic, which may be one of the following:
Semantic.ElevationMinMax
Semantic.Displacement

The semantic that is used to fetch the nested value range for culling.

This value will be taken into account the next time IMeshBound.MeshBind is called.