Packageorg.cove.ape
Classpublic class CircleParticle
InheritanceCircleParticle Inheritance AbstractParticle Inheritance AbstractItem
SubclassesWheelParticle

A circle shaped particle.



Public Properties
 PropertyDefined by
 InheritedalwaysRepaint : Boolean
For performance, fixed Particles and SpringConstraints don't have their paint() method called in order to avoid unnecessary redrawing.
AbstractItem
 Inheritedcenter : Vector
Returns A Vector of the current location of the particle
AbstractParticle
 Inheritedcollidable : Boolean
Determines if the particle can collide with other particles or constraints.
AbstractParticle
 Inheritedelasticity : Number
The elasticity of the particle.
AbstractParticle
 Inheritedfixed : Boolean
The fixed state of the particle.
AbstractParticle
 Inheritedfriction : Number
The surface friction of the particle.
AbstractParticle
 Inheritedmass : Number
The mass of the particle.
AbstractParticle
 Inheritedmultisample : int
Determines the number of intermediate position steps checked for collision each cycle.
AbstractParticle
 Inheritedposition : Vector
The position of the particle.
AbstractParticle
 Inheritedpx : Number
The x position of this particle
AbstractParticle
 Inheritedpy : Number
The y position of this particle
AbstractParticle
  radius : Number
The radius of the particle.
CircleParticle
 Inheritedsprite : Sprite
Provides a Sprite to use as a container for drawing or adding children.
AbstractItem
 Inheritedvelocity : Vector
The velocity of the particle.
AbstractParticle
 Inheritedvisible : Boolean
The visibility of the item.
AbstractItem
Public Methods
 MethodDefined by
  
CircleParticle(x:Number, y:Number, radius:Number, fixed:Boolean = false, mass:Number = 1, elasticity:Number = 0.3, friction:Number = 0)
CircleParticle
 Inherited
addForce(f:Vector):void
Adds a force to the particle.
AbstractParticle
 Inherited
Adds a 'massless' force to the particle.
AbstractParticle
 Inherited
cleanup():void
This method is called automatically when an item's parent group is removed from the APEngine.
AbstractItem
  
init():void
Sets up the visual representation of this CircleParticle.
CircleParticle
  
paint():void
The default painting method for this particle.
CircleParticle
 Inherited
setDisplay(d:DisplayObject, offsetX:Number = 0, offsetY:Number = 0, rotation:Number = 0):void
Assigns a DisplayObject to be used when painting this particle.
AbstractParticle
 Inherited
setFill(color:uint = 0xffffff, alpha:Number = 1):void
Sets the style of the fill for this Item.
AbstractItem
 Inherited
setLine(thickness:Number = 0, color:uint = 0x000000, alpha:Number = 1):void
Sets the style of the line for this Item.
AbstractItem
 Inherited
setStyle(lineThickness:Number = 0, lineColor:uint = 0x000000, lineAlpha:Number = 1, fillColor:uint = 0xffffff, fillAlpha:Number = 1):void
Sets the line and fill of this Item.
AbstractItem
 Inherited
update(dt2:Number):void
The update() method is called automatically during the APEngine.step() cycle.
AbstractParticle
Property detail
radiusproperty
radius:Number  [read-write]

The radius of the particle.

Implementation
    public function get radius():Number
    public function set radius(value:Number):void
Constructor detail
CircleParticle()constructor
public function CircleParticle(x:Number, y:Number, radius:Number, fixed:Boolean = false, mass:Number = 1, elasticity:Number = 0.3, friction:Number = 0)

Parameters
x:Number — The initial x position of this particle.
 
y:Number — The initial y position of this particle.
 
radius:Number — The radius of this particle.
 
fixed:Boolean (default = false) — Determines if the particle is fixed or not. Fixed particles are not affected by forces or collisions and are good to use as surfaces. Non-fixed particles move freely in response to collision and forces.
 
mass:Number (default = 1) — The mass of the particle.
 
elasticity:Number (default = 0.3) — The elasticity of the particle. Higher values mean more elasticity or 'bounciness'.
 
friction:Number (default = 0) — The surface friction of the particle.
Method detail
init()method
public override function init():void

Sets up the visual representation of this CircleParticle. This method is called automatically when an instance of this CircleParticle's parent Group is added to the APEngine, when this CircleParticle's Composite is added to a Group, or the CircleParticle is added to a Composite or Group.

paint()method 
public override function paint():void

The default painting method for this particle. This method is called automatically by the APEngine.paint() method. If you want to define your own custom painting method, then create a subclass of this class and override paint().