| Modifier and Type | Field and Description |
|---|---|
static float |
MAXIMUM_AXIS |
static float |
MAXIMUM_ECCENTRICITY |
static float |
MAXIMUM_PERIOD |
static float |
MINIMUM_AXIS |
static float |
MINIMUM_ECCENTRICITY |
static float |
MINIMUM_PERIOD |
| Constructor and Description |
|---|
KeplerOrbit(SectorEntityToken focus,
float semiMajorAxis,
float semiMinorAxis,
float angle,
float period,
boolean clockwise)
Elliptical Kepler Orbit
of one body around another.
|
| Modifier and Type | Method and Description |
|---|---|
void |
advance(float amount)
Called by Starsector itself - you can ignore this.
|
Vector2f |
computeCurrentLocation() |
SectorEntityToken |
getFocus() |
float |
getOrbitalPeriod() |
OrbitAPI |
makeCopy() |
void |
setEntity(SectorEntityToken entity)
Called by Starsector itself - you can ignore this.
|
void |
updateLocation() |
public static final float MINIMUM_ECCENTRICITY
public static final float MAXIMUM_ECCENTRICITY
public static final float MINIMUM_AXIS
public static final float MAXIMUM_AXIS
public static final float MINIMUM_PERIOD
public static final float MAXIMUM_PERIOD
public KeplerOrbit(SectorEntityToken focus, float semiMajorAxis, float semiMinorAxis, float angle, float period, boolean clockwise)
focus - SectorEntityToken whereabout the body orbitssemiMajorAxis - float length of the semi-minor axis,
which is the distance from the focus
to the orbital point furthest from itsemiMinorAxis - float length of the semi-minor axis,
which is the distance from the focus
to either of the two points where a line
perpendicular to the semiMajorAxis
intersects the orbitangle - float degrees counterclockwise from horizontally
right to the 'first' semi-major axisperiod - float duration of one orbit in daysclockwise - boolean whether the orbit is clockwise
(true) or counterclockwise (false)public SectorEntityToken getFocus()
getFocus in interface OrbitAPISectorEntityToken orbitedpublic void setEntity(SectorEntityToken entity)
public void advance(float amount)
public Vector2f computeCurrentLocation()
computeCurrentLocation in interface OrbitAPIpublic float getOrbitalPeriod()
getOrbitalPeriod in interface OrbitAPIpublic void updateLocation()
updateLocation in interface OrbitAPI