IVisibleCheck

Description

interface Tinman.Terrain.Visibility.IVisibleCheck

Derived from

IVertexArraysDependent

Extended by

VisibleCheck abstract

Base interface for classes that implement a visibility check for terrain mesh vertices.

Public / Methods

Add


[Pure]
public method Add → (1)

check in : IVisibleCheck

[not-null]
The visibility check to add.

returns → IVisibleCheck

The resulting visibility check.

Adds the given visibility check to this one, so that a mesh vertex will be visible if at least one of both returns true.

Contains


[Pure]
public method Contains → (1)

check in : IVisibleCheck

[not-null]
The visible check.

returns → bool

true if check in is contained, i.e. calling Add will return this.
false if check in is not contained, i.e. calling Remove will return this.

Does this visible check contain the given one?

Is​Vertex​Visible


[Pure]
public method IsVertexVisible → (4)

in : int32

The vertex to check for visibility.

in : int32

Grand-parent of in.

in : int32

Ancestor vertex of in.

thresholdSqr in : float64

The tolerated squared terrain-space vertex error.

returns → bool

true if the squared terrain-space vertex error value is greater than thresholdSqr in (i.e. the vertex will be visible in the terrain mesh), false if not (i.e. the vertex will be invisible).

Computes whether the given vertex shall be visible in the terrain mesh or not.

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.

Prepare


public method Prepare → ()

Prepares this visibility check for a refinement cycle.

This method is called once before a refinement cycle is performed. Implementations should prepare their internal state so that the result of any subsequent invocation of IsVertexVisible does not depend on the mutable properties of the implementing class. Otherwise, CLOD mesh refinement will not be deterministic (see MeshBuffer).

Remove


[Pure]
public method Remove → (1)

check in : IVisibleCheck

[not-null]
The visibility check to remove.

returns → IVisibleCheck

The resulting visibility check.

Removes the given vertex visibility check from this one, so that a mesh vertex will only be visible if this one returns true.