Table of Contents

Struct Frustum

Namespace
ValveResourceFormat.Renderer
Assembly
Renderer.dll

View frustum for culling objects outside the camera's visible area.

public readonly struct Frustum

Inherited 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

bool

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

box AABB

The bounding box to test.

Returns

bool

true if the box is at least partially inside the frustum.

Intersects(in Vector3)

Tests if a point is inside this frustum.

public bool Intersects(in Vector3 point)

Parameters

point Vector3

The point to test.

Returns

bool

true if the point is inside the frustum.

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

viewProjectionMatrix Matrix4x4

Combined view and projection matrix.