Packageorg.flintparticles.threeD.zones
Classpublic class BoxZone
InheritanceBoxZone Inheritance Object
Implements Zone3D

The BoxZone zone defines a cuboid or box shaped zone.



Public Properties
 PropertyDefined By
  center : Vector3D
The point at the center of the box.
BoxZone
  depth : Number
The depth of the box.
BoxZone
  depthAxis : Vector3D
The axis along which the depth is measured.
BoxZone
  height : Number
The height of the box.
BoxZone
  upAxis : Vector3D
The axis along which the height is measured.
BoxZone
  width : Number
The width of the box.
BoxZone
Public Methods
 MethodDefined By
  
BoxZone(width:Number = 0, height:Number = 0, depth:Number = 0, center:Vector3D = null, upAxis:Vector3D = null, depthAxis:Vector3D = null)
The constructor creates a BoxZone 3D zone.
BoxZone
  
contains(p:Vector3D):Boolean
The contains method determines whether a point is inside the box.
BoxZone
  
getLocation():Vector3D
The getLocation method returns a random point inside the box.
BoxZone
  
getVolume():Number
The getArea method returns the volume of the box.
BoxZone
Property Detail
centerproperty
center:Vector3D

The point at the center of the box.


Implementation
    public function get center():Vector3D
    public function set center(value:Vector3D):void
depthproperty 
depth:Number

The depth of the box.


Implementation
    public function get depth():Number
    public function set depth(value:Number):void
depthAxisproperty 
depthAxis:Vector3D

The axis along which the depth is measured. The box is rotated so that the depth is in this direction.


Implementation
    public function get depthAxis():Vector3D
    public function set depthAxis(value:Vector3D):void
heightproperty 
height:Number

The height of the box.


Implementation
    public function get height():Number
    public function set height(value:Number):void
upAxisproperty 
upAxis:Vector3D

The axis along which the height is measured. The box is rotated so that the height is in this direction.


Implementation
    public function get upAxis():Vector3D
    public function set upAxis(value:Vector3D):void
widthproperty 
width:Number

The width of the box.


Implementation
    public function get width():Number
    public function set width(value:Number):void
Constructor Detail
BoxZone()Constructor
public function BoxZone(width:Number = 0, height:Number = 0, depth:Number = 0, center:Vector3D = null, upAxis:Vector3D = null, depthAxis:Vector3D = null)

The constructor creates a BoxZone 3D zone.

Parameters
width:Number (default = 0) — The width of the box.
 
height:Number (default = 0) — The height of the box.
 
depth:Number (default = 0) — The depth of the box.
 
center:Vector3D (default = null) — The point at the center of the box.
 
upAxis:Vector3D (default = null) — The axis along which the height is measured. The box is rotated so that the height is in this direction.
 
depthAxis:Vector3D (default = null) — The axis along which the depth is measured. The box is rotated so that the depth is in this direction.
Method Detail
contains()method
public function contains(p:Vector3D):Boolean

The contains method determines whether a point is inside the box. This method is used by the initializers and actions that use the zone. Usually, it need not be called directly by the user.

Parameters

p:Vector3D — The x coordinate of the location to test for.

Returns
Boolean — true if point is inside the zone, false if it is outside.
getLocation()method 
public function getLocation():Vector3D

The getLocation method returns a random point inside the box. This method is used by the initializers and actions that use the zone. Usually, it need not be called directly by the user.

Returns
Vector3D — a random point inside the zone.
getVolume()method 
public function getVolume():Number

The getArea method returns the volume of the box. This method is used by the MultiZone class. Usually, it need not be called directly by the user.

Returns
Number — the volume of the box.