Packageorg.generalrelativity.foam.dynamics.force.spring
Classpublic class RigidBodyBungee
InheritanceRigidBodyBungee Inheritance RigidBodySpring Inheritance Spring Inheritance SimpleForceGenerator



Public Properties
 PropertyDefined by
 InheritedrestLength : Number
Spring
Protected Properties
 PropertyDefined by
 Inheriteddamp : Number
damping
Spring
 Inheritedelement1 : ISimulatable
element to generate spring force on
Spring
 Inheritedelement2 : ISimulatable
element to connect "other" end of spring to
Spring
 Inherited_force : Vector
force to apply to element(s)
SimpleForceGenerator
 Inheritedk : Number
spring coefficient (0 - 1.0)
Spring
 Inheritedpoint1 : Vector
RigidBodySpring
 Inheritedpoint2 : Vector
RigidBodySpring
 Inherited_restLength : Number
the spring's happy length (where no force is generated
Spring
Public Methods
 MethodDefined by
  
RigidBodyBungee(body1:IBody, point1:Vector, body2:IBody, point2:Vector, k:Number = 0.01, damp:Number = 0.01)
Creates a new RigidBodyBungee
RigidBodyBungee
  
clone(invert:Boolean = true):Spring
RigidBodyBungee
 Inherited
createDoubleSidedSpring(element1:ISimulatable, element2:ISimulatable, k:Number = 0.01, damp:Number = 0.1):void
[static] Creates forces for both elements
Spring
  
generate(element:ISimulatable):void
RigidBodyBungee
 Inherited
RigidBodySpring
 Inherited
RigidBodySpring
 Inherited
invert():void
Inverts the spring so that the force is applied to element2 instead of 1
Spring
Constructor detail
RigidBodyBungee()constructor
public function RigidBodyBungee(body1:IBody, point1:Vector, body2:IBody, point2:Vector, k:Number = 0.01, damp:Number = 0.01)

Creates a new RigidBodyBungee

Parameters
body1:IBody — first body involved in bungee
 
point1:Vector — point on body1 given in relative coordinates
 
body2:IBody — second body attached to bungee
 
point2:Vector — point on body2 given in relative coordinates
 
k:Number (default = 0.01) — spring constant
 
damp:Number (default = 0.01) — damping coefficient
Method detail
clone()method
public override function clone(invert:Boolean = true):SpringParameters
invert:Boolean (default = true)

Returns
Spring
generate()method 
public override function generate(element:ISimulatable):voidParameters
element:ISimulatable