| Package | org.flintparticles.threeD.zones |
| Class | public class BitmapDataZone |
| Implements | Zone3D |
| Property | Defined by | ||
|---|---|---|---|
| bitmapData : BitmapData
The bitmapData object that defines the zone.
| BitmapDataZone | ||
| corner : Vector3D
The position for the top left corner of the bitmap data for the zone.
| BitmapDataZone | ||
| left : Vector3D
The left side of the zone from the corner.
| BitmapDataZone | ||
| top : Vector3D
The top side of the zone from the corner.
| BitmapDataZone | ||
| Method | Defined by | ||
|---|---|---|---|
|
The constructor creates a BitmapDataZone zone.
| BitmapDataZone | ||
|
The contains method determines whether a point is inside the zone.
| BitmapDataZone | ||
|
The getLocation method returns a random point inside the zone.
| BitmapDataZone | ||
|
getVolume():Number
The getVolume method returns the size of the zone.
| BitmapDataZone | ||
|
invalidate():void
This method forces the zone to revaluate itself.
| BitmapDataZone | ||
| bitmapData | property |
bitmapData:BitmapData [read-write]The bitmapData object that defines the zone.
Implementation public function get bitmapData():BitmapData
public function set bitmapData(value:BitmapData):void
| corner | property |
corner:Vector3D [read-write]The position for the top left corner of the bitmap data for the zone.
Implementation public function get corner():Vector3D
public function set corner(value:Vector3D):void
| left | property |
left:Vector3D [read-write]The left side of the zone from the corner. The length of the vector indicates how long the side is.
Implementation public function get left():Vector3D
public function set left(value:Vector3D):void
| top | property |
top:Vector3D [read-write]The top side of the zone from the corner. The length of the vector indicates how long the side is.
Implementation public function get top():Vector3D
public function set top(value:Vector3D):void
| BitmapDataZone | () | constructor |
public function BitmapDataZone(bitmapData:BitmapData, corner:Vector3D, top:Vector3D, left:Vector3D)The constructor creates a BitmapDataZone 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 — The bitmapData object that defines the zone.
|
|
corner:Vector3D — The position for the top left corner of the bitmap data for the zone.
|
|
top:Vector3D — The top side of the zone from the corner. The length of the vector
indicates how long the side is.
|
|
left:Vector3D — 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.
Parametersp: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.