Class: Sphere

Sphere

Sphere box class.

new Sphere (x, y, radius)

Returns an sphere box object.

Name Type Default Description
x Number 0 optional

The X coordinate of the upper-left corner of the sphere.

y Number 0 optional

The Y coordinate of the upper-left corner of the sphere.

radius Number 0 optional

The width of this obb.

Members

heightRange

The overall height range of this obb.

widthRange

The overall width range of this obb.

Methods

aabbCollision (aabb)

Checks whether the aabb object given are contained within this sphere.

Name Type Description
aabb AABB

The aabb object of test

obbCollision (obb)

Checks whether the obb object given are contained within this sphere.

Name Type Description
obb OBB

The obb object of test

pointCollision (point)

Checks whether the point object given are contained within this sphere.

Name Type Description
point Point

The point object of test.

sphere2aabb ()AABB

Transforms this object into a new AABB object and returns.

Returns:
Type Description
AABB

sphere2obb ()OBB

Transforms this object into a new OBB object and returns.

Returns:
Type Description
OBB

sphereCollision (sphere)

Checks whether the sphere object given are contained within this sphere.

Name Type Description
sphere Sphere

The sphere object of test