IVisibleRegion

Description

interface Tinman.Terrain.Visibility.IVisibleRegion

Extended by

VisibleRegion abstract

Base interface for classes that represent a visible region in 3D-space, which is used to limit mesh refinement to specific parts of a terrain.

Public / Methods

Test​Sphere


public method TestSphere → (4)

in : float64

X-coordinate of bounding sphere center, in terrain-space.

in : float64

Y-coordinate of bounding sphere center, in terrain-space.

in : float64

Z-coordinate of bounding sphere center, in terrain-space.

radius in : float64

The bounding sphere radius, in terrain-space.

returns → int32

-2 if the visible region and the expanded bounding sphere are disjoint,
-1 if the visible region and the bounding sphere are disjoint,
1 if the visible region fully contains the bounding sphere,
0 in all other cases.

Tests if the given mesh sector bounding sphere intersects with the visible region.

The bounding spheres in a hierarchy of mesh sectors are nested. However, a mesh sector bounding sphere may not necessarily contain the bounding spheres of the mesh sectors that belong to the direct child vertices of the mesh sector center vertex. Because of this, implementing methods will use an expanded bounding sphere for the -1 test, which has the same center point and a radius of: radius in* Maths.Sqrt2

Union


public method Union → (1)

other in : IVisibleRegion

[not-null]
The other visible region.

returns → IVisibleRegion

The resulting visible region.

Computes the union of this visible region and the given one.

Extensions

Test​Sphere


public static method TestSphere → (2)

in : Vec3D

Coordinates of bounding sphere center, in terrain-space.

radius in : float64

The bounding sphere radius, in terrain-space.

returns → int32

-2 if the visible region and the expanded bounding sphere are disjoint,
-1 if the visible region and the bounding sphere are disjoint,
1 if the visible region fully contains the bounding sphere,
0 in all other cases.

Tests if the given mesh sector bounding sphere intersects with the visible region.

The bounding spheres in a hierarchy of mesh sectors are nested. However, a mesh sector bounding sphere may not necessarily contain the bounding spheres of the mesh sectors that belong to the direct child vertices of the mesh sector center vertex. Because of this, implementing methods will use an expanded bounding sphere for the -1 test, which has the same center point and a radius of:
radius in*Maths.Sqrt2