Packageorg.flintparticles.threeD.zones
Classpublic class BitmapDataZone
ImplementsZone3D

The BitmapData zone defines a shaped zone based on a BitmapData object. The zone contains all pixels in the bitmap that are not transparent - i.e. they have an alpha value greater than zero.



Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined by
  
BitmapDataZone(bitmapData:BitmapData, corner:Vector3D, top:Vector3D, left:Vector3D)
The constructor creates a BitmapDataZone zone.
BitmapDataZone
  
contains(p:Vector3D):Boolean
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
Property detail
bitmapDataproperty
bitmapData:BitmapData  [read-write]

The bitmapData object that defines the zone.

Implementation
    public function get bitmapData():BitmapData
    public function set bitmapData(value:BitmapData):void
cornerproperty 
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
leftproperty 
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
topproperty 
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
Constructor detail
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.

Parameters
bitmapData: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.
Method detail
contains()method
public function contains(p:Vector3D):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
p:Vector3D — The x coordinate of the location to test for.

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

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
Vector3D — a random point inside the zone.
getVolume()method 
public function getVolume():Number

The 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.

Returns
Number — a random point inside the zone.
invalidate()method 
public function invalidate():void

This 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.