DistanceToGround

Description

sealed class Tinman.Terrain.Meshing.DistanceToGround

Derived from

MeshTraversal abstract

The DistanceToGround class traverses the filtered mesh (see IMeshFilters.FilterIn) and computes the smallest distance of a given point to the terrain surface.

The following vertex data semantics are used by this class:

Public / Methods

Compute

2 overloads


public method Compute1 → (1)

point in : Vec3D

Coordinates of the point in terrain-space.

returns → float64

The nearest distance to the terrain surface, in terrain-space. Will be 0 if the mesh is not ready.

Computes the nearest distance from the given point in terrain-space to the current mesh.


public method Compute2 → (3)

pointX in : float64

X-coordinate of the point in terrain-space.

pointY in : float64

Y-coordinate of the point in terrain-space.

pointZ in : float64

Z-coordinate of the point in terrain-space.

returns → float64

The nearest distance to the terrain surface, in terrain-space. Will be 0 if the mesh is not ready.

Computes the nearest distance from the given point in terrain-space to the bound mesh.

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).