A typical view frustum with left, right, top, bottom, near and far planes.
sealed class
|
ViewFrustum
|
extends
|
Frustum
|
||
implements
|
INearAtZero
|
Is
the
near-clipping
plane
mapped
to
0
in
clip-space
(true
),
or
is
it
mapped
to
-1
(false
)?
public
property
|
NearAtZero
{
get
set
}
|
||
type
|
bool
|
||
value
|
The mapping behaviour for the near-clipping plane. | ||
implements
|
INearAtZero.NearAtZero
|
Remarks:
The
default
value
is
true
.
The number of frustum planes.
public
property
|
PlaneCount
{
get
}
|
||
type
|
int32
|
||
value
|
|
The number of frustum planes. | |
inherited
|
Frustum.PlaneCount
|
Remarks:
If a frustum has a plane count of zero, it contains all space.
Creates a new instance of ViewFrustum.
public
constructor
|
ViewFrustum
()
|
Extracts the view frustum planes from the unit cube in homogeneous clip space that is defined by the given matrix.
public
method
|
ExtractFromMatrix
(Mat4D matrix)
|
||
params
|
matrix
|
The input matrix. |
Remarks:
The following inequalities are used to extract the view frustum planes from the given matrix:
-w < x < w -w < y < w C < z < wwhere
x
,
y
,
z
and
w
are
the
coordinates
of
a
transformed
vertex
in
homogeneous
clip
space
(as
produced
by
the
given
matrix).
The
value
C
affects
the
near
clipping
plane.
Its
value
depends
on
the
used
graphics
API
and
can
be
0
(e.g.
Direct3D)
or
-w
(e.g.
OpenGL).
Calling this method will update all planes of this frustum.
Extracts a view frustum plane from the unit cube in homogeneous clip space that is defined by the given matrix.
public
static
method
|
ExtractFromMatrix
(Mat4D matrix,
ViewFrustumPlane plane,
bool nearAtZero)
|
||
type
|
Plane
|
||
params
|
matrix
|
The input matrix. | |
plane
|
The view frustum plane to extract. | ||
nearAtZero
|
Is
the
near
clipping
plane
at
C
=
0
(e.g.
Direct3D),
or
is
it
at
C
=
-w
(e.g.
OpenGL)?
|
||
returns
|
The view frustum plane. |
Remarks:
The following inequalities are used to extract the view frustum planes from the given matrix:
-w < x < w -w < y < w C < z < wwhere
x
,
y
,
z
and
w
are
the
coordinates
of
a
transformed
vertex
in
homogeneous
clip
space
(as
produced
by
the
given
matrix).
The
value
C
affects
the
near
clipping
plane.
Its
value
depends
on
the
used
graphics
API
and
can
be
0
(e.g.
Direct3D)
or
-w
(e.g.
OpenGL).
Computes an inside mask (see InsideMask) for the given set of active view frustum planes.
public
static
method
|
InsideMask
(ViewFrustumPlane planes)
|
||
type
|
int32
|
||
params
|
planes
|
The view frustum planes that will be tested. | |
returns
|
The inside mask value. |
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. | ||
inherited
|
Frustum.PlaneAt
|
Sets the index-th frustum plane.
public
method
|
PlaneAt
(int32 index,
Plane plane)
|
||
params
|
index
|
[0..PlaneCount-1]
|
The frustum plane index. |
plane
|
The frustum plane. | ||
inherited
|
Frustum.PlaneAt
|
Returns a view frustum plane.
public
method
|
PlaneFor
(ViewFrustumPlane frustumPlane)
|
||
type
|
Plane
|
||
params
|
frustumPlane
|
The view frustum plane. | |
returns
|
The plane. |
Sets a view frustum plane.
public
method
|
PlaneFor
(ViewFrustumPlane frustumPlane,
Plane plane)
|
||
params
|
frustumPlane
|
The view frustum plane. | |
plane
|
The frustum plane. |
Transforms the planes of this frustum using Transform.
public
method
|
Transform
(Mat4D transform)
|
||
params
|
transform
|
The transformation matrix. | |
inherited
|
Frustum.Transform
|
Translates the planes of this frustum using Translate
public
method
|
Translate
(Vec3D offset)
|
||
params
|
offset
|
The translation offset. | |
inherited
|
Frustum.Translate
|