mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 22:59:19 +02:00
build 180404. optional scenario clock sync with current local time, keyboard input for the ui layer
This commit is contained in:
19
World.h
19
World.h
@@ -109,6 +109,8 @@ TWorld();
|
||||
void TrainDelete(TDynamicObject *d = NULL);
|
||||
TTrain const *
|
||||
train() const { return Train; }
|
||||
TDynamicObject const *
|
||||
controlled() const { return Controlled; }
|
||||
// switches between static and dynamic daylight calculation
|
||||
void ToggleDaylight();
|
||||
// calculates current season of the year based on set simulation date
|
||||
@@ -121,7 +123,6 @@ TWorld();
|
||||
private:
|
||||
void Update_Environment();
|
||||
void Update_Camera( const double Deltatime );
|
||||
void Update_UI();
|
||||
void ResourceSweep();
|
||||
// handles vehicle change flag
|
||||
void ChangeDynamic();
|
||||
@@ -133,21 +134,19 @@ private:
|
||||
TCamera DebugCamera;
|
||||
world_environment Environment;
|
||||
TTrain *Train;
|
||||
TDynamicObject *pDynamicNearest;
|
||||
bool Paused{ true };
|
||||
TDynamicObject *Controlled { nullptr }; // pojazd, który prowadzimy
|
||||
TDynamicObject *pDynamicNearest { nullptr };
|
||||
bool Paused { true };
|
||||
TEvent *KeyEvents[10]; // eventy wyzwalane z klawiaury
|
||||
TMoverParameters *mvControlled; // wskaźnik na człon silnikowy, do wyświetlania jego parametrów
|
||||
double fTime50Hz; // bufor czasu dla komunikacji z PoKeys
|
||||
double fTimeBuffer; // bufor czasu aktualizacji dla stałego kroku fizyki
|
||||
double fMaxDt; //[s] krok czasowy fizyki (0.01 dla normalnych warunków)
|
||||
double m_primaryupdaterate{ 1.0 / 100.0 };
|
||||
double m_secondaryupdaterate{ 1.0 / 50.0 };
|
||||
double m_primaryupdateaccumulator{ m_secondaryupdaterate }; // keeps track of elapsed simulation time, for core fixed step routines
|
||||
double m_secondaryupdateaccumulator{ m_secondaryupdaterate }; // keeps track of elapsed simulation time, for less important fixed step routines
|
||||
double const m_primaryupdaterate { 1.0 / 100.0 };
|
||||
double const m_secondaryupdaterate { 1.0 / 50.0 };
|
||||
double m_primaryupdateaccumulator { m_secondaryupdaterate }; // keeps track of elapsed simulation time, for core fixed step routines
|
||||
double m_secondaryupdateaccumulator { m_secondaryupdaterate }; // keeps track of elapsed simulation time, for less important fixed step routines
|
||||
int iPause; // wykrywanie zmian w zapauzowaniu
|
||||
double VelPrev; // poprzednia prędkość
|
||||
int tprev; // poprzedni czas
|
||||
double Acc; // przyspieszenie styczne
|
||||
bool m_init { false }; // indicates whether initial update of the world was performed
|
||||
GLFWwindow *window;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user