Class: BoundingBox

BoundingBox

Bounding Box

new BoundingBox(min, max)

Parameters:
Name Type Description
min Array.<float> Min corner as 3D point (array of 3 float)
max Array.<float> Max corner as 3D point (array of 3 float)

Methods


extend(x, y, z)

Extent the bounding box with the given point
Parameters:
Name Type Description
x float Coord x of extent point
y float Coord y of extent point
z float Coord z of extent point

compute(vertices, length, stride)

Compute the bounding box from an array of vertices
Parameters:
Name Type Description
vertices Array.<float> All coords as array of multiple of 3 float)
length float Vertices array length
stride float Stride (3 by default)

getCorner(pos)

Get the corner of a bounding box
Parameters:
Name Type Description
pos float Position
Returns:
Corner
Type
?

getCenter()

Get the center of a bounding box
Returns:
Center
Type
?

getRadius()

Get the radius of a bounding box
Returns:
Radius
Type
float