Package toxi.physics2d
Class VerletConstrainedSpring2D
java.lang.Object
toxi.physics2d.VerletSpring2D
toxi.physics2d.VerletConstrainedSpring2D
Implements a spring whose maximum relaxation distance at every time step can
be limited to achieve better (if physically incorrect) stability of the whole
spring system.
-
Field Summary
Modifier and TypeFieldDescriptionfloat
Maximum relaxation distance for either end of the spring in world units (by default unlimited until set by user)Fields inherited from class toxi.physics2d.VerletSpring2D
a, b
-
Constructor Summary
ConstructorDescriptionVerletConstrainedSpring2D
(VerletParticle2D a, VerletParticle2D b, float len, float str) VerletConstrainedSpring2D
(VerletParticle2D a, VerletParticle2D b, float len, float str, float limit) -
Method Summary
Methods inherited from class toxi.physics2d.VerletSpring2D
getRestLength, getStrength, lockA, lockB, setRestLength, setStrength
-
Field Details
-
limit
public float limitMaximum relaxation distance for either end of the spring in world units (by default unlimited until set by user)
-
-
Constructor Details
-
VerletConstrainedSpring2D
- Parameters:
a
-b
-len
-str
-
-
VerletConstrainedSpring2D
public VerletConstrainedSpring2D(VerletParticle2D a, VerletParticle2D b, float len, float str, float limit) - Parameters:
a
-b
-len
-str
-limit
-
-