Packageorg.flintparticles.threeD.zones
Classpublic class DiscZone
InheritanceDiscZone Inheritance Object
Implements Zone3D

The DiscZone zone defines a zone that contains all the points on a disc. The disc can be positioned anywhere in 3D space. The disc may, optionally, have a hole in the middle.



Public Properties
 PropertyDefined By
  center : Vector3D
The point at the center of the disc.
DiscZone
  innerRadius : Number
The inner radius of the disc.
DiscZone
  normal : Vector3D
The vector normal to the disc.
DiscZone
  outerRadius : Number
The outer radius of the disc.
DiscZone
Public Methods
 MethodDefined By
  
DiscZone(center:Vector3D = null, normal:Vector3D = null, outerRadius:Number = 0, innerRadius:Number = 0)
The constructor creates a DiscZone 3D zone.
DiscZone
  
contains(p:Vector3D):Boolean
The contains method determines whether a point is inside the zone.
DiscZone
  
getLocation():Vector3D
The getLocation method returns a random point inside the zone.
DiscZone
  
getVolume():Number
The getArea method returns the size of the zone.
DiscZone
Property Detail
centerproperty
center:Vector3D

The point at the center of the disc.


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

The inner radius of the disc.


Implementation
    public function get innerRadius():Number
    public function set innerRadius(value:Number):void
normalproperty 
normal:Vector3D

The vector normal to the disc. When setting the vector, the vector is normalized. So, when reading the vector this will be a normalized version of the vector that is set.


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

The outer radius of the disc.


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

The constructor creates a DiscZone 3D zone.

Parameters
center:Vector3D (default = null) — The point at the center of the disc.
 
normal:Vector3D (default = null) — A vector normal to the disc.
 
outerRadius:Number (default = 0) — The outer radius of the disc.
 
innerRadius:Number (default = 0) — The inner radius of the disc. This defines the hole in the center of the disc. If 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 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 — The surface area of the disc.