Packageorg.generalrelativity.foam.dynamics.element
Interfacepublic interface ISimulatable
SubinterfacesIBody
ImplementorsRigidBody, SimpleParticle



Public Properties
 PropertyDefined by
  collisionTypeID : String
[read-only] Gets the collision type id used to map element to an appropriate collision detector
ISimulatable
  elasticity : Number
Gets the elasticity of the element (bounciness- used in collision reaction)
ISimulatable
  force : Vector
[read-only] Gets the sum of all forces currently accumulated on the element
ISimulatable
  friction : Number
Gets the frictional coefficient of the element (used in collision response)
ISimulatable
  inverseMass : Number
[read-only] Gets the element's inverse mass
ISimulatable
  mass : Number
Gets the element's mass
ISimulatable
  position : Vector
[read-only] Gets the position as a Vector- note that this is read-only
ISimulatable
  velocity : Vector
[read-only] Gets the velocity as a Vector- note that this is read-only
ISimulatable
  vx : Number
Gets the horizontal velocity
ISimulatable
  vy : Number
Gets the vertical velocity
ISimulatable
  x : Number
Gets x positon
ISimulatable
  y : Number
Gets the y position
ISimulatable
Public Methods
 MethodDefined by
  
Accumulates forces from all IForceGenerators
ISimulatable
  
addForce(force:Vector):void
Adds a force to the element (Acceleration = Force / Mass)
ISimulatable
  
Adds an IForceGenerator to the element
ISimulatable
  
clearForces():void
Clears the force accumulation
ISimulatable
  
Removes an IForceGenerator from the element
ISimulatable
Property detail
collisionTypeIDproperty
collisionTypeID:String  [read-only]

Gets the collision type id used to map element to an appropriate collision detector

Implementation
    public function get collisionTypeID():String
elasticityproperty 
elasticity:Number  [read-write]

Gets the elasticity of the element (bounciness- used in collision reaction)

Implementation
    public function get elasticity():Number
    public function set elasticity(value:Number):void
forceproperty 
force:Vector  [read-only]

Gets the sum of all forces currently accumulated on the element

Implementation
    public function get force():Vector
frictionproperty 
friction:Number  [read-write]

Gets the frictional coefficient of the element (used in collision response)

Implementation
    public function get friction():Number
    public function set friction(value:Number):void
inverseMassproperty 
inverseMass:Number  [read-only]

Gets the element's inverse mass

Implementation
    public function get inverseMass():Number
massproperty 
mass:Number  [read-write]

Gets the element's mass

Implementation
    public function get mass():Number
    public function set mass(value:Number):void
positionproperty 
position:Vector  [read-only]

Gets the position as a Vector- note that this is read-only

Implementation
    public function get position():Vector
velocityproperty 
velocity:Vector  [read-only]

Gets the velocity as a Vector- note that this is read-only

Implementation
    public function get velocity():Vector
vxproperty 
vx:Number  [read-write]

Gets the horizontal velocity

Implementation
    public function get vx():Number
    public function set vx(value:Number):void
vyproperty 
vy:Number  [read-write]

Gets the vertical velocity

Implementation
    public function get vy():Number
    public function set vy(value:Number):void
xproperty 
x:Number  [read-write]

Gets x positon

Implementation
    public function get x():Number
    public function set x(value:Number):void
yproperty 
y:Number  [read-write]

Gets the y position

Implementation
    public function get y():Number
    public function set y(value:Number):void
Method detail
accumulateForces()method
public function accumulateForces():void

Accumulates forces from all IForceGenerators

addForce()method 
public function addForce(force:Vector):void

Adds a force to the element (Acceleration = Force / Mass)

Parameters
force:Vector
addForceGenerator()method 
public function addForceGenerator(generator:IForceGenerator):void

Adds an IForceGenerator to the element

Parameters
generator:IForceGenerator
clearForces()method 
public function clearForces():void

Clears the force accumulation

removeForceGenerator()method 
public function removeForceGenerator(generator:IForceGenerator):void

Removes an IForceGenerator from the element

Parameters
generator:IForceGenerator