CLASSES
TagsA - Z

BoundingBox

MeshBounding

Description

class BoundingBox

Constructor

new BoundingBox(minimum, maximum)

The BoundingBox constructor

Parameters

Name Type Description
minimum Vector3 @param minimum
maximum Vector3 @param maximum

Members

minimum : Vector3

The minimum size of the bounding box

maximum : Vector3

The maximum size of the bounding box

vectors : Vector3[]

The vectors of the boundingBox

center : Vector3

The center of the boundingBox

extendSize : Vector3

The extend size of the boundingBox

directions : Vector3[]

The directions of the boundingBox

vectorsWorld : Vector3[]

The vectors world of the boundingBox

minimumWorld : Vector3

The minimum world of the boundingBox

maximumWorld : Vector3

The maximum world of the boundingBox

Methods

getWorldMatrix() → Matrix

Return this world matrix

setWorldMatrix(matrix) → BoundingBox

Parameters

Name Type Description
matrix Matrix

isInFrustum(frustumPlanes) → boolean

Returns true if this bounding box is in the given frustrum

Parameters

Name Type Description
frustumPlanes Plane[] Frustum planes

isCompletelyInFrustum(frustumPlanes) → boolean

Parameters

Name Type Description
frustumPlanes Plane[] Frustum planes

intersectsPoint(point) → boolean

Check if this bounding box intersect the point given in parameter

Parameters

Name Type Description
point Vector3 the point coordinates

intersectsSphere(sphere) → boolean

Check is this bounding box intersects the given sphere

Parameters

Name Type Description
sphere BoundingSphere The given sphere

intersectsMinMax(min, max) → boolean

Check if one of minimum or maximum values are intersected by the bounding box

Parameters

Name Type Description
min Vector3 The minimum value of this world
max Vector3 The maximum value of this world

static Intersects(box0, box1) → boolean

Check if the two boxes given in parameters intersects each other

Parameters

Name Type Description
box0 BoundingBox The first box
box1 BoundingBox The second box

static IntersectsSphere(minPoint, maxPoint, sphereCenter, sphereRadius) → boolean

Check if the sphere is intersected by the bounding box

Parameters

Name Type Description
minPoint Vector3 @param minPoint
maxPoint Vector3 @param maxPoint
sphereCenter Vector3 the sphere center

static IsCompletelyInFrustum(boundingVectors, frustumPlanes) → boolean

Parameters

Name Type Description
boundingVectors Vector3[] @param boundingVectors
frustumPlanes Plane[] Frustum planes

static IsInFrustum(boundingVectors, frustumPlanes) → boolean

Parameters

Name Type Description
boundingVectors Vector3[] @param boundingVectors
frustumPlanes Plane[] Frustum planes