| Package | org.flintparticles.zones |
| Class | public class DiscZone |
| Implements | Zone |
| Property | Defined by | ||
|---|---|---|---|
| center : Point
The centre of the disc.
| DiscZone | ||
| innerRadius : Number
The radius of the inner edge of the disc.
| DiscZone | ||
| outerRadius : Number
The radius of the outer edge of the disc.
| DiscZone | ||
| Method | Defined by | ||
|---|---|---|---|
|
DiscZone(center:Point, outerRadius:Number, innerRadius:Number = 0)
The constructor defines a DiscZone zone.
| DiscZone | ||
|
contains(x:Number, y:Number):Boolean
The contains method determines whether a point is inside the zone.
| DiscZone | ||
|
getArea():Number
The getArea method returns the size of the zone.
| DiscZone | ||
|
getLocation():Point
The getLocation method returns a random point inside the zone.
| DiscZone | ||
| center | property |
center:Point [read-write]The centre of the disc.
Implementation public function get center():Point
public function set center(value:Point):void
| innerRadius | property |
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
| outerRadius | property |
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
| DiscZone | () | constructor |
public function DiscZone(center:Point, outerRadius:Number, innerRadius:Number = 0)The constructor defines a DiscZone zone.
Parameterscenter:Point — The centre of the disc.
|
|
outerRadius:Number — The radius of the outer edge of the disc.
|
|
innerRadius:Number (default = 0) — 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.
|
| contains | () | method |
public function contains(x:Number, y:Number):BooleanThe 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.
Parametersx:Number — The x coordinate of the location to test for.
|
|
y:Number — The y coordinate of the location to test for.
|
Boolean — true if point is inside the zone, false if it is outside.
|
| getArea | () | method |
public function getArea():NumberThe 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.
ReturnsNumber — the size of the zone.
|
| getLocation | () | method |
public function getLocation():PointThe 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.
ReturnsPoint — a random point inside the zone.
|