Constructor
new Frustum(options)
Parameters:
Name | Type | Description |
---|---|---|
options | * |
- Source
Methods
containsBox(box) → {boolean}
Returns true if the frustum contains a bounding box.
Parameters:
Name | Type | Description |
---|---|---|
box | Box | Bounding box. |
- Source
Returns:
- Type:
- boolean
containsPoint(point) → {boolean}
Returns true if a point in the frustum.
Parameters:
Name | Type | Description |
---|---|---|
point | Vec3 | Cartesian point. |
- Source
Returns:
- Type:
- boolean
containsSphere(sphere) → {boolean}
Returns true if the frustum contains a bonding sphere.
Parameters:
Name | Type | Description |
---|---|---|
sphere | Sphere | Bounding sphere. |
- Source
Returns:
- Type:
- boolean
containsSphere2(center, radius) → {boolean}
Returns true if the frustum contains a bonding sphere.
Parameters:
Name | Type | Description |
---|---|---|
center | Vec3 | Sphere center. |
radius | number | Sphere radius. |
- Source
Returns:
- Type:
- boolean
containsSphereBottomExc(sphere) → {boolean}
Returns true if the frustum contains a bonding sphere, but bottom plane exclude.
Parameters:
Name | Type | Description |
---|---|---|
sphere | Sphere | Bounding sphere. |
- Source
Returns:
- Type:
- boolean
setProjectionMatrix(angle, aspect, near, far)
Sets up camera projection matrix.
Parameters:
Name | Type | Description |
---|---|---|
angle | number | Camera's vertical fov view angle. |
aspect | number | Screen aspect ratio. |
near | number | Near camera distance. |
far | number | Far camera distance. |
- Source
setViewMatrix(viewMatrix)
Camera's projection matrix values.
Parameters:
Name | Type | Description |
---|---|---|
viewMatrix | Mat4 | View matrix. |
- Source