Packageaway3d.bounds
Classpublic class BoundingVolumeBase
InheritanceBoundingVolumeBase Inheritance Object
Subclasses AxisAlignedBoundingBox, BoundingSphere, NullBounds

An abstract base class for all bounding volume classes. It should not be instantiated directly.



Public Properties
 PropertyDefined By
  aabbPoints : Vector.<Number>
[read-only] Returns a vector of values representing the concatenated cartesian triplet of the 8 axial extremities of the bounding volume.
BoundingVolumeBase
  boundingRenderable : 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
  max : Vector3D
[read-only] The maximum extreme of the bounds
BoundingVolumeBase
  min : Vector3D
[read-only] The minimum extreme of the bounds
BoundingVolumeBase
Protected Properties
 PropertyDefined By
  _aabbPoints : Vector.<Number>
BoundingVolumeBase
  _aabbPointsDirty : Boolean = true
BoundingVolumeBase
  _boundingRenderable : WireframePrimitiveBase
BoundingVolumeBase
  _max : Vector3D
BoundingVolumeBase
  _min : Vector3D
BoundingVolumeBase
Public Methods
 MethodDefined By
  
Creates a new BoundingVolumeBase object
BoundingVolumeBase
  
BoundingVolumeBase
  
Clones the current BoundingVolume object
BoundingVolumeBase
  
containsPoint(position:Vector3D):Boolean
Method for calculating whether the given position is contained within the bounding volume.
BoundingVolumeBase
  
Disposes of the bounds renderable object.
BoundingVolumeBase
  
fromExtremes(minX:Number, minY:Number, minZ:Number, maxX:Number, maxY:Number, maxZ:Number):void
Sets the bounds to the given extrema.
BoundingVolumeBase
  
fromGeometry(geometry:Geometry):void
Updates the bounds to fit a Geometry object.
BoundingVolumeBase
  
fromSphere(center:Vector3D, radius:Number):void
Sets the bound to fit a given sphere.
BoundingVolumeBase
  
fromVertices(vertices:Vector.<Number>):void
Updates the bounds to fit a list of vertices
BoundingVolumeBase
  
isInFrustum(mvpMatrix:Matrix3D):Boolean
Tests if the bounds are in the camera frustum.
BoundingVolumeBase
  
nullify():void
Sets the bounds to zero size.
BoundingVolumeBase
  
rayIntersection(position:Vector3D, direction:Vector3D, targetNormal:Vector3D):Number
Method for calculating whether an intersection of the given ray occurs with the bounding volume.
BoundingVolumeBase
Protected Methods
 MethodDefined By
  
BoundingVolumeBase
  
BoundingVolumeBase
  
BoundingVolumeBase
Property Detail
_aabbPointsproperty
protected var _aabbPoints:Vector.<Number>

_aabbPointsDirtyproperty 
protected var _aabbPointsDirty:Boolean = true

_boundingRenderableproperty 
protected var _boundingRenderable:WireframePrimitiveBase

_maxproperty 
protected var _max:Vector3D

_minproperty 
protected var _min:Vector3D

aabbPointsproperty 
aabbPoints:Vector.<Number>  [read-only]

Returns a vector of values representing the concatenated cartesian triplet of the 8 axial extremities of the bounding volume.


Implementation
    public function get aabbPoints():Vector.<Number>
boundingRenderableproperty 
boundingRenderable: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.


Implementation
    public function get boundingRenderable():WireframePrimitiveBase

See also

maxproperty 
max:Vector3D  [read-only]

The maximum extreme of the bounds


Implementation
    public function get max():Vector3D
minproperty 
min:Vector3D  [read-only]

The minimum extreme of the bounds


Implementation
    public function get min():Vector3D
Constructor Detail
BoundingVolumeBase()Constructor
public function BoundingVolumeBase()

Creates a new BoundingVolumeBase object

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

Parameters

plane:Plane3D

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

Clones the current BoundingVolume object

Returns
BoundingVolumeBase — An exact duplicate of this object
containsPoint()method 
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 
protected function createBoundingRenderable():WireframePrimitiveBase

Returns
WireframePrimitiveBase
disposeRenderable()method 
public function disposeRenderable():void

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

fromExtremes()method 
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

fromGeometry()method 
public function fromGeometry(geometry:Geometry):void

Updates the bounds to fit a Geometry object.

Parameters

geometry:Geometry — The Geometry object to be bounded.

fromSphere()method 
public function fromSphere(center:Vector3D, radius:Number):void

Sets the bound to fit a given sphere.

Parameters

center:Vector3D — The center of the sphere to be bounded
 
radius:Number — The radius of the sphere to be bounded

fromVertices()method 
public function fromVertices(vertices:Vector.<Number>):void

Updates the bounds to fit a list of vertices

Parameters

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

isInFrustum()method 
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 
public function nullify():void

Sets the bounds to zero size.

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

Method for calculating whether an intersection of the given ray occurs with the bounding volume.

Parameters

position:Vector3D — The starting position of the casting ray in local coordinates.
 
direction:Vector3D — A unit vector representing the direction of the casting ray in local coordinates.
 
targetNormal:Vector3D — The vector to store the bounds' normal at the point of collision

Returns
Number — A Boolean value representing the detection of an intersection.
updateAABBPoints()method 
protected function updateAABBPoints():void

updateBoundingRenderable()method 
protected function updateBoundingRenderable():void