Frustum
in package
Table of Contents
Properties
- $bottom : Plane
- $far : Plane
- $left : Plane
- $near : Plane
- $right : Plane
- $top : Plane
- $planes : array<string|int, Plane>
- Holds an additional reference to the planes that can be accessed by index
Methods
- __construct() : mixed
- Frustum is represented by 6 planes
- fromMat4() : self
- isSphereInView() : bool
- Returns boolean if a given sphere is visible in the frustum
Properties
$bottom
public
Plane
$bottom
$far
public
Plane
$far
$left
public
Plane
$left
$near
public
Plane
$near
$right
public
Plane
$right
$top
public
Plane
$top
$planes
Holds an additional reference to the planes that can be accessed by index
private
array<string|int, Plane>
$planes
= []
Methods
__construct()
Frustum is represented by 6 planes
public
__construct(Plane $left, Plane $right, Plane $top, Plane $bottom, Plane $near, Plane $far) : mixed
Parameters
fromMat4()
public
static fromMat4(Mat4 $mat) : self
Parameters
- $mat : Mat4
Return values
selfisSphereInView()
Returns boolean if a given sphere is visible in the frustum
public
isSphereInView(Vec3 $center, float $radius) : bool
Parameters
- $center : Vec3
- $radius : float