Packageorg.generalrelativity.foam.dynamics.element.body
Classpublic class CubicBezierCurve
InheritanceCubicBezierCurve Inheritance RigidBody Inheritance SimpleParticle



Public Properties
 PropertyDefined by
 Inheritedav : Number
RigidBody
  collisionTypeID : String
[read-only]
CubicBezierCurve
 Inheritededges : Array
RigidBody
 Inheritedelasticity : Number
SimpleParticle
 Inheritedforce : Vector
SimpleParticle
 Inheritedfriction : Number
SimpleParticle
 InheritedI : Number
RigidBody
 InheritedinverseI : Number
RigidBody
 InheritedinverseMass : Number
SimpleParticle
  lines : Array
CubicBezierCurve
 Inheritedmass : Number
SimpleParticle
 Inheritedposition : Vector
SimpleParticle
 Inheritedq : Number
RigidBody
 Inheritedrotation : 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
 Inheritedstate : Array
Gets the state of the differential equation

Consider a particle with position x and velocity v.

SimpleParticle
 Inheritedtorque : Number
RigidBody
 Inheritedvelocity : Vector
SimpleParticle
 Inheritedvertices : Array
RigidBody
 Inheritedvx : Number
SimpleParticle
 Inheritedvy : Number
SimpleParticle
 Inheritedx : Number
Note that these values that constitute this IODE's state use getters/setters that access specific indices within _state.
SimpleParticle
 Inheritedy : Number
SimpleParticle
Protected Properties
 PropertyDefined by
  anchor1 : Vector
CubicBezierCurve
  anchor2 : Vector
CubicBezierCurve
  control1 : Vector
CubicBezierCurve
  control2 : Vector
CubicBezierCurve
 Inherited_edges : Array
body edges
RigidBody
 Inherited_elasticity : Number
elastic coefficient of particle (used in collision response)
SimpleParticle
 Inherited_force : Vector
holds all accummulate forces
SimpleParticle
 Inherited_friction : Number
frictional coefficient (used in collision response)
SimpleParticle
 Inherited_generators : Array
holds all IForceGenerators affecting this particle
SimpleParticle
  height : Number
CubicBezierCurve
 Inherited_I : Number
inertia tensor
RigidBody
 Inherited_inverseI : Number
inverse inertia tensor
RigidBody
 Inherited_inverseMass : Number
holds the inverse mass- this is an optimization as multiplication is faster than division and we can calculate this offline
SimpleParticle
 Inherited_mass : Number
holds the mass of the particle
SimpleParticle
  resolution : int
CubicBezierCurve
 Inherited_rotation : RotationMatrix
rotation matrix of body
RigidBody
 Inherited_state : Array
holds the state of the system
SimpleParticle
 Inherited_torque : Number
torque accumulator
RigidBody
 Inherited_vertices : Array
body vertices
RigidBody
Public Methods
 MethodDefined 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
 Inherited
Accumulates forces
SimpleParticle
 Inherited
addForce(force:Vector):void
Adds a force to the particle
SimpleParticle
 Inherited
addForceAtPoint(point:Vector, force:Vector):void
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
 Inherited
Adds a force generator to influence this particle
SimpleParticle
 Inherited
addTorque(torque:Number):void
Adds torque to the body

This is the rotational equivalent to adding a force

RigidBody
 Inherited
clearForces():void
Clears all forces
SimpleParticle
 Inherited
clearTorque():void
Clears any accumulated torque
RigidBody
 Inherited
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
 Inherited
Gets the velocity of the body at a specified point

Note that this point is given in world-coordinates.

RigidBody
 Inherited
Removes a force generator
SimpleParticle
Protected Methods
 MethodDefined by
  
CubicBezierCurve
  
createLines():void
CubicBezierCurve
Property detail
anchor1property
protected var anchor1:Vector
anchor2property 
protected var anchor2:Vector
collisionTypeIDproperty 
collisionTypeID:String  [read-only]Implementation
    public function get collisionTypeID():String
control1property 
protected var control1:Vector
control2property 
protected var control2:Vector
heightproperty 
protected var height:Number
linesproperty 
public var lines:Array
resolutionproperty 
protected var resolution:int
Constructor detail
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)
Method detail
calculateInertiaTensor()method
protected override function calculateInertiaTensor():void
createLines()method 
protected function createLines():void