Packageorg.flintparticles.threeD.zones
Classpublic class CylinderZone
InheritanceCylinderZone Inheritance Object
Implements Zone3D

The CylinderZone zone defines a zone that contains all the points in a cylinder. The cylinder can be positioned anywhere in 3D space and may, optionally, have a hole running down the centre of it.



Public Properties
 PropertyDefined By
  axis : Vector3D
The central axis of the cylinder, from the center point towards the other end.
CylinderZone
  center : Vector3D
The point at the center of one end of the cylinder.
CylinderZone
  innerRadius : Number
The inner radius of the cylinder.
CylinderZone
  length : Number
The length of the cylinder.
CylinderZone
  outerRadius : Number
The outer radius of the cylinder.
CylinderZone
Public Methods
 MethodDefined By
  
CylinderZone(center:Vector3D = null, axis:Vector3D = null, length:Number = 0, outerRadius:Number = 0, innerRadius:Number = 0)
The constructor creates a CylinderZone 3D zone.
CylinderZone
  
contains(p:Vector3D):Boolean
The contains method determines whether a point is inside the zone.
CylinderZone
  
getLocation():Vector3D
The getLocation method returns a random point inside the zone.
CylinderZone
  
getVolume():Number
The getArea method returns the size of the zone.
CylinderZone
Property Detail
axisproperty
axis:Vector3D

The central axis of the cylinder, from the center point towards the other end.


Implementation
    public function get axis():Vector3D
    public function set axis(value:Vector3D):void
centerproperty 
center:Vector3D

The point at the center of one end of the cylinder.


Implementation
    public function get center():Vector3D
    public function set center(value:Vector3D):void
innerRadiusproperty 
innerRadius:Number

The inner radius of the cylinder. This defines the hole in the center of the cylinder that runs the length of the cylinder. If this is set to zero, there is no hole.


Implementation
    public function get innerRadius():Number
    public function set innerRadius(value:Number):void
lengthproperty 
length:Number

The length of the cylinder.


Implementation
    public function get length():Number
    public function set length(value:Number):void
outerRadiusproperty 
outerRadius:Number

The outer radius of the cylinder.


Implementation
    public function get outerRadius():Number
    public function set outerRadius(value:Number):void
Constructor Detail
CylinderZone()Constructor
public function CylinderZone(center:Vector3D = null, axis:Vector3D = null, length:Number = 0, outerRadius:Number = 0, innerRadius:Number = 0)

The constructor creates a CylinderZone 3D zone.

Parameters
center:Vector3D (default = null) — The point at the center of one end of the cylinder.
 
axis:Vector3D (default = null) — A vector along the central axis of the cylinder from the center and towards the other end of the cylinder.
 
length:Number (default = 0) — The length of the cylinder.
 
outerRadius:Number (default = 0) — The outer radius of the cylinder.
 
innerRadius:Number (default = 0) — The inner radius of the cylinder. This defines the hole in the center of the cylinder that runs the length of the cylinder. If this is set to zero, there is no hole.
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 cylinder, 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 cylinder.
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 — The volume of the cylinder