Packageorg.MARS.dynamics.element
Interfacepublic interface IBody extends ISimulatable
ImplementorsRigidBody, Robot

Defines all necessary methods for PhysicsEngine to simulate a body.

See also

RigidBody
Shape
ISimulatable


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
 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
  shape : Shape
[read-only] Gets the shape of the body
IBody
 Inheritedvelocity : Vector
Gets the velocity as a Vector- note that this is read-only
ISimulatable
 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
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
shapeproperty 
shape:Shape  [read-only]

Gets the shape of the body

Implementation
    public function get shape():Shape
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