Frustum
Math.Frustum exported from @manycore/aholo-viewer.
Constructors
Constructor
new Frustum(
p0?,p1?,p2?,p3?,p4?,p5?):Frustum
Parameters
p0?
p1?
p2?
p3?
p4?
p5?
Returns
Frustum
Properties
planes
planes:
Plane[]
Array of 6 planes.
corners
corners:
Vector3[]
The eight vertex’s position of frustum
Methods
set()
set(
p0,p1,p2,p3,p4,p5):Frustum
Sets the frustum from the passed planes. No plane order is implied. Note that this method only copies the values from the given objects.
Parameters
p0
p1
p2
p3
p4
p5
Returns
Frustum
clone()
clone():
Frustum
Return a new Frustum with the same parameters as this one.
Returns
Frustum
copy()
copy(
frustum):Frustum
Copies the properties of the passed frustum into this one.
Parameters
frustum
Frustum
The frustum to copy.
Returns
Frustum
getCorners()
getCorners():
Vector3[]
Return the corners.
Returns
Vector3[]
setFromMatrix()
setFromMatrix(
m):Frustum
Sets the frustum by a transform matrix.
Parameters
m
Returns
Frustum
intersectsObject()
intersectsObject(
object):boolean
Checks whether the object’s BufferGeometry.boundingSphere| bounding is intersecting the frustum. Note that the object must have a BufferGeometry| geometry so that the bounding sphere can be calculated.
Parameters
object
Returns
boolean
intersectsSprite()
intersectsSprite(
sprite):boolean
Checks whether the sprite is intersecting the frustum.
Parameters
sprite
Returns
boolean
intersectsSphere()
intersectsSphere(
sphere):boolean
Return true if sphere intersects with this frustum.
Parameters
sphere
Sphere to check for intersection.
Returns
boolean
intersectsBox()
intersectsBox(
box):boolean
Return true if box intersects with this frustum.
Parameters
box
Box3 to check for intersection.
Returns
boolean
containsPoint()
containsPoint(
point):boolean
Checks to see if the frustum contains the point.
Parameters
point
Vector3 to test.
Returns
boolean
getCameraClosestDistanceFromBoxes()
getCameraClosestDistanceFromBoxes(
camera,boxes):number
Return a value to represent the closest distance between camera and box, if there are any part of bos inside the frustum.
Parameters
camera
boxes
Box3[]
Returns
number