BoundingBox

clay. BoundingBox

# new BoundingBox(minopt, maxopt)

Source:

Axis aligned bounding box

Parameters:
Name Type Attributes Description
min clay.Vector3 <optional>
max clay.Vector3 <optional>

Members

# max :clay.Vector3

Source:

Maximum coords of bounding box

Type:

# min :clay.Vector3

Source:

Minimum coords of bounding box

Type:

# transformFrom

Source:

Get from another bounding box and an affine transform matrix.

# vertices :Array.<Float32Array>

Source:

Eight coords of bounding box

Type:
  • Array.<Float32Array>

Methods

# applyProjection(matrix)

Source:

Apply a projection matrix to the bounding box

Parameters:
Name Type Description
matrix clay.Matrix4

# applyTransform(matrix)

Source:

Apply an affine transform matrix to the bounding box

Parameters:
Name Type Description
matrix clay.Matrix4

# clone() → {clay.BoundingBox}

Source:

Clone a new bounding box

Returns:
Type
clay.BoundingBox

# containBoundingBox(bbox) → {boolean}

Source:

If contain another bounding box entirely

Parameters:
Name Type Description
bbox clay.BoundingBox
Returns:
Type
boolean

# containPoint(point) → {boolean}

Source:

If contain point entirely

Parameters:
Name Type Description
point clay.Vector3
Returns:
Type
boolean

# copy(bbox)

Source:

Copy values from another bounding box

Parameters:
Name Type Description
bbox clay.BoundingBox

# intersectBoundingBox(bbox) → {boolean}

Source:

If intersect with another bounding box

Parameters:
Name Type Description
bbox clay.BoundingBox
Returns:
Type
boolean

# intersection(bbox)

Source:

Intersection operation with another bounding box

Parameters:
Name Type Description
bbox clay.BoundingBox

# isFinite()

Source:

If bounding box is finite

# union(bbox)

Source:

Union operation with another bounding box

Parameters:
Name Type Description
bbox clay.BoundingBox

# updateFromVertices(vertices)

Source:

Update min and max coords from a vertices array

Parameters:
Name Type Description
vertices array