Game.Rendering.Legacy.LegacyFrustumPlanes
Assembly: Assembly-CSharp.dll
Namespace: Game.Rendering.Legacy
Type: struct
Base: System.ValueType
Summary:
Represents the six planes of a view frustum (left, right, bottom, top, near and far) used for frustum culling in the legacy rendering path. Each plane is stored as a UnityEngine.Plane. The type provides direct field access for each named plane and an integer indexer to retrieve a plane by index (0..5). Out-of-range indices return default(Plane).
Fields
-
public UnityEngine.Plane left
Represents the left clipping plane of the frustum. -
public UnityEngine.Plane right
Represents the right clipping plane of the frustum. -
public UnityEngine.Plane bottom
Represents the bottom clipping plane of the frustum. -
public UnityEngine.Plane top
Represents the top clipping plane of the frustum. -
public UnityEngine.Plane zNear
Represents the near clipping plane of the frustum. -
public UnityEngine.Plane zFar
Represents the far clipping plane of the frustum.
Properties
public UnityEngine.Plane this[int i] { get }
Indexer that returns one of the six planes by index:- 0 => left
- 1 => right
- 2 => bottom
- 3 => top
- 4 => zNear
- 5 => zFar
- any other value => default(Plane)
This is a read-only property (computed via a switch expression in the original source).
Constructors
public LegacyFrustumPlanes()
No explicit constructors are declared in the source — the default parameterless constructor (struct default) is available. Fields will be default-initialized (Plane.default).
Methods
- (none)
There are no explicit methods defined on this struct. The functionality is limited to its fields and the indexer property.
Usage Example
// Example usage (UnityEngine Plane type)
LegacyFrustumPlanes planes = default;
// Access named planes
UnityEngine.Plane leftPlane = planes.left;
UnityEngine.Plane nearPlane = planes.zNear;
// Access via indexer
UnityEngine.Plane rightPlane = planes[1]; // 1 => right
UnityEngine.Plane invalid = planes[10]; // out of range => default(Plane)
Additional notes: - Plane refers to UnityEngine.Plane. - This struct is a simple data container used by legacy rendering code; it does not compute planes from a matrix itself — that is typically done elsewhere and stored into this struct.