Documentation

Classes

Class CL3D.Box3d

Axis aligned bounding box.

Class Overview
CL3D.Box3d()
An axis aligned bounding box with a min and a maximal edge.

Field Summary
Field Attributes Field Name and Description
 
Maximal Edge of the bounding box
 
Minimal Edge of the bounding box
Method Summary
Method Attributes Method Name and Description
 
Adds a box to the bounding box
 
Adds a point to the bounding box, increasing the box if the point is outside of the box
 
Adds a point to the bounding box, increasing the box if the point is outside of the box
 
Creates a clone of the box
 
Returns the center of the box
 
Returns all 8 edges of the bounding box
 
Returns the extent (or size) of the box
 
Returns if the box intersects with another box
 
intersectsWithLine(lineStart, lineEnd)
Returns if the box intersects with a line
 
Returns true if the box is empty (MinEdge == MaxEdge)
 
Returns if a point is inside this box
 
reset(x, y, z)
Resets the bounding box
Field Detail
{Vect3d} MaxEdge
Maximal Edge of the bounding box

{Vect3d} MinEdge
Minimal Edge of the bounding box
Method Detail
addInternalBox(v)
Adds a box to the bounding box
Parameters:
v
{CL3D.Box3d} 3d bounding box to add

addInternalPoint(x, y, z)
Adds a point to the bounding box, increasing the box if the point is outside of the box
Parameters:
x
y
z

addInternalPointByVector(v)
Adds a point to the bounding box, increasing the box if the point is outside of the box
Parameters:
v
{CL3D.Vect3d} 3d vector representing the point

{CL3D.Box3d} clone()
Creates a clone of the box
Returns:
{CL3D.Box3d} clone

{CL3D.Vect3d} getCenter()
Returns the center of the box
Returns:
{CL3D.Vect3d} center

{Array} getEdges()
Returns all 8 edges of the bounding box
Returns:
{Array} edges

{CL3D.Vect3d} getExtent()
Returns the extent (or size) of the box
Returns:
{CL3D.Vect3d} extent

intersectsWithBox(box)
Returns if the box intersects with another box
Parameters:
box
{CL3D.Box3d} other box

intersectsWithLine(lineStart, lineEnd)
Returns if the box intersects with a line
Parameters:
lineStart
{CL3D.Vect3d} start of the line
lineEnd
{CL3D.Vect3d} end of the line

isEmpty()
Returns true if the box is empty (MinEdge == MaxEdge)

isPointInside(p)
Returns if a point is inside this box
Parameters:
p
{CL3D.Vect3d} point to test

reset(x, y, z)
Resets the bounding box
Parameters:
x
y
z

© 2011-2018 N.Gebhardt, Ambiera
Documentation generated by JsDoc Toolkit