Packageorg.flintparticles.threeD.zones
Classpublic class ConeZone
ImplementsZone3D

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, axis:Vector3D, angle:Number, height:Number, 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
  
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  [read-write]

The angle at the apex of the cone.

Implementation
    public function get angle():Number
    public function set angle(value:Number):void
apexproperty 
apex:Vector3D  [read-write]

The point at the apex of the cone.

Implementation
    public function get apex():Vector3D
    public function set apex(value:Vector3D):void
axisproperty 
axis:Vector3D  [read-write]

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

The height of the cone.

Implementation
    public function get height():Number
    public function set height(value:Number):void
truncatedHeightproperty 
truncatedHeight:Number  [read-write]

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, axis:Vector3D, angle:Number, height:Number, truncatedHeight:Number = 0)

The constructor creates a ConeZone 3D zone.

Parameters
apex:Vector3D — The point at the apex of the cone.
 
axis:Vector3D — A vector along the central axis of the cone from the apex and towards the base of the cone.
 
angle:Number — The angle at the apex of the cone.
 
height:Number — 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.