The HullFrustum class consumes a point soup in terrain-space, transforms it to frustum-space, computes the convex hull in the XY-plane and extrudes the hull along the Z-axis to obtain the final hull frustum.
sealed class
|
HullFrustum
|
implements
|
IFrustum
|
The vertices of the convex hull, in frustum-space.
public
property
|
Hull
{
get
}
|
||
type
|
IVectorConst<Vec2D>
|
||
value
|
|
The convex hull vertices. |
The matrix that transforms from terrain-space to frustum-space.
public
property
|
Matrix
{
get
set
}
|
||
type
|
Mat4D
|
||
value
|
The transformation matrix. |
The number of frustum planes.
public
property
|
PlaneCount
{
get
}
|
||
type
|
int32
|
||
value
|
|
The number of frustum planes. | |
implements
|
IFrustum.PlaneCount
|
Remarks:
If a frustum has a plane count of zero, it contains all space.
Creates a new instance of HullFrustum.
public
constructor
|
HullFrustum
()
|
public
method
|
Clear
()
|
Compute the hull frustum from the given point soup.
public
method
|
Compute
(IArrayVector<Vec3D> pointSoup,
int32 maxPlaneCount = 30)
|
||
params
|
pointSoup
|
[not-null]
|
The point soup, in terrain-space. |
maxPlaneCount
|
[0..30]
|
The
maximum
number
of
frustum
planes
to
use.
Defaults
to
30 .
|
Remarks:
The frustum plane at index zero is the far clipping plane.
Returns the index-th frustum plane.
public
method
|
PlaneAt
(int32 index)
|
||
type
|
Plane
|
||
params
|
index
|
[0..PlaneCount-1]
|
The frustum plane index. |
returns
|
The frustum plane. | ||
implements
|
IFrustum.PlaneAt
|