| Package | org.generalrelativity.foam.dynamics.element |
| Interface | public interface IBody extends ISimulatable |
| Implementors | RigidBody |
| Property | Defined by | ||
|---|---|---|---|
| av : Number Gets the angular velocity of the body
| IBody | ||
![]() | collisionTypeID : 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 | ||
![]() | elasticity : Number Gets the elasticity of the element (bounciness- used in collision reaction)
| ISimulatable | |
![]() | force : Vector
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 | |
| 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 | ||
![]() | inverseMass : Number Gets the element's inverse mass
| ISimulatable | |
![]() | mass : Number Gets the element's mass
| ISimulatable | |
![]() | position : 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 | ||
![]() | velocity : 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 | ||
![]() | 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 | |
| Method | Defined by | ||
|---|---|---|---|
![]() |
accumulateForces():void
Accumulates forces from all IForceGenerators
| ISimulatable | |
![]() |
Adds a force to the element (Acceleration = Force / Mass)
| ISimulatable | |
|
Adds force at a specific point on the body (affects linear and (possibly) angular momentum)
| IBody | ||
![]() |
addForceGenerator(generator:IForceGenerator):void
Adds an IForceGenerator to the element
| ISimulatable | |
|
addTorque(torque:Number):void
Adds torque to the body
| IBody | ||
![]() |
clearForces():void
Clears the force accumulation
| ISimulatable | |
|
clearTorque():void
Clears all torque
| IBody | ||
|
Gets the velocity at the given point
| IBody | ||
![]() |
removeForceGenerator(generator:IForceGenerator):void
Removes an IForceGenerator from the element
| ISimulatable | |
| av | property |
av:Number [read-write]Gets the angular velocity of the body
Implementation public function get av():Number
public function set av(value:Number):void
| edges | property |
edges:Array [read-only]Gets all edges associated with the body
Implementation public function get edges():Array
| I | property |
I:Number [read-only]Gets the inertia tensor of the body (rotational equivalent to mass)
Implementation public function get I():Number
| inverseI | property |
inverseI:Number [read-only]Gets the inverse inertia tensor of the body
Implementation public function get inverseI():Number
| q | property |
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
| rotation | property |
rotation:RotationMatrix [read-only]Gets the rotation matrix of the body (used to transform its geometry)
Implementation public function get rotation():RotationMatrix
| vertices | property |
vertices:Array [read-only]Gets all vertices associated with the body
Implementation public function get vertices():Array
| addForceAtPoint | () | method |
public function addForceAtPoint(point:Vector, force:Vector):voidAdds force at a specific point on the body (affects linear and (possibly) angular momentum)
Parameterspoint:Vector |
|
force:Vector |
| addTorque | () | method |
public function addTorque(torque:Number):voidAdds torque to the body
Parameterstorque:Number |
| clearTorque | () | method |
public function clearTorque():voidClears all torque
| getVelocityAtPoint | () | method |
public function getVelocityAtPoint(point:Vector):VectorGets the velocity at the given point
Parameterspoint:Vector |
Vector |