| Package | org.flintparticles.threeD.actions |
| Class | public class BoundingBox |
| Inheritance | BoundingBox ActionBase Object |
| 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 | ||
![]() | priority : int
Returns a default priority of 0 for this action. | ActionBase | |
| Method | Defined By | ||
|---|---|---|---|
BoundingBox(minX:Number = 0, maxX:Number = 0, minY:Number = 0, maxY:Number = 0, minZ:Number = 0, maxZ:Number = 0, bounce:Number = 1)
The constructor creates a BoundingBox action for use by an emitter. | BoundingBox | ||
![]() | addedToEmitter(emitter:Emitter):void
This method does nothing. | ActionBase | |
![]() | removedFromEmitter(emitter:Emitter):void
This method does nothing. | ActionBase | |
[override]
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:NumberThe 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.
public function get bounce():Number public function set bounce(value:Number):void| maxX | property |
maxX:NumberThe maxX coordinate of the box.
public function get maxX():Number public function set maxX(value:Number):void| maxY | property |
maxY:NumberThe maxY coordinate of the box.
public function get maxY():Number public function set maxY(value:Number):void| maxZ | property |
maxZ:NumberThe maxZ coordinate of the box.
public function get maxZ():Number public function set maxZ(value:Number):void| minX | property |
minX:NumberThe minX coordinate of the box.
public function get minX():Number public function set minX(value:Number):void| minY | property |
minY:NumberThe minY coordinate of the box.
public function get minY():Number public function set minY(value:Number):void| minZ | property |
minZ:NumberThe minZ coordinate of the box.
public function get minZ():Number public function set minZ(value:Number):void| BoundingBox | () | Constructor |
public function BoundingBox(minX:Number = 0, maxX:Number = 0, minY:Number = 0, maxY:Number = 0, minZ:Number = 0, maxZ:Number = 0, 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 (default = 0) — The minX coordinate of the box.
| |
maxX:Number (default = 0) — The maxX coordinate of the box.
| |
minY:Number (default = 0) — The minY coordinate of the box.
| |
maxY:Number (default = 0) — The maxY coordinate of the box.
| |
minZ:Number (default = 0) — The minZ coordinate of the box.
| |
maxZ:Number (default = 0) — 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
| update | () | method |
override public 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
Parameters
emitter: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