ConeEquation Class
Cone equation. Works to keep the given body world vectors aligned, or tilted within a given angle from each other.
Constructor
ConeEquation
(
-
bodyA
-
bodyB
-
[options.axisA]
-
[options.axisB]
-
[options.angle]
-
[options.maxForce=1e6]
Item Index
Methods
Methods
addToWlambda
(
-
deltalambda
Add constraint velocity to the bodies.
Parameters:
-
deltalambda
Number
computeB
()
Number
Computes the RHS of the SPOOK equation
Returns:
Number:
computeGiMf
()
Number
Computes Ginv(M)f, where M is the mass matrix with diagonal blocks for each body, and f are the forces on the bodies.
Returns:
Number:
computeGiMGt
()
Number
Computes Ginv(M)G'
Returns:
Number:
computeGq
()
Number
Computes G*q, where q are the generalized body coordinates
Returns:
Number:
computeGW
()
Number
Computes G*W, where W are the body velocities
Returns:
Number:
computeGWlambda
()
Number
Computes G*Wlambda, where W are the body velocities
Returns:
Number:
computeInvC
(
Number
-
eps
Compute the denominator part of the SPOOK equation: C = Ginv(M)G' + eps
Parameters:
-
eps
Number
Returns:
Number:
setSpookParams
()
Recalculates a,b,eps.
Properties
a
Number
SPOOK parameter
angle
Number
The cone angle to keep
b
Number
SPOOK parameter
enabled
Boolean
Default: true
eps
Number
SPOOK parameter