Class: SelectionFrustum

PD. SelectionFrustum

An extended frustum implementation.

A selection frustum is different from a normal frustum in that it needs to efficiently handle the selection of levels that are displayed.


new SelectionFrustum()

Creates a new selection frustum instance.

Author:
  • drajmarsh

Extends

Methods


cameraInFrontOfPlane(plane)

Determines if the camera position the frustum was generated using is in front of the given plane.

Parameters:
Name Type Description
plane THREE.Plane

The plane to check against.

Returns:

Returns true if the camera is in front.

Type
boolean

containsPoint(point)

Check if the given point is inside the frustum.

Parameters:
Name Type Description
point THREE.Vector3

The point to check if inside

Returns:

Returns whether or not the frustum contains the point.

Type
boolean

intersectsBox(box)

Check if the frustum intersects the given bounding box.

Parameters:
Name Type Description
box THREE.Box3

The bounding box to check for intersection.

Returns:

Returns whether or not the frustum intersects the bounding box.

Type
boolean

intersectsLine(p1, p2)

Determines if the given line intersects the frustum.

Parameters:
Name Type Description
p1 THREE.Vector3

The position of the start point of the line.

p2 THREE.Vector3

The position of the end point of the line.

Inherited From:
Overrides:
Returns:

Returns true if the line intersected the frustum.

Type
boolean

intersectsSphere(sphere)

Check if the frustum intersects the given sphere.

Parameters:
Name Type Description
sphere THREE.Sphere

The sphere to check for intersection.

Returns:

Returns whether or not the frustum intersects the sphere.

Type
boolean

setOffsetVector( [vec])

Sets or clears the offset vector.

Parameters:
Name Type Argument Description
vec THREE.Vector3 | null <optional>

The offset vector to use, or null to reset.

Returns:

Returns this frustum to support method chaining.

Type
PD.SelectionFrustum