Packageorg.generalrelativity.foam.dynamics.element
Interfacepublic interface IBody extends ISimulatable
ImplementorsRigidBody



Public Properties
 PropertyDefined by
  av : Number
Gets the angular velocity of the body
IBody
 InheritedcollisionTypeID : String
Gets the collision type id used to map element to an appropriate collision detector
ISimulatable
  edges : Array
[read-only] Gets all edges associated with the body
IBody
 Inheritedelasticity : Number
Gets the elasticity of the element (bounciness- used in collision reaction)
ISimulatable
 Inheritedforce : Vector
Gets the sum of all forces currently accumulated on the element
ISimulatable
 Inheritedfriction : Number
Gets the frictional coefficient of the element (used in collision response)
ISimulatable
  I : Number
[read-only] Gets the inertia tensor of the body (rotational equivalent to mass)
IBody
  inverseI : Number
[read-only] Gets the inverse inertia tensor of the body
IBody
 InheritedinverseMass : Number
Gets the element's inverse mass
ISimulatable
 Inheritedmass : Number
Gets the element's mass
ISimulatable
 Inheritedposition : Vector
Gets the position as a Vector- note that this is read-only
ISimulatable
  q : Number
Gets the rotation (in radians) of the body
IBody
  rotation : RotationMatrix
[read-only] Gets the rotation matrix of the body (used to transform its geometry)
IBody
 Inheritedvelocity : Vector
Gets the velocity as a Vector- note that this is read-only
ISimulatable
  vertices : Array
[read-only] Gets all vertices associated with the body
IBody
 Inheritedvx : Number
Gets the horizontal velocity
ISimulatable
 Inheritedvy : Number
Gets the vertical velocity
ISimulatable
 Inheritedx : Number
Gets x positon
ISimulatable
 Inheritedy : Number
Gets the y position
ISimulatable
Public Methods
 MethodDefined by
 Inherited
Accumulates forces from all IForceGenerators
ISimulatable
 Inherited
addForce(force:Vector):void
Adds a force to the element (Acceleration = Force / Mass)
ISimulatable
  
addForceAtPoint(point:Vector, force:Vector):void
Adds force at a specific point on the body (affects linear and (possibly) angular momentum)
IBody
 Inherited
Adds an IForceGenerator to the element
ISimulatable
  
addTorque(torque:Number):void
Adds torque to the body
IBody
 Inherited
clearForces():void
Clears the force accumulation
ISimulatable
  
clearTorque():void
Clears all torque
IBody
  
Gets the velocity at the given point
IBody
 Inherited
Removes an IForceGenerator from the element
ISimulatable
Property detail
avproperty
av:Number  [read-write]

Gets the angular velocity of the body

Implementation
    public function get av():Number
    public function set av(value:Number):void
edgesproperty 
edges:Array  [read-only]

Gets all edges associated with the body

Implementation
    public function get edges():Array
Iproperty 
I:Number  [read-only]

Gets the inertia tensor of the body (rotational equivalent to mass)

Implementation
    public function get I():Number
inverseIproperty 
inverseI:Number  [read-only]

Gets the inverse inertia tensor of the body

Implementation
    public function get inverseI():Number
qproperty 
q:Number  [read-write]

Gets the rotation (in radians) of the body

Implementation
    public function get q():Number
    public function set q(value:Number):void
rotationproperty 
rotation:RotationMatrix  [read-only]

Gets the rotation matrix of the body (used to transform its geometry)

Implementation
    public function get rotation():RotationMatrix
verticesproperty 
vertices:Array  [read-only]

Gets all vertices associated with the body

Implementation
    public function get vertices():Array
Method detail
addForceAtPoint()method
public function addForceAtPoint(point:Vector, force:Vector):void

Adds force at a specific point on the body (affects linear and (possibly) angular momentum)

Parameters
point:Vector
 
force:Vector
addTorque()method 
public function addTorque(torque:Number):void

Adds torque to the body

Parameters
torque:Number
clearTorque()method 
public function clearTorque():void

Clears all torque

getVelocityAtPoint()method 
public function getVelocityAtPoint(point:Vector):Vector

Gets the velocity at the given point

Parameters
point:Vector

Returns
Vector