Gravity Engine 12.0
Unity Asset for Gravity
|
Base class for a selective (per-object) force that allows the force to be changed depending on which two objects are interacting. More...
Classes | |
class | ShowForceCommand |
Public Member Functions | |
abstract double[] | CalcAccelerationIJPerM (double[] rji, int i, int j, GravityState.NbodyState[] nbodyStates) |
Calculate the acceleration between bodies i and j. | |
abstract double[] | CalcAccelerationIPerParticle (double[] rji, int i, GravityState.NbodyState[] nbodyStates) |
abstract double[] | CalcJerkIJPerM (double[] rji, int i, int j, GravityState.NbodyState[] nbodyStates) |
void | ForceSelection (NBody body1, NBody body2, bool useForce) |
Configure force selection between body1 and body2. If body 2 is NULL this indicates that the useForce value should be applied to body1's interaction with all other bodies (massive and massless). | |
void | Init (int numMassive) |
void | RemoveBody (int index) |
void | IncreaseToSize (int newSize) |
double[] | CalcAccelerationIJPerM (double[] rji, int i, int j, GravityState.NbodyState[] nbodyStates) |
Calculate the acceleration between bodies i and j. | |
double[] | CalcAccelerationIPerParticle (double[] rji, int i, GravityState.NbodyState[] nbodyStates) |
double[] | CalcJerkIJPerM (double[] rji, int i, int j, GravityState.NbodyState[] nbodyStates) |
Protected Attributes | |
bool[,] | excludeForce |
Base class for a selective (per-object) force that allows the force to be changed depending on which two objects are interacting.
Can be used e.g. to exclude some objects from the influnce of others or to allow some objects to have a different force than others.
Selective forces only operate on massive forces. If massless objects are present the GE must be configured with "Optimize Massless" set to false.
|
pure virtual |
Calculate the acceleration between bodies i and j.
Return the aij and aji accelerations because in some case (e.g one is oblate) they will not be equal and opposite!
rji | |
i | |
j | |
nbodyStates |
Implements IForceDelegate.
Implemented in SelectiveNewton.
|
pure virtual |
Implements IForceDelegate.
|
pure virtual |
Implements IForceDelegate.
Configure force selection between body1 and body2. If body 2 is NULL this indicates that the useForce value should be applied to body1's interaction with all other bodies (massive and massless).
Body1 must be massive.
body1 | |
body2 | |
useForce |