net.java.dev.joode.stepper
Class QuickStepper
java.lang.Object
net.java.dev.joode.stepper.AbstractStepperFunction
net.java.dev.joode.stepper.QuickStepper
- All Implemented Interfaces:
- StepperFunction
public class QuickStepper
- extends AbstractStepperFunction
|
Method Summary |
void |
SOR_LCP(int m,
Matrix J,
int[][] jb,
Body[] body,
Matrix3[] invI,
float[] lambda,
float[][] fc,
float[] b,
float[] lo,
float[] hi,
float[] cfm,
int[] findex)
SOR-LCP method
note: fc is returned as inv(M)*J'*lambda, the constraint force is
actually J'*lambda |
void |
stepConstraints(int m,
World world,
Body[] body,
int bcount,
Joint[] joint,
int jcount,
Joint.Info1[] info,
int[] ofs,
Matrix3[] invI,
float stepsize)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final QuickStepper INSTANCE
WARM_STARTING
public static final boolean WARM_STARTING
- for the SOR and CG methods: uncomment the following line to use warm
starting. this definitely help for motor-driven joints. unfortunately it
appears to hurt with high-friction contacts using the SOR method. use
with care
- See Also:
- Constant Field Values
REORDER_CONSTRAINTS
public static final boolean REORDER_CONSTRAINTS
- for the SOR method: uncomment the following line to determine a new
constraint-solving order for each iteration. however, the qsort per
iteration is expensive, and the optimal order is somewhat problem
dependent.
- See Also:
- Constant Field Values
RANDOMLY_REORDER_CONSTRAINTS
public static final boolean RANDOMLY_REORDER_CONSTRAINTS
- for the SOR method: uncomment the following line to randomly reorder
constraint rows during the solution. depending on the situation, this can
help a lot or hardly at all, but it doesn't seem to hurt.
- See Also:
- Constant Field Values
rnd
public static final java.util.Random rnd
qsp
public final QuickStepParameters qsp
QuickStepper
public QuickStepper()
stepConstraints
public void stepConstraints(int m,
World world,
Body[] body,
int bcount,
Joint[] joint,
int jcount,
Joint.Info1[] info,
int[] ofs,
Matrix3[] invI,
float stepsize)
- Specified by:
stepConstraints in class AbstractStepperFunction
SOR_LCP
public void SOR_LCP(int m,
Matrix J,
int[][] jb,
Body[] body,
Matrix3[] invI,
float[] lambda,
float[][] fc,
float[] b,
float[] lo,
float[] hi,
float[] cfm,
int[] findex)
- SOR-LCP method
note: fc is returned as inv(M)*J'*lambda, the constraint force is
actually J'*lambda
- Parameters:
m - number of constraintsJ - an m*12 matrix of constraint rowsjb - an array of first and second body numbers for each constraint
rowinvI - the global frame inverse inertia for each body (stacked 3x3
matrices)lambda - return valuesfc - returns the constraint forceb - lo - hi -