| Package | org.flintparticles.threeD.actions |
| Class | public class BoundingBox |
| Inheritance | BoundingBox ActionBase |
| Property | Defined by | ||
|---|---|---|---|
| bounce : Number
The coefficient of restitution when the particles bounce off the
sides of the box.
| BoundingBox | ||
| maxX : Number
The maxX coordinate of the box.
| BoundingBox | ||
| maxY : Number
The maxY coordinate of the box.
| BoundingBox | ||
| maxZ : Number
The maxZ coordinate of the box.
| BoundingBox | ||
| minX : Number
The minX coordinate of the box.
| BoundingBox | ||
| minY : Number
The minY coordinate of the box.
| BoundingBox | ||
| minZ : Number
The minZ coordinate of the box.
| BoundingBox | ||
| Method | Defined by | ||
|---|---|---|---|
|
BoundingBox(minX:Number, maxX:Number, minY:Number, maxY:Number, minZ:Number, maxZ:Number, bounce:Number = 1)
The constructor creates a BoundingBox action for use by an emitter.
| BoundingBox | ||
![]() |
addedToEmitter(emitter:Emitter):void
This method does nothing.
| ActionBase | |
|
getDefaultPriority():Number
Returns a value of -20, so that the BoundingBox executes after all movement has occured.
| BoundingBox | ||
![]() |
removedFromEmitter(emitter:Emitter):void
This method does nothing.
| ActionBase | |
|
Tests whether the particle is at the edge of the box and, if so,
adjusts its velocity to bounce in back towards the center of the
box.
| BoundingBox | ||
| bounce | property |
bounce:Number [read-write]The coefficient of restitution when the particles bounce off the sides of the box. A value of 1 gives a pure pure elastic collision, with no energy loss. A value between 0 and 1 causes the particle to loose enegy in the collision. A value greater than 1 causes the particle to gain energy in the collision.
Implementation public function get bounce():Number
public function set bounce(value:Number):void
| maxX | property |
maxX:Number [read-write]The maxX coordinate of the box.
Implementation public function get maxX():Number
public function set maxX(value:Number):void
| maxY | property |
maxY:Number [read-write]The maxY coordinate of the box.
Implementation public function get maxY():Number
public function set maxY(value:Number):void
| maxZ | property |
maxZ:Number [read-write]The maxZ coordinate of the box.
Implementation public function get maxZ():Number
public function set maxZ(value:Number):void
| minX | property |
minX:Number [read-write]The minX coordinate of the box.
Implementation public function get minX():Number
public function set minX(value:Number):void
| minY | property |
minY:Number [read-write]The minY coordinate of the box.
Implementation public function get minY():Number
public function set minY(value:Number):void
| minZ | property |
minZ:Number [read-write]The minZ coordinate of the box.
Implementation public function get minZ():Number
public function set minZ(value:Number):void
| BoundingBox | () | constructor |
public function BoundingBox(minX:Number, maxX:Number, minY:Number, maxY:Number, minZ:Number, maxZ:Number, bounce:Number = 1)The constructor creates a BoundingBox action for use by an emitter. To add a BoundingBox to all particles created by an emitter, use the emitter's addAction method.
ParametersminX:Number — The minX coordinate of the box.
|
|
maxX:Number — The maxX coordinate of the box.
|
|
minY:Number — The minY coordinate of the box.
|
|
maxY:Number — The maxY coordinate of the box.
|
|
minZ:Number — The minZ coordinate of the box.
|
|
maxZ:Number — The maxZ coordinate of the box.
|
|
bounce:Number (default = 1) — The coefficient of restitution when the particles bounce off the
sides of the box. A value of 1 gives a pure elastic collision, with no energy loss.
A value between 0 and 1 causes the particle to loose enegy in the collision. A value
greater than 1 causes the particle to gain energy in the collision.
|
See also
| getDefaultPriority | () | method |
public override function getDefaultPriority():NumberReturns a value of -20, so that the BoundingBox executes after all movement has occured.
ReturnsNumber |
See also
| update | () | method |
public override function update(emitter:Emitter, particle:Particle, time:Number):voidTests whether the particle is at the edge of the box and, if so, adjusts its velocity to bounce in back towards the center of the box.
This method is called by the emitter and need not be called by the user
Parametersemitter:Emitter — The Emitter that created the particle.
|
|
particle:Particle — The particle to be updated.
|
|
time:Number — The duration of the frame - used for time based updates.
|
See also