Class: BoundingSphere

BoundingSphere

BoundingAABB represents a bounding sphere.


new BoundingSphere()

Author:
  • derschmale <http://www.derschmale.com>

Extends

Members


center

The center coordinate of the bounds

Inherited From:

expanse

Describes the size of the bounding box. BoundingVolume#EXPANSE_EMPTY, BoundingVolume#EXPANSE_FINITE, or BoundingVolume#EXPANSE_INFINITE

Inherited From:

halfExtent

The half extents of the bounds. These are the half-dimensions of the box encompassing the bounds from the center.

Inherited From:

maximum

The maximum reach of the bounds, described as a box range.

Inherited From:

minimum

The minimum reach of the bounds, described as a box range.

Inherited From:

Methods


classifyAgainstPlane(plane)

Tests on which side of the plane the bounding box is (front, back or intersecting).

Parameters:
Name Type Description
plane

The plane to test against.

Inherited From:
Overrides:
Returns:

The side of the plane

Type
PlaneSide

clear(expanseState)

Clear the bounds.

Parameters:
Name Type Description
expanseState

The state to reset to. Either BoundingVolume#EXPANSE_EMPTY or BoundingVolume#EXPANSE_INFINITE.

Inherited From:

getRadius()

The radius of the sphere encompassing the bounds. This is implementation-dependent, because the radius is less precise for a box than for a sphere

Inherited From:
Overrides:

growToIncludeBound()


growToIncludeMesh()


growToIncludeMinMax()


intersectsBound()

Tests whether the bounds intersect another bounding volume

Inherited From:
Overrides:

intersectsConvexSolid(cullPlanes, numPlanes)

Tests whether the bounds intersects a given convex solid. The convex solid is described as a list of planes pointing outward. Infinite solids are also allowed (Directional Light frusta without a near plane, for example)

Parameters:
Name Type Description
cullPlanes

An Array of planes to be tested. Planes are simply Float4 objects.

numPlanes

The amount of planes to be tested against. This so we can test less planes than are in the cullPlanes array (Directional Light frusta, for example)

Inherited From:
Overrides:
Returns:

Whether or not the bounds intersect the solid.

Type
boolean

setExplicit()

Sets the center and radius explicitly.


transformFrom(sourceBound, matrix)

Transforms a bounding volume and stores it in this one.

Parameters:
Name Type Description
sourceBound BoundingVolume

The bounds to transform.

matrix Matrix4x4

The matrix containing the transformation.

Inherited From:
Overrides: