| Package | flare.physics |
| Class | public class Particle |
| Property | Defined by | ||
|---|---|---|---|
| age : Number The age of the particle in simulation ticks.
| Particle | ||
| degree : Number The number of springs (degree) attached to this particle.
| Particle | ||
| die : Boolean Flag indicating that the particle is scheduled for removal.
| Particle | ||
| fixed : Boolean Flag indicating if the particule should have a fixed position.
| Particle | ||
| fx : Number The x force exerted on the particle.
| Particle | ||
| fy : Number The y force exerted on the particle.
| Particle | ||
| mass : Number The mass (or charge) of the particle.
| Particle | ||
| tag : uint Tag property for storing an arbitrary value.
| Particle | ||
| _vx : Number A temporary x velocity variable.
| Particle | ||
| vx : Number The x velocity of the particle.
| Particle | ||
| _vy : Number A temporary y velocity variable.
| Particle | ||
| vy : Number The y velocity of the particle.
| Particle | ||
| x : Number The x position of the particle.
| Particle | ||
| y : Number The y position of the particle.
| Particle | ||
| Method | Defined by | ||
|---|---|---|---|
|
Particle(mass:Number = 1, x:Number = 0, y:Number = 0, vx:Number = 0, vy:Number = 0, fixed:Boolean = false)
Creates a new Particle with given parameters.
| Particle | ||
|
init(mass:Number = 1, x:Number = 0, y:Number = 0, vx:Number = 0, vy:Number = 0, fixed:Boolean = false):void
Initializes an existing particle instance.
| Particle | ||
|
kill():void
"Kills" this particle, scheduling it for removal in the next
simulation cycle.
| Particle | ||
| age | property |
public var age:NumberThe age of the particle in simulation ticks.
| degree | property |
public var degree:NumberThe number of springs (degree) attached to this particle.
| die | property |
public var die:BooleanFlag indicating that the particle is scheduled for removal.
| fixed | property |
public var fixed:BooleanFlag indicating if the particule should have a fixed position.
| fx | property |
public var fx:NumberThe x force exerted on the particle.
| fy | property |
public var fy:NumberThe y force exerted on the particle.
| mass | property |
public var mass:NumberThe mass (or charge) of the particle.
| tag | property |
public var tag:uintTag property for storing an arbitrary value.
| _vx | property |
public var _vx:NumberA temporary x velocity variable.
| vx | property |
public var vx:NumberThe x velocity of the particle.
| _vy | property |
public var _vy:NumberA temporary y velocity variable.
| vy | property |
public var vy:NumberThe y velocity of the particle.
| x | property |
public var x:NumberThe x position of the particle.
| y | property |
public var y:NumberThe y position of the particle.
| Particle | () | constructor |
public function Particle(mass:Number = 1, x:Number = 0, y:Number = 0, vx:Number = 0, vy:Number = 0, fixed:Boolean = false)Creates a new Particle with given parameters.
Parametersmass:Number (default = 1) — the mass (or charge) of the particle
|
|
x:Number (default = 0) — the x position of the particle
|
|
y:Number (default = 0) — the y position of the particle
|
|
vx:Number (default = 0) — the x velocity of the particle
|
|
vy:Number (default = 0) — the y velocity of the particle
|
|
fixed:Boolean (default = false) — flag indicating if the particle should have a
fixed position
|
| init | () | method |
public function init(mass:Number = 1, x:Number = 0, y:Number = 0, vx:Number = 0, vy:Number = 0, fixed:Boolean = false):voidInitializes an existing particle instance.
Parametersmass:Number (default = 1) — the mass (or charge) of the particle
|
|
x:Number (default = 0) — the x position of the particle
|
|
y:Number (default = 0) — the y position of the particle
|
|
vx:Number (default = 0) — the x velocity of the particle
|
|
vy:Number (default = 0) — the y velocity of the particle
|
|
fixed:Boolean (default = false) — flag indicating if the particle should have a
fixed position
|
| kill | () | method |
public function kill():void"Kills" this particle, scheduling it for removal in the next simulation cycle.