Packageorg.flintparticles.threeD.zones
Classpublic class ConeZone
InheritanceConeZone Inheritance Object
Implements Zone3D

The ConeZone zone defines a zone that contains all the points inside a cone. The cone can be positioned anywhere in 3D space. The cone may, optionally, have its top removed, leaving a truncated base as the zone.



Public Properties
 PropertyDefined By
  angle : Number
The angle at the apex of the cone.
ConeZone
  apex : Vector3D
The point at the apex of the cone.
ConeZone
  axis : Vector3D
The central axis of the cone, from the apex towards the base.
ConeZone
  height : Number
The height of the cone.
ConeZone
  truncatedHeight : Number
The height at which the top of the cone is removed, leaving just the base from height to truncatedHeight.
ConeZone
Public Methods
 MethodDefined By
  
ConeZone(apex:Vector3D = null, axis:Vector3D = null, angle:Number = 0, height:Number = 0, truncatedHeight:Number = 0)
The constructor creates a ConeZone 3D zone.
ConeZone
  
contains(p:Vector3D):Boolean
The contains method determines whether a point is inside the zone.
ConeZone
  
getLocation():Vector3D
The getLocation method returns a random point inside the zone.
ConeZone
  
getVolume():Number
The getArea method returns the size of the zone.
ConeZone
Property Detail
angleproperty
angle:Number

The angle at the apex of the cone.


Implementation
    public function get angle():Number
    public function set angle(value:Number):void
apexproperty 
apex:Vector3D

The point at the apex of the cone.


Implementation
    public function get apex():Vector3D
    public function set apex(value:Vector3D):void
axisproperty 
axis:Vector3D

The central axis of the cone, from the apex towards the base.


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

The height of the cone.


Implementation
    public function get height():Number
    public function set height(value:Number):void
truncatedHeightproperty 
truncatedHeight:Number

The height at which the top of the cone is removed, leaving just the base from height to truncatedHeight.


Implementation
    public function get truncatedHeight():Number
    public function set truncatedHeight(value:Number):void
Constructor Detail
ConeZone()Constructor
public function ConeZone(apex:Vector3D = null, axis:Vector3D = null, angle:Number = 0, height:Number = 0, truncatedHeight:Number = 0)

The constructor creates a ConeZone 3D zone.

Parameters
apex:Vector3D (default = null) — The point at the apex of the cone.
 
axis:Vector3D (default = null) — A vector along the central axis of the cone from the apex and towards the base of the cone.
 
angle:Number (default = 0) — The angle at the apex of the cone.
 
height:Number (default = 0) — The height of the cone.
 
truncatedHeight:Number (default = 0) — The height at which the top of the cone is removed, leaving just the base from height to truncatedHeight.
Method Detail
contains()method
public function contains(p:Vector3D):Boolean

The contains method determines whether a point is inside the zone. 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 location to test.

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

The getLocation method returns a random point inside the zone. 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 size of the zone. This method is used by the MultiZone class. Usually, it need not be called directly by the user.

Returns
Number — a random point inside the zone.