Packageorg.flintparticles.threeD.zones
Classpublic class BoxZone
ImplementsZone3D

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, height:Number, depth:Number, center:Vector3D, upAxis:Vector3D, depthAxis:Vector3D)
The constructor creates a BoxZone 3D zone.
BoxZone
  
contains(p:Vector3D):Boolean
The contains method determines whether a point is inside the box.
BoxZone
  
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  [read-write]

The point at the center of the box.

Implementation
    public function get center():Vector3D
    public function set center(value:Vector3D):void
depthproperty 
depth:Number  [read-write]

The depth of the box.

Implementation
    public function get depth():Number
    public function set depth(value:Number):void
depthAxisproperty 
depthAxis:Vector3D  [read-write]

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  [read-write]

The height of the box.

Implementation
    public function get height():Number
    public function set height(value:Number):void
upAxisproperty 
upAxis:Vector3D  [read-write]

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  [read-write]

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, height:Number, depth:Number, center:Vector3D, upAxis:Vector3D, depthAxis:Vector3D)

The constructor creates a BoxZone 3D zone.

Parameters
width:Number — The width of the box.
 
height:Number — The height of the box.
 
depth:Number — The depth of the box.
 
center:Vector3D — The point at the center of the box.
 
upAxis:Vector3D — The axis along which the height is measured. The box is rotated so that the height is in this direction.
 
depthAxis:Vector3D — 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.