Packageaway3d.bounds
Classpublic class AxisAlignedBoundingBox
InheritanceAxisAlignedBoundingBox Inheritance BoundingVolumeBase Inheritance Object

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.



Public Properties
 PropertyDefined By
 InheritedaabbPoints : Vector.<Number>
[read-only] Returns a vector of values representing the concatenated cartesian triplet of the 8 axial extremities of the bounding volume.
BoundingVolumeBase
 InheritedboundingRenderable : WireframePrimitiveBase
[read-only] Returns the bounding renderable object for the bounding volume, in cases where the showBounds property of the entity is set to true.
BoundingVolumeBase
  halfExtentsX : Number
[read-only]
AxisAlignedBoundingBox
  halfExtentsY : Number
[read-only]
AxisAlignedBoundingBox
  halfExtentsZ : Number
[read-only]
AxisAlignedBoundingBox
 Inheritedmax : Vector3D
[read-only] The maximum extreme of the bounds
BoundingVolumeBase
 Inheritedmin : Vector3D
[read-only] The minimum extreme of the bounds
BoundingVolumeBase
Protected Properties
 PropertyDefined By
 Inherited_aabbPoints : Vector.<Number>
BoundingVolumeBase
 Inherited_aabbPointsDirty : Boolean = true
BoundingVolumeBase
 Inherited_boundingRenderable : WireframePrimitiveBase
BoundingVolumeBase
 Inherited_max : Vector3D
BoundingVolumeBase
 Inherited_min : Vector3D
BoundingVolumeBase
Public Methods
 MethodDefined By
  
Creates a new AxisAlignedBoundingBox object.
AxisAlignedBoundingBox
  
[override]
AxisAlignedBoundingBox
  
[override] Clones the current BoundingVolume object
AxisAlignedBoundingBox
  
closestPointToPoint(point:Vector3D, target:Vector3D = null):Vector3D
Finds the closest point on the bounding volume to another given point.
AxisAlignedBoundingBox
  
containsPoint(position:Vector3D):Boolean
[override] Method for calculating whether the given position is contained within the bounding volume.
AxisAlignedBoundingBox
 Inherited
Disposes of the bounds renderable object.
BoundingVolumeBase
  
fromExtremes(minX:Number, minY:Number, minZ:Number, maxX:Number, maxY:Number, maxZ:Number):void
[override] Sets the bounds to the given extrema.
AxisAlignedBoundingBox
 Inherited
fromGeometry(geometry:Geometry):void
Updates the bounds to fit a Geometry object.
BoundingVolumeBase
 Inherited
fromSphere(center:Vector3D, radius:Number):void
Sets the bound to fit a given sphere.
BoundingVolumeBase
 Inherited
fromVertices(vertices:Vector.<Number>):void
Updates the bounds to fit a list of vertices
BoundingVolumeBase
  
isInFrustum(mvpMatrix:Matrix3D):Boolean
[override] Tests if the bounds are in the camera frustum.
AxisAlignedBoundingBox
  
nullify():void
[override] Sets the bounds to zero size.
AxisAlignedBoundingBox
  
rayIntersection(position:Vector3D, direction:Vector3D, targetNormal:Vector3D):Number
[override]
AxisAlignedBoundingBox
Protected Methods
 MethodDefined By
  
[override]
AxisAlignedBoundingBox
 Inherited
BoundingVolumeBase
  
[override]
AxisAlignedBoundingBox
Property Detail
halfExtentsXproperty
halfExtentsX:Number  [read-only]


Implementation
    public function get halfExtentsX():Number
halfExtentsYproperty 
halfExtentsY:Number  [read-only]


Implementation
    public function get halfExtentsY():Number
halfExtentsZproperty 
halfExtentsZ:Number  [read-only]


Implementation
    public function get halfExtentsZ():Number
Constructor Detail
AxisAlignedBoundingBox()Constructor
public function AxisAlignedBoundingBox()

Creates a new AxisAlignedBoundingBox object.

Method Detail
classifyToPlane()method
override public function classifyToPlane(plane:Plane3D):int

Parameters

plane:Plane3D

Returns
int
clone()method 
override public function clone():BoundingVolumeBase

Clones the current BoundingVolume object

Returns
BoundingVolumeBase — An exact duplicate of this object
closestPointToPoint()method 
public function closestPointToPoint(point:Vector3D, target:Vector3D = null):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.

Parameters

point:Vector3D — The point for which to find the closest point on the bounding volume
 
target:Vector3D (default = null) — An optional Vector3D to store the result to prevent creating a new object.

Returns
Vector3D
containsPoint()method 
override public function containsPoint(position:Vector3D):Boolean

Method for calculating whether the given position is contained within the bounding volume.

Parameters

position:Vector3D — The position in local coordinates to be checked.

Returns
Boolean — A Boolean value representing the detection of a contained position.
createBoundingRenderable()method 
override protected function createBoundingRenderable():WireframePrimitiveBase

Returns
WireframePrimitiveBase
fromExtremes()method 
override public function fromExtremes(minX:Number, minY:Number, minZ:Number, maxX:Number, maxY:Number, maxZ:Number):void

Sets the bounds to the given extrema.

Parameters

minX:Number — The minimum x value of the bounds
 
minY:Number — The minimum y value of the bounds
 
minZ:Number — The minimum z value of the bounds
 
maxX:Number — The maximum x value of the bounds
 
maxY:Number — The maximum y value of the bounds
 
maxZ:Number — The maximum z value of the bounds

isInFrustum()method 
override public function isInFrustum(mvpMatrix:Matrix3D):Boolean

Tests if the bounds are in the camera frustum.

Parameters

mvpMatrix:Matrix3D — The model view projection matrix for the object to which this bounding box belongs.

Returns
Boolean — True if the bounding box is at least partially inside the frustum
nullify()method 
override public function nullify():void

Sets the bounds to zero size.

rayIntersection()method 
override public function rayIntersection(position:Vector3D, direction:Vector3D, targetNormal:Vector3D):Number

Parameters

position:Vector3D
 
direction:Vector3D
 
targetNormal:Vector3D

Returns
Number
updateBoundingRenderable()method 
override protected function updateBoundingRenderable():void