| Package | org.generalrelativity.foam.dynamics.element.body |
| Class | public class CubicBezierCurve |
| Inheritance | CubicBezierCurve RigidBody SimpleParticle |
| Property | Defined by | ||
|---|---|---|---|
![]() | av : Number | RigidBody | |
| collisionTypeID : String [read-only]
| CubicBezierCurve | ||
![]() | edges : Array | RigidBody | |
![]() | elasticity : Number | SimpleParticle | |
![]() | force : Vector | SimpleParticle | |
![]() | friction : Number | SimpleParticle | |
![]() | I : Number | RigidBody | |
![]() | inverseI : Number | RigidBody | |
![]() | inverseMass : Number | SimpleParticle | |
| lines : Array | CubicBezierCurve | ||
![]() | mass : Number | SimpleParticle | |
![]() | position : Vector | SimpleParticle | |
![]() | q : Number | RigidBody | |
![]() | rotation : RotationMatrix
Gets the rotation matrix of the body
Because the creation of a rotation matrix involves 2 trigonometric function calls, it's worthwhile to do a check to see if we need to create a new rotation matrix. | RigidBody | |
![]() | state : Array
Gets the state of the differential equation
Consider a particle with position x and velocity v. | SimpleParticle | |
![]() | torque : Number | RigidBody | |
![]() | velocity : Vector | SimpleParticle | |
![]() | vertices : Array | RigidBody | |
![]() | vx : Number | SimpleParticle | |
![]() | vy : Number | SimpleParticle | |
![]() | x : Number
Note that these values that constitute this IODE's state use getters/setters
that access specific indices within _state.
| SimpleParticle | |
![]() | y : Number | SimpleParticle | |
| Property | Defined by | ||
|---|---|---|---|
| anchor1 : Vector | CubicBezierCurve | ||
| anchor2 : Vector | CubicBezierCurve | ||
| control1 : Vector | CubicBezierCurve | ||
| control2 : Vector | CubicBezierCurve | ||
![]() | _edges : Array body edges
| RigidBody | |
![]() | _elasticity : Number elastic coefficient of particle (used in collision response)
| SimpleParticle | |
![]() | _force : Vector
holds all accummulate forces
| SimpleParticle | |
![]() | _friction : Number frictional coefficient (used in collision response)
| SimpleParticle | |
![]() | _generators : Array holds all IForceGenerators affecting this particle
| SimpleParticle | |
| height : Number | CubicBezierCurve | ||
![]() | _I : Number inertia tensor
| RigidBody | |
![]() | _inverseI : Number inverse inertia tensor
| RigidBody | |
![]() | _inverseMass : Number holds the inverse mass- this is an optimization as multiplication is faster than division and we can calculate this offline
| SimpleParticle | |
![]() | _mass : Number holds the mass of the particle
| SimpleParticle | |
| resolution : int | CubicBezierCurve | ||
![]() | _rotation : RotationMatrix
rotation matrix of body
| RigidBody | |
![]() | _state : Array holds the state of the system
| SimpleParticle | |
![]() | _torque : Number torque accumulator
| RigidBody | |
![]() | _vertices : Array body vertices
| RigidBody | |
| Method | Defined by | ||
|---|---|---|---|
|
CubicBezierCurve(x:Number, y:Number, control1:Vector, anchor1:Vector, control2:Vector, anchor2:Vector, resolution:int = 7, mass:Number, vx:Number = 0, vy:Number = 0, q:Number = 0, av:Number = 0, friction:Number = 0.2, elasticity:Number = 0.15, height:Number = 150)
| CubicBezierCurve | ||
![]() |
accumulateForces():void
Accumulates forces
| SimpleParticle | |
![]() |
Adds a force to the particle
| SimpleParticle | |
![]() |
Adds a force at a specific point on the body
IF the point specified is not the center of mass (0,0), the force will induce a change in angular velocity as well as linear. | RigidBody | |
![]() |
addForceGenerator(generator:IForceGenerator):void
Adds a force generator to influence this particle
| SimpleParticle | |
![]() |
addTorque(torque:Number):void
Adds torque to the body
This is the rotational equivalent to adding a force | RigidBody | |
![]() |
clearForces():void
Clears all forces
| SimpleParticle | |
![]() |
clearTorque():void
Clears any accumulated torque
| RigidBody | |
![]() |
getDerivative(state:Array, derivative:Array):void
Gets the derivative of the body
Note that both the state and derivative are longer than in SimpleParticle. | RigidBody | |
![]() |
Gets the velocity of the body at a specified point
Note that this point is given in world-coordinates. | RigidBody | |
![]() |
removeForceGenerator(generator:IForceGenerator):void
Removes a force generator
| SimpleParticle | |
| Method | Defined by | ||
|---|---|---|---|
|
calculateInertiaTensor():void
| CubicBezierCurve | ||
|
createLines():void
| CubicBezierCurve | ||
| anchor1 | property |
protected var anchor1:Vector
| anchor2 | property |
protected var anchor2:Vector
| collisionTypeID | property |
collisionTypeID:String [read-only]Implementation
public function get collisionTypeID():String
| control1 | property |
protected var control1:Vector
| control2 | property |
protected var control2:Vector
| height | property |
protected var height:Number
| lines | property |
public var lines:Array
| resolution | property |
protected var resolution:int
| CubicBezierCurve | () | constructor |
public function CubicBezierCurve(x:Number, y:Number, control1:Vector, anchor1:Vector, control2:Vector, anchor2:Vector, resolution:int = 7, mass:Number, vx:Number = 0, vy:Number = 0, q:Number = 0, av:Number = 0, friction:Number = 0.2, elasticity:Number = 0.15, height:Number = 150)Parameters
x:Number |
|
y:Number |
|
control1:Vector |
|
anchor1:Vector |
|
control2:Vector |
|
anchor2:Vector |
|
resolution:int (default = 7) |
|
mass:Number |
|
vx:Number (default = 0) |
|
vy:Number (default = 0) |
|
q:Number (default = 0) |
|
av:Number (default = 0) |
|
friction:Number (default = 0.2) |
|
elasticity:Number (default = 0.15) |
|
height:Number (default = 150) |
| calculateInertiaTensor | () | method |
protected override function calculateInertiaTensor():void
| createLines | () | method |
protected function createLines():void