Class JSC3D.AABB
AABB
This class implements the Axis-Aligned Bounding Box to measure spatial enclosure.
Defined in: jsc3d.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
X coordinate of the maximum edge of the box.
|
|
Y coordinate of the maximum edge of the box.
|
|
Z coordinate of the maximum edge of the box.
|
|
X coordinate of the minimum edge of the box.
|
|
Y coordinate of the minimum edge of the box.
|
|
Z coordinate of the minimum edge of the box.
|
Method Attributes | Method Name and Description |
---|---|
center(c)
Get center coordinates of the AABB.
|
|
Get the length of the diagonal of the AABB.
|
Field Detail
maxX
X coordinate of the maximum edge of the box.
maxY
Y coordinate of the maximum edge of the box.
maxZ
Z coordinate of the maximum edge of the box.
minX
X coordinate of the minimum edge of the box.
minY
Y coordinate of the minimum edge of the box.
minZ
Z coordinate of the minimum edge of the box.
Method Detail
{Array}
center(c)
Get center coordinates of the AABB.
- Parameters:
- {Array} c
- an array to receive the result.
- Returns:
- {Array} center coordinates as an array.
{Number}
lengthOfDiagonal()
Get the length of the diagonal of the AABB.
- Returns:
- {Number} length of the diagonal.