TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class VisibleCheck in Tinman.Terrain.Visibility

Abstract base class for IVisibleCheck implementations.

abstract class VisibleCheck implements IVisibleCheck
  base of DefaultVisibleCheck

Public / Constants

Never

An IVisibleCheck object that always returns false.

public static readonly field Never
type IVisibleCheck

Public / Methods

Add

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 [not-null] The resulting visibility check.
implements IVisibleCheck.Add

See also:

IVisibleCheck.Remove

Contains

Does 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.
implements IVisibleCheck.Contains

IsVertexVisible

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

[Pure]
public abstract 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 IVisibleCheck.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.

Remove

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 [not-null] The resulting visibility check.
implements IVisibleCheck.Remove

See also:

IVisibleCheck.Add

SetVertexArrays

Sets the vertex data containers from which this vertex converter shall read vertex data.

public virtual method SetVertexArrays (VertexArrays vertexArrays)
params vertexArrays [not-null] The vertex data collection.
implements IVertexArraysDependent.SetVertexArrays

Protected / Methods

ToString

Returns a unique name for this VisibleCheck instance.

protected method ToString (string name)
type string
params name Human-readable name of subclass.
returns [not-null] The unique and human-readable name.