| Package | org.flintparticles.threeD.zones |
| Interface | public interface Zone3D |
| Implementors | BitmapDataZone, BoxZone, ConeZone, CylinderZone, DiscZone, FrustrumZone, GreyscaleZone, LineZone, MultiZone, ParallelogramZone, PointZone, SphereZone |
A zone is a class that defined a region in 2d space. The two required methods make it easy to get a random point within the zone and to find whether a specific point is within the zone. Zones are used to define the start location for particles (in the Position initializer), to define the start velocity for particles (in the Velocity initializer), and to define zones within which the particles die.
| Method | Defined By | ||
|---|---|---|---|
contains(p:Vector3D):Boolean
The contains method determines whether a point is inside the zone. | Zone3D | ||
getLocation():Vector3D
The getLocation method returns a random point inside the zone. | Zone3D | ||
getVolume():Number
The getArea method returns the size of the zone. | Zone3D | ||
| contains | () | method |
public function contains(p:Vector3D):BooleanThe contains method determines whether a point is inside the zone.
Parameters
p:Vector3D — The x coordinate of the location to test for.
|
Boolean — true if point is inside the zone, false if it is outside.
|
| getLocation | () | method |
public function getLocation():Vector3DThe getLocation method returns a random point inside the zone.
ReturnsVector3D — a random point inside the zone.
|
| getVolume | () | method |
public function getVolume():NumberThe getArea method returns the size of the zone. It's used by the MultiZone class to manage the balancing between the different zones.
ReturnsNumber — the size of the zone.
|