Gravity Engine  1.5
Unity Asset for Gravity
BinaryPair Class Reference

Binary Pair More...

Inheritance diagram for BinaryPair:
EllipseBase IOrbitScalable IOrbitPositions

Public Member Functions

void ApplyScale (float scale)
 Apply scale to the orbit. This is used by the inspector scripts during scene setup. Do not use at run-time. More...
- Public Member Functions inherited from EllipseBase
void Init ()
 Init the ellipse, verify a center body is present, determine orientation and update transform. More...
void SetCenterBody (GameObject centerBody)
 Sets the center body and initializes the ellipse configuration. More...
void InitFromOrbitData (OrbitData od)
 Inits an EllipseBase orbit from orbital parameters contained in an OrbitData. More...
OrbitData GetOrbitData ()
void SetTransform ()
 Sets the transform based on the orbit parameters. More...
Vector3[] OrbitPositions (int numPoints)
 Calculate an array of points that describe the specified orbit More...
GameObject GetCenterObject ()
 Return the center object around which this ellipse is defined. More...

Public Attributes

Vector3 velocity
 Velocity of center of mass of the binary pair.
- Public Attributes inherited from EllipseBase
ParamBy paramBy = ParamBy.AXIS_A
 Define ellipse by semi0major axis (A) or closest approach (P)
GameObject centerObject
 object to orbit around (if null, will take parent game object)
float ecc
 eccentricity (0..1, 0=circle, 1=linear)
float a_scaled = -1f
float p_scaled
float a = 10f
 (a,p) hold the values for a and p in the unit system specified by the gravity engine. These are scaled and used to set a and p for game simulation based on the unit scaling system provided by gravity engine. More...
float p
 pericenter - based on paramBy user can specify a OR p. a = p/(1-ecc)
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)

Additional Inherited Members

- Public Types inherited from EllipseBase
enum  ParamBy { AXIS_A, CLOSEST_P }
- Protected Member Functions inherited from EllipseBase
void UpdateOrbitParams ()
void CalculateRotation ()
- Protected Attributes inherited from EllipseBase
Quaternion ellipse_orientation
Vector3 xunit = Vector3.right
Vector3 yunit = Vector3.up
Vector3 zunit = Vector3.forward
NBody centerNbody
OrbitData initData

Detailed Description

Binary Pair

Configures the initial velocities for two roughly equal masses to establish their elliptical orbits around the center of mass of the pair.

Must have two NBody objects as immediate children.

Member Function Documentation

void BinaryPair.ApplyScale ( float  scale)

Apply scale to the orbit. This is used by the inspector scripts during scene setup. Do not use at run-time.


Implements IOrbitScalable.

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