Api Sandbox Frustum
struct

Frustum

public sealed struct Frustum

Represents a frustum.

Constructors

Frustum(Plane right, Plane left, Plane top, Plane bottom, Plane near, Plane far)

Creates a frustum from 6 planes.

Methods

Vector3? GetCorner(Int32 i)

Returns the corner point of one of the 8 corners. This may return null if i is > 7 or the frustum is invalid.

BBox GetBBox()

Returns the AABB of this frustum.

Boolean IsInside(Vector3 point)

Returns whether the given point is inside this frustum.

Boolean IsInside(BBox box, Boolean partially = False)

Returns whether given AABB is inside this frustum.

box — The AABB to test.
partially — Whether test for partial intersection, or complete encompassing of the AABB within this frustum.
Boolean IsInside(Vector3 center, Single radius, Boolean partially = False)

Returns whether the given sphere is inside this frustum.

center — The center of the sphere.
radius — The radius of the sphere.
partially — Whether test for partial intersection, or complete encompassing of the sphere within this frustum.
Boolean IsInside(Sphere sphere, Boolean partially = False)

Returns whether the given sphere is inside this frustum.

sphere — The sphere to test against.
partially — Whether test for partial intersection, or complete encompassing of the sphere within this frustum.
static Frustum FromCorners(Ray tl, Ray tr, Ray br, Ray bl, Single near, Single far)

Create a frustum from four corner rays. These rays commonly come from SceneCamera.GetRay.

Fields

Name Type Description
RightPlane Plane Right plane of the frustum, pointing inwards.
LeftPlane Plane Left plane of the frustum, pointing inwards.
TopPlane Plane Top plane of the frustum, pointing inwards.
BottomPlane Plane Bottom plane of the frustum, pointing inwards.
NearPlane Plane Near plane of the frustum, pointing inwards.
FarPlane Plane Far plane of the frustum, pointing inwards.
Assembly: Sandbox.System Namespace: Sandbox Full Name: Sandbox.Frustum