Table of Contents

Struct Frustum

Namespace
PopcorningGuineaPig.Engine.Rendering
Assembly
PopcorningGuineaPig.Engine.dll

Perspective camera as six inward planes. A box that crosses a plane stays visible. Near and far follow raylib BeginMode3D (DefaultNear, DefaultFar) unless the caller passes others. A default value, and an orthographic camera, accept every box.

public readonly struct Frustum
Inherited Members

Fields

DefaultFar

rlgl far clip used by BeginMode3D.

public const float DefaultFar = 1000

Field Value

float

DefaultNear

rlgl near clip used by BeginMode3D.

public const float DefaultNear = 0.01

Field Value

float

Methods

ActiveAspect()

Aspect of the framebuffer BeginMode3D is about to use. The size passed into Scene.Render stays 0 until a settings apply, so it is not the clip.

public static float ActiveAspect()

Returns

float

FromCamera(Camera3D, float, float, float)

public static Frustum FromCamera(Camera3D camera, float aspect, float near = 0.01, float far = 1000)

Parameters

camera Camera3D
aspect float
near float
far float

Returns

Frustum

FromLook(Vector3, Vector3, float, float, float, float)

public static Frustum FromLook(Vector3 eye, Vector3 forward, float fovyDegrees, float aspect, float near, float far)

Parameters

eye Vector3
forward Vector3
fovyDegrees float
aspect float
near float
far float

Returns

Frustum

FromLook(Vector3, Vector3, float, float, float, float, Vector3)

public static Frustum FromLook(Vector3 eye, Vector3 forward, float fovyDegrees, float aspect, float near, float far, Vector3 up)

Parameters

eye Vector3
forward Vector3
fovyDegrees float
aspect float
near float
far float
up Vector3

Returns

Frustum

Intersects(BoundingBox)

True when the box meets the frustum, including a box that only crosses one plane.

public bool Intersects(BoundingBox box)

Parameters

box BoundingBox

Returns

bool