Package | com.fileitup.fisixengine.particles |
Class | public class CircleParticle |
Inheritance | CircleParticle ![]() ![]() |
Subclasses | CircleParticleConveyor, Projectile, WheelParticle |
See also
Property | Defined by | ||
---|---|---|---|
![]() | accel : Vector
A vector which stores the current acceleration vector of the object
| Particle | |
![]() | active : Boolean = true Tells the engine whether or not to treat this object as a part of the simulation
This value may be changed at any time during the simulation | CollisionObject | |
![]() | bounce : Number = .5 The object's coefficient of reinstiturion.
| CollisionObject | |
![]() | collidable : Boolean = true Tells the engine whether or not to check collisions against this object
You may set this value at any time during the sumulation to turn collision detection on/off for this object
| CollisionObject | |
![]() | color : int = -1 The object's rendering color.
| CollisionObject | |
![]() | dynamicObjectCollisions : Boolean = false | CollisionObject | |
![]() | fixed : Boolean A fixed CollisionObject is never influenced by collisions
You may change this value at any time
| CollisionObject | |
![]() | friction : Number = 0 The object's coefficient of friction.
| CollisionObject | |
![]() | inheritAttributesOnAdd : Boolean = true | CollisionObject | |
![]() | inverseMass : Number Used for engine calculations.
| Particle | |
![]() | lastCollision : CollisionData
An internal object which stores the information of the object's last collision
| CollisionObject | |
![]() | magnetic : Boolean = true If true, the object is affected by magnets
| CollisionObject | |
![]() | mass : Number The mass of the object (between 0 - infinity)
| Particle | |
![]() | minX : Number Hold the dimensions of the object's bounding box.
| CollisionObject | |
![]() | name : String = "" | CollisionObject | |
![]() | old : Vector
A vector which stores the position of the object before the last integration in global space
| Particle | |
![]() | old2 : Vector
A vector representing the object's speed.
| Particle | |
![]() | parent : FisixObject
The parent of the object.
| CollisionObject | |
![]() | pos : Vector
A vector which stores the position of the object in global coordinates
| Particle | |
radius : Number | CircleParticle | ||
![]() | raycast : Boolean An internal property, used by the engine
| CollisionObject | |
![]() | traction : Number = 1 The object's traction.
| CollisionObject | |
![]() | type : String A string representing the type of object you are dealing with
| CollisionObject | |
![]() | velocity : Vector | Particle |
Method | Defined by | ||
---|---|---|---|
CircleParticle(x:Number, y:Number, rad:Number)
Creates an instance of a CircleParticle
| CircleParticle | ||
![]() |
aabbIntersection(obj:CollisionObject):Boolean
Returns whether or not this object's AABB is intersecting with the given object's AABB
| CollisionObject | |
![]() |
addVelocity(vel:Vector):void
Allows you to explicitly increase/decrease the velocity of the object.
| Particle | |
![]() |
applyForce(f:Vector, checkAA:Boolean = true):void
Applies a uniform force, moving the entire object.
| Particle | |
Applies a force at the given point on the rim of the circle
Unlike applyForce(), this method applies only the force perpendicular to the collision normal, which yields more accurate looking results.
| CircleParticle | ||
![]() |
clone():Object
| Particle | |
![]() |
dispose():void
| Particle | |
![]() |
distanceSquaredTo(d:Particle):Number
Calculates the distance squared to another Particle.
| Particle | |
![]() |
distanceTo(d:Particle):Number
Calculates the distance to another Particle
| Particle | |
![]() |
fireAfterCollision():void
| CollisionObject | |
![]() |
fireOnCollision():void
| CollisionObject | |
![]() |
fix(f:Boolean = true):void
Another way of setting the value 'fixed'.
| CollisionObject | |
![]() |
getDetectionMode():int
| CollisionObject | |
![]() |
getMaterial():String
The name of the current material applied to the object
| CollisionObject | |
![]() |
getNormalAngleAt(p:Vector):Number
| CollisionObject | |
Gets the tangent to the circle at the given global position
| CircleParticle | ||
![]() |
getReactionMode():int
| CollisionObject | |
![]() |
integrate(dt:Number = 1):void
Integrates the object.
| Particle | |
![]() |
isStatic():Boolean
Returns a value indicating whether or not this object was made static.
| CollisionObject | |
![]() |
makeStatic():void
Makes the object static.
| CollisionObject | |
![]() |
move(mX:Number, mY:Number):void
Similar to thrust, but does not change the object's velocity
| Particle | |
![]() |
moveTo(mX:Number, mY:Number, ease:Number = 1):void
| Particle | |
![]() |
onInit():void
Called after the object is initiated by a FisixObject to which it was added
| CollisionObject | |
![]() |
pointForce(point:Vector, force:Number):void
| Particle | |
Renders a primitive shape of the object to the given Graphics object.
| CircleParticle | ||
![]() |
renderBoundingBox(g:Graphics):void
Renders a rectangle representing the bounding box to the graphics object
| CollisionObject | |
![]() |
rotationalForce(deg:Number, center:Vector):void
Applies a force vector derived from the given angle value
| Particle | |
![]() |
rotationalThrust(deg:Number, center:Vector):void
Thrusts the object with a vector derived from the given angle value
| Particle | |
setDetectionMode(m:int):void
Sets the collision detection mode to be used by the object
| CircleParticle | ||
![]() |
setMaterial(mName:String):void
Sets the material of the object
This modifies the object's 'friction', 'bounce', 'color' and 'traction' properties.
| CollisionObject | |
![]() |
setPosition(tX:Number, tY:Number):void
Sets the position of the object in the given global position and resets it's acceleration and velocity.
| Particle | |
setRadius(r:Number):void
| CircleParticle | ||
![]() |
setReactionMode(m:int):void
Sets the collision reaction mode to be used by the object
| CollisionObject | |
![]() |
setVelocity(vel:Vector, checkAA:Boolean = true):void
Allows you to explicitly set the velocity of the object.
| Particle | |
solveBoundsCollisions(w:BoundingBox):void
Used to keep the object within the given rectangular boundaries.
| CircleParticle | ||
![]() |
solveReactions():void
| Particle | |
![]() |
thrust(tX:Number, tY:Number, checkAA:Boolean = true):void
Moves the object uniformly with the given x,y values and adds the values to its velocity.
| Particle | |
thrustPoint(tX:Number, tY:Number, p:Vector):void
Similar to applyForcePoint, but affects the object's position rather than its acceleration.
| CircleParticle | ||
![]() |
thrustTo(tX:Number, tY:Number, ease:Number = 1):void
Thrusts the object to the given position in global space
| Particle | |
![]() |
thrustVector(v:Vector):void
Same as thrust() but takes in a vector instead of an x and y value
| Particle | |
![]() |
unload():void
Removes the object from the engine and disposes of it.
| CollisionObject | |
updateBoundingBox():void
Updates the bounding box of the object.
| CircleParticle |
radius | property |
public var radius:Number
CircleParticle | () | constructor |
public function CircleParticle(x:Number, y:Number, rad:Number)
Creates an instance of a CircleParticle
Parametersx:Number — Global starting x position of the particle.
|
|
y:Number — Global starting y position of the particle.
|
|
rad:Number — The radius of the circle.
|
applyForcePoint | () | method |
public override function applyForcePoint(force:Vector, p:Vector):void
Applies a force at the given point on the rim of the circle Unlike applyForce(), this method applies only the force perpendicular to the collision normal, which yields more accurate looking results.
Parametersforce:Vector — A vector representing the force to apply.
|
|
p:Vector — position in global space, which should lie on the rim of the circle. It will still work if it doesn't, but may yield weird results.
|
getNormalAt | () | method |
public override function getNormalAt(p:Vector, dirVector:Vector = null):Vector
Gets the tangent to the circle at the given global position
Parametersp:Vector — The global position in space from which to find the tangent.
|
|
dirVector:Vector (default = null ) — used only by internal engine methods, and should not be supplied.
|
Vector |
render | () | method |
public override function render(g:Graphics):void
Renders a primitive shape of the object to the given Graphics object. Usually this method is automatically invoked by the engine, but you may use it to render individual objects.
Parametersg:Graphics |
setDetectionMode | () | method |
public override function setDetectionMode(m:int):void
Sets the collision detection mode to be used by the object
Parametersm:int — an integer representing the collision detection mode.Use the DetectionModes class's constants as a value |
setRadius | () | method |
public function setRadius(r:Number):void
Parameters
r:Number |
solveBoundsCollisions | () | method |
public override function solveBoundsCollisions(w:BoundingBox):void
Used to keep the object within the given rectangular boundaries. This is an internal method that shouldn't be called manually.
Parametersw:BoundingBox |
thrustPoint | () | method |
public override function thrustPoint(tX:Number, tY:Number, p:Vector):void
Similar to applyForcePoint, but affects the object's position rather than its acceleration. This can be used for impulses, but may cause penetration with other objects, while applyForcePoint() shouldn't.
ParameterstX:Number — The thrust's x-component
|
|
tY:Number — The thrust's y-component
|
|
p:Vector — A point in global space at which the thrust will be applied. The point should lie on the rim of the circle.
|
See also
updateBoundingBox | () | method |
public override function updateBoundingBox():void
Updates the bounding box of the object. This is an internal methods that is called many times a frame. Calling it manually won't do much.