| Package | org.flintparticles.threeD.zones |
| Class | public class GreyscaleZone |
| Inheritance | GreyscaleZone Object |
| Implements | Zone3D |
| Property | Defined By | ||
|---|---|---|---|
| bitmapData : BitmapData
The bitmapData object that defines the zone. | GreyscaleZone | ||
| corner : Vector3D
The position for the top left corner of the bitmap data for the zone. | GreyscaleZone | ||
| left : Vector3D
The left side of the zone from the corner. | GreyscaleZone | ||
| top : Vector3D
The top side of the zone from the corner. | GreyscaleZone | ||
| Method | Defined By | ||
|---|---|---|---|
GreyscaleZone(bitmapData:BitmapData = null, corner:Vector3D = null, top:Vector3D = null, left:Vector3D = null)
The constructor creates a Greyscale zone. | GreyscaleZone | ||
contains(p:Vector3D):Boolean
The contains method determines whether a point is inside the zone. | GreyscaleZone | ||
getLocation():Vector3D
The getLocation method returns a random point inside the zone. | GreyscaleZone | ||
getVolume():Number
The getVolume method returns the size of the zone. | GreyscaleZone | ||
invalidate():void
This method forces the zone to revaluate itself. | GreyscaleZone | ||
| bitmapData | property |
bitmapData:BitmapDataThe bitmapData object that defines the zone.
public function get bitmapData():BitmapData public function set bitmapData(value:BitmapData):void| corner | property |
corner:Vector3DThe position for the top left corner of the bitmap data for the zone.
public function get corner():Vector3D public function set corner(value:Vector3D):void| left | property |
left:Vector3DThe left side of the zone from the corner. The length of the vector indicates how long the side is.
public function get left():Vector3D public function set left(value:Vector3D):void| top | property |
top:Vector3DThe top side of the zone from the corner. The length of the vector indicates how long the side is.
public function get top():Vector3D public function set top(value:Vector3D):void| GreyscaleZone | () | Constructor |
public function GreyscaleZone(bitmapData:BitmapData = null, corner:Vector3D = null, top:Vector3D = null, left:Vector3D = null)The constructor creates a Greyscale zone. To avoid distorting the zone, the top and left vectors should be perpendicular and the same lengths as the width and height of the bitmap data object. Vectors that are not the same width and height as the bitmap data object will scale the zone and vectors that are not perpendicular will skew the zone.
ParametersbitmapData:BitmapData (default = null) — The bitmapData object that defines the zone.
| |
corner:Vector3D (default = null) — The position for the top left corner of the bitmap data for the zone.
| |
top:Vector3D (default = null) — The top side of the zone from the corner. The length of the vector
indicates how long the side is.
| |
left:Vector3D (default = null) — The left side of the zone from the corner. The length of the
vector indicates how long the side is.
|
| contains | () | method |
public function contains(p:Vector3D):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.
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. This method is used by the initializers and actions that use the zone. Usually, it need not be called directly by the user.
ReturnsVector3D — a random point inside the zone.
|
| getVolume | () | method |
public function getVolume():NumberThe getVolume 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.
ReturnsNumber — a random point inside the zone.
|
| invalidate | () | method |
public function invalidate():voidThis method forces the zone to revaluate itself. It should be called whenever the contents of the BitmapData object change. However, it is an intensive method and calling it frequently will likely slow your code down.