Gravity Engine 12.0
Unity Asset for Gravity
Loading...
Searching...
No Matches
SelectiveNewton Class Reference
Inheritance diagram for SelectiveNewton:
SelectiveForceBase IForceDelegate

Public Member Functions

override double[] CalcAccelerationIJPerM (double[] rji, int i, int j, GravityState.NbodyState[] nbodyStates)
 Calculate the acceleration between bodies i and j.
 
override double[] CalcAccelerationIPerParticle (double[] rji, int i, GravityState.NbodyState[] nbodyStates)
 
override double[] CalcJerkIJPerM (double[] rji, int i, int j, GravityState.NbodyState[] nbodyStates)
 
- Public Member Functions inherited from SelectiveForceBase
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)
 

Additional Inherited Members

- Protected Attributes inherited from SelectiveForceBase
bool[,] excludeForce
 

Member Function Documentation

◆ CalcAccelerationIJPerM()

override double[] SelectiveNewton.CalcAccelerationIJPerM ( double[]  rji,
int  i,
int  j,
GravityState.NbodyState[]  nbodyStates 
)
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!

Parameters
rji
i
j
nbodyStates
Returns

Implements SelectiveForceBase.

◆ CalcAccelerationIPerParticle()

override double[] SelectiveNewton.CalcAccelerationIPerParticle ( double[]  rji,
int  i,
GravityState::NbodyState[]  nbodyStates 
)
virtual

Implements SelectiveForceBase.

◆ CalcJerkIJPerM()

override double[] SelectiveNewton.CalcJerkIJPerM ( double[]  rji,
int  i,
int  j,
GravityState::NbodyState[]  nbodyStates 
)
virtual

Implements SelectiveForceBase.


The documentation for this class was generated from the following file: