CopperLicht API Documentation
Class CL3D.Box3d
Axis aligned bounding box.
Field Attributes | Field Name and Description |
---|---|
Maximal Edge of the bounding box
|
|
Minimal Edge of the bounding box
|
Method Attributes | Method Name and Description |
---|---|
Adds a box to the bounding box
|
|
addInternalPoint(x, y, z)
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
|
|
clone()
Creates a clone of the box
|
|
Returns the center of the box
|
|
getEdges()
Returns all 8 edges of the bounding box
|
|
Returns the extent (or size) of the box
|
|
intersectsWithBox(box)
Returns if the box intersects with another box
|
|
intersectsWithLine(lineStart, lineEnd)
Returns if the box intersects with a line
|
|
isEmpty()
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