Packageorg.flintparticles.zones
Classpublic class DiscSectorZone
ImplementsZone

The DiscSectorZone zone defines a section of a Disc zone. The disc on which it's based have a hole in the middle, like a doughnut.



Public Properties
 PropertyDefined by
  center : Point
The centre of the disc.
DiscSectorZone
  innerRadius : Number
The radius of the inner edge of the disc.
DiscSectorZone
  maxAngle : Number
The maximum angle, in radians, for points to be included in the zone.
DiscSectorZone
  minAngle : Number
The minimum angle, in radians, for points to be included in the zone.
DiscSectorZone
  outerRadius : Number
The radius of the outer edge of the disc.
DiscSectorZone
Public Methods
 MethodDefined by
  
DiscSectorZone(center:Point, outerRadius:Number, innerRadius:Number, minAngle:Number, maxAngle:Number)
The constructor defines a DiscSectorZone zone.
DiscSectorZone
  
contains(x:Number, y:Number):Boolean
The contains method determines whether a point is inside the zone.
DiscSectorZone
  
getArea():Number
The getArea method returns the size of the zone.
DiscSectorZone
  
getLocation():Point
The getLocation method returns a random point inside the zone.
DiscSectorZone
Property detail
centerproperty
center:Point  [read-write]

The centre of the disc.

Implementation
    public function get center():Point
    public function set center(value:Point):void
innerRadiusproperty 
innerRadius:Number  [read-write]

The radius of the inner edge of the disc.

Implementation
    public function get innerRadius():Number
    public function set innerRadius(value:Number):void
maxAngleproperty 
maxAngle:Number  [read-write]

The maximum angle, in radians, for points to be included in the zone. An angle of zero is horizontal and to the right. Positive angles are in a clockwise direction (towards the graphical y axis). Angles are converted to a value between 0 and two times PI.

Implementation
    public function get maxAngle():Number
    public function set maxAngle(value:Number):void
minAngleproperty 
minAngle:Number  [read-write]

The minimum angle, in radians, for points to be included in the zone. An angle of zero is horizontal and to the right. Positive angles are in a clockwise direction (towards the graphical y axis). Angles are converted to a value between 0 and two times PI.

Implementation
    public function get minAngle():Number
    public function set minAngle(value:Number):void
outerRadiusproperty 
outerRadius:Number  [read-write]

The radius of the outer edge of the disc.

Implementation
    public function get outerRadius():Number
    public function set outerRadius(value:Number):void
Constructor detail
DiscSectorZone()constructor
public function DiscSectorZone(center:Point, outerRadius:Number, innerRadius:Number, minAngle:Number, maxAngle:Number)

The constructor defines a DiscSectorZone zone.

Parameters
center:Point — The centre of the disc.
 
outerRadius:Number — The radius of the outer edge of the disc.
 
innerRadius:Number — If set, this defines the radius of the inner edge of the disc. Points closer to the center than this inner radius are excluded from the zone. If this parameter is not set then all points inside the outer radius are included in the zone.
 
minAngle:Number — The minimum angle, in radians, for points to be included in the zone. An angle of zero is horizontal and to the right. Positive angles are in a clockwise direction (towards the graphical y axis). Angles are converted to a value between 0 and two times PI.
 
maxAngle:Number — The maximum angle, in radians, for points to be included in the zone. An angle of zero is horizontal and to the right. Positive angles are in a clockwise direction (towards the graphical y axis). Angles are converted to a value between 0 and two times PI.
Method detail
contains()method
public function contains(x:Number, y:Number):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
x:Number — The x coordinate of the location to test for.
 
y:Number — The y coordinate of the location to test for.

Returns
Boolean — true if point is inside the zone, false if it is outside.
getArea()method 
public function getArea():Number

The getArea method returns the size of the zone. It's used by the MultiZone class to manage the balancing between the different zones. Usually, it need not be called directly by the user.

Returns
Number — the size of the zone.
getLocation()method 
public function getLocation():Point

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
Point — a random point inside the zone.