|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.java.dev.joode.stepper.BodyVariables
public class BodyVariables
provides a container class for mutable variables of bodies during a step application. The class is provided so that variables can be stored and rolled back during a multi step function (such as midpoint method, and Range-Kutter)
| Field Summary | |
|---|---|
Vector3 |
avel
|
static Body |
bodyTmp
we need to use a real body to perform the angular updates becuase the body might contains some optimizations (held in flags) luckily we do not have to worry about mass though |
Vector3 |
facc
|
Vector3 |
lvel
|
Vector3 |
pos
|
Quaternion |
q
|
Matrix3 |
r
|
Vector3 |
tacc
|
| Constructor Summary | |
|---|---|
BodyVariables()
|
|
| Method Summary | |
|---|---|
static void |
apply(BodyVariables[] variables,
RealPointer acceleration,
float stepsize)
applies the acceleration information to a list of body variables to update them, like a normal Euler step |
static BodyVariables[] |
aquireBodyVariableList(int size)
retrieves a whole array of instanciated body variables, from a pool |
static boolean |
equals(BodyVariables[] a,
BodyVariables[] b)
|
static boolean |
equals(BodyVariables a,
BodyVariables b)
|
void |
get(Body b)
exports this containers values back into a body |
static void |
get(BodyVariables[] variables,
Body[] bodies)
|
static void |
releaseBodyVariableList(BodyVariables[] list)
releases an array of body variables (got from aquire) |
static void |
rk4Update(BodyVariables[] variables,
BodyVariables[] dx,
RealPointer dv,
float stepsize)
updates the the position and velocity variables independantly, compatabile with the RK4 algorithm |
static void |
rk4Update(BodyVariables[] variables,
RealPointer dx,
RealPointer dv,
float stepsize)
updates the the position and velocity variables independantly, compatabile with the RK4 algorithm |
void |
set(Body b)
stores the bodies variables into this container |
static void |
set(BodyVariables[] variables,
Body[] bodies)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final Vector3 pos
public final Quaternion q
public final Matrix3 r
public final Vector3 avel
public final Vector3 lvel
public final Vector3 tacc
public final Vector3 facc
public static final Body bodyTmp
| Constructor Detail |
|---|
public BodyVariables()
| Method Detail |
|---|
public static BodyVariables[] aquireBodyVariableList(int size)
size -
public static void releaseBodyVariableList(BodyVariables[] list)
list - public void set(Body b)
b - public void get(Body b)
b -
public static void set(BodyVariables[] variables,
Body[] bodies)
public static void get(BodyVariables[] variables,
Body[] bodies)
public static void apply(BodyVariables[] variables,
RealPointer acceleration,
float stepsize)
variables - acceleration - acceleration to apply bodiesstepsize -
public static void rk4Update(BodyVariables[] variables,
RealPointer dx,
RealPointer dv,
float stepsize)
variables - stepsize -
public static void rk4Update(BodyVariables[] variables,
BodyVariables[] dx,
RealPointer dv,
float stepsize)
dx - get the required velocity updates from another body list instead of a packed array
public static boolean equals(BodyVariables a,
BodyVariables b)
public static boolean equals(BodyVariables[] a,
BodyVariables[] b)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||