AxisAlignedBoundingBox represents a bounding box volume that has its planes aligned to the local coordinate axes of the bounded object. This is useful for most meshes.

Constructor

new()

Creates a new AxisAlignedBoundingBox object.

Variables

read onlyhalfExtentsX:Float

read onlyhalfExtentsY:Float

read onlyhalfExtentsZ:Float

Methods

@:value({ target : null })closestPointToPoint(point:Vector3D, ?target:Vector3D):Vector3D

Finds the closest point on the bounding volume to another given point. This can be used for maximum error calculations for content within a given bound. @return

Parameters:

point

The point for which to find the closest point on the bounding volume

target

An optional Vector3D to store the result to prevent creating a new object.

containsPoint(position:Vector3D):Bool

@inheritDoc

fromExtremes(minX:Float, minY:Float, minZ:Float, maxX:Float, maxY:Float, maxZ:Float):Void

@inheritDoc

isInFrustum(planes:Vector<Plane3D>, numPlanes:Int):Bool

@inheritDoc

nullify():Void

@inheritDoc

Inherited Variables

Defined by BoundingVolumeBase

read onlyaabbPoints:Vector<Float>

read onlymax:Vector3D

read onlymin:Vector3D

Inherited Methods

Defined by BoundingVolumeBase

disposeRenderable():Void

Disposes of the bounds renderable object. Used to clear memory after a bounds rendeable is no longer required.

fromGeometry(geometry:Geometry):Void

Updates the bounds to fit a Geometry object.

Parameters:

geometry

The Geometry object to be bounded.

fromSphere(center:Vector3D, radius:Float):Void

Sets the bound to fit a given sphere.

Parameters:

center

The center of the sphere to be bounded

radius

The radius of the sphere to be bounded

fromVertices(vertices:Vector<Float>):Void

Updates the bounds to fit a list of vertices

Parameters:

vertices

A Vector.<Number> of vertex data to be bounded.

overlaps(bounds:BoundingVolumeBase):Bool

Tests if the bounds overlap other bounds, treating both bounds as AABBs.