Gravity Engine  1.5
Unity Asset for Gravity
OrbitData Class Reference

Orbit data. Hold the traditional orbit parameters for an elliptic/hyperbolic orbit. More...

Public Member Functions

void SetOrbitForVelocity (NBody forNbody, NBody aroundNBody)
 Computes the orbit parameters for a specified velocity with respect to a central body. More...
 

Public Attributes

float ecc
 eccentricity (0..1, 0=circle, 1=linear)
 
float a = 10f
 semi-major axis - based on paramBy user can specify a OR p. a = p/(1-ecc)
 
float perihelion
 perihelion
 
float omega_uc
 "longitude of ascending node" - angle from x-axis to line from focus to pericenter
 
float omega_lc
 "argument of perienter" - angle from ascending node to pericenter
 
float inclination
 inclination (degrees!)
 
float phase
 initial TRUE anomoly (angle wrt line from focus to closest approach)
 
float period
 period of orbit (currently only in dimensionless units)
 
float tau
 time to periapsis (point of closest approach)
 
float r_initial = 10f
 Hyperbola - initial distance from focus.
 

Detailed Description

Orbit data. Hold the traditional orbit parameters for an elliptic/hyperbolic orbit.

Provide utility methods to derive the orbit parameters from the position, velocity and centerBody of an NBody object pair. This orbit prediction is based only on the two bodies (and assumes the central body mass dominates) - the influence of other bodies in the scene may result in an actual path that is different from the predicted path.

Member Function Documentation

void OrbitData.SetOrbitForVelocity ( NBody  forNbody,
NBody  aroundNBody 
)

Computes the orbit parameters for a specified velocity with respect to a central body.

Parameters
velVel.

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