16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 03:09:18 +02:00

Merge branch 'master' into gfx-work

This commit is contained in:
milek7
2018-09-20 19:14:28 +02:00
114 changed files with 9353 additions and 6114 deletions

35
Track.h
View File

@@ -99,18 +99,32 @@ class TIsolated
{ // obiekt zbierający zajętości z kilku odcinków
public:
// constructors
TIsolated();
TIsolated(const std::string &n, TIsolated *i);
// methods
static void DeleteAll();
static TIsolated * Find(const std::string &n, bool create = true); // znalezienie obiektu albo utworzenie nowego
static TIsolated * Find(const std::string &n); // znalezienie obiektu albo utworzenie nowego
bool AssignEvents();
void Modify(int i, TDynamicObject *o); // dodanie lub odjęcie osi
bool Busy() {
return (iAxles > 0); };
static TIsolated * Root() {
return (pRoot); };
TIsolated * Next() {
return (pNext); };
inline
bool
Busy() {
return (iAxles > 0); };
inline
static TIsolated *
Root() {
return (pRoot); };
inline
TIsolated *
Next() {
return (pNext); };
inline
void
parent( TIsolated *Parent ) {
pParent = Parent; }
inline
TIsolated *
parent() const {
return pParent; }
// members
std::string asName; // nazwa obiektu, baza do nazw eventów
TEvent *evBusy { nullptr }; // zdarzenie wyzwalane po zajęciu grupy
@@ -120,6 +134,7 @@ private:
// members
int iAxles { 0 }; // ilość osi na odcinkach obsługiwanych przez obiekt
TIsolated *pNext { nullptr }; // odcinki izolowane są trzymane w postaci listy jednikierunkowej
TIsolated *pParent { nullptr }; // optional parent piece, collecting data from its children
static TIsolated *pRoot; // początek listy
};
@@ -128,7 +143,7 @@ class TTrack : public scene::basic_node
{
friend opengl_renderer;
// NOTE: temporary arrangement
friend ui_layer;
friend itemproperties_panel;
private:
TIsolated * pIsolated = nullptr; // obwód izolowany obsługujący zajęcia/zwolnienia grupy torów
@@ -140,6 +155,7 @@ private:
// McZapkie-070402: dodalem zmienne opisujace rozmiary tekstur
int iTrapezoid = 0; // 0-standard, 1-przechyłka, 2-trapez, 3-oba
double fRadiusTable[ 2 ] = { 0.0, 0.0 }; // dwa promienie, drugi dla zwrotnicy
float fVerticalRadius { 0.f }; // y-axis track radius (currently not supported)
float fTexLength = 4.0f; // długość powtarzania tekstury w metrach
float fTexRatio1 = 1.0f; // proporcja boków tekstury nawierzchni (żeby zaoszczędzić na rozmiarach tekstur...)
float fTexRatio2 = 1.0f; // proporcja boków tekstury chodnika (żeby zaoszczędzić na rozmiarach tekstur...)
@@ -266,7 +282,6 @@ public:
if (pIsolated)
pIsolated->Modify(i, o); }; // dodanie lub odjęcie osi
std::string IsolatedName();
bool IsolatedEventsAssign(TEvent *busy, TEvent *free);
double WidthTotal();
bool IsGroupable();
int TestPoint( Math3D::vector3 *Point);