Struct Frustum
- Namespace
- ValveResourceFormat.Renderer
- Assembly
- Renderer.dll
View frustum for culling objects outside the camera's visible area.
public readonly struct FrustumInherited Members
Constructors
Frustum()
public Frustum()Properties
IsEmpty
Gets a value indicating whether this frustum is empty (does not cull anything).
public bool IsEmpty { get; }Property Value
Planes
public Plane[] Planes { get; }Property Value
- Plane[]
Methods
Clone()
Creates a deep copy of this frustum.
public Frustum Clone()Returns
- Frustum
-
A new frustum with the same planes.
CreateEmpty()
Creates an empty frustum that does not cull anything.
public static Frustum CreateEmpty()Returns
- Frustum
-
A new empty frustum.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()Returns
- int
-
A 32-bit signed integer that is the hash code for this instance.
Intersects(in AABB)
Tests if an axis-aligned bounding box intersects this frustum.
public bool Intersects(in AABB box)Parameters
boxAABB-
The bounding box to test.
Returns
Intersects(in Vector3)
Tests if a point is inside this frustum.
public bool Intersects(in Vector3 point)Parameters
pointVector3-
The point to test.
Returns
SetEmpty()
Sets this frustum to an empty state that does not cull anything. Planes will be set to (0, 0, 0, 1) which means all points will be in front of the plane.
public void SetEmpty()Update(in Matrix4x4)
Updates the frustum planes from a view-projection matrix.
public void Update(in Matrix4x4 viewProjectionMatrix)Parameters
viewProjectionMatrixMatrix4x4-
Combined view and projection matrix.