Gravity Engine 2 5.1
|
The Solar System has a GSController for the motion of planets around the sun and separate controllers for any planets with satellites. Due to the difference length and mass scales these controllers will have different internal integration times. More...
Public Member Functions | |
void | SetDateTime (int year, int month, int day, double utc) |
void | SwitchPrimary (int bodyCode) |
Switch the primary controller to the controller for the indicated bodyCode 0=sun, 1=mercury etc. | |
Public Attributes | |
GSController[] | controllers = new GSController[SolarSystemBuilder.NUM_PLANETS + 1] |
int | day = 1 |
bool | debugKeys = true |
GESphereCamera | geCamera |
int | month = 1 |
bool | runAllControllers = true |
GameObject[] | targets = new GameObject[SolarSystemBuilder.NUM_PLANETS + 1] |
TMPro.TextMeshProUGUI | timeText |
int | year = 2024 |
bool | zoomRadiiForVisibility = true |
The Solar System has a GSController for the motion of planets around the sun and separate controllers for any planets with satellites. Due to the difference length and mass scales these controllers will have different internal integration times.
At any given time one of these controllers will be the primary controller. It's time evolution will set the time evolution in all the other systems.
For brevity, this controller also handles the switching of the display when a new primary system is selected. This is done by:
There may be cases where there is no need to update the evolution in all the secondary systems e.g. if they are not in the display and they are all "on-rails" and can be jumped to a new time easily. When this is not the case (off-rails) it is best to evolve all the secondary controllers as the primary progresses to avoid a big "catch-up" computation when a new primary is selected.
On Awake the start time from the Solar System time will be used (and pushed to all the planet controllers).
void GravityEngine2.SolarMetaController.SwitchPrimary | ( | int | bodyCode | ) |
Switch the primary controller to the controller for the indicated bodyCode 0=sun, 1=mercury etc.
bodyCode |