Gravity Engine  1.5
Unity Asset for Gravity
IForceDelegate Interface Reference
Inheritance diagram for IForceDelegate:
CustomForce ForceR ForceR2 InverseR InverseR3 NewtonForce

Public Member Functions

double CalcF (double r_sep)
 Calculate the distance dependent force of two bodies seperated by distance r_sep. (Note: This has taken e.g. F1 = m1 a1 = (G m1 m2)/r^2 and removes m1 and m2. These are handled in the integrator. More...
 
double CalcFdot (double r_sep)
 Calculates the time derivitive of the force law This function is required only by the Hermite algorithm. If Leapfrog is used it can be stubbed out. More...
 

Member Function Documentation

double IForceDelegate.CalcF ( double  r_sep)

Calculate the distance dependent force of two bodies seperated by distance r_sep. (Note: This has taken e.g. F1 = m1 a1 = (G m1 m2)/r^2 and removes m1 and m2. These are handled in the integrator.

e.g. for Newtonian (1/R^2) gravity this would be: m2/(r_sep*r_sep);

Returns
The accel.
Parameters
m2M2.
r_sepR sep. The distance between the bodies

Implemented in CustomForce, NewtonForce, ForceR, ForceR2, InverseR, and InverseR3.

double IForceDelegate.CalcFdot ( double  r_sep)

Calculates the time derivitive of the force law This function is required only by the Hermite algorithm. If Leapfrog is used it can be stubbed out.

e.g. for Newtonian (1/R^2) gravity

Returns
The jerk.
Parameters
m2M2.
r_sepR sep.

Implemented in CustomForce, NewtonForce, ForceR, ForceR2, InverseR, and InverseR3.


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