Merge branch 'tmj-dev' into milek-dev

This commit is contained in:
milek7
2018-07-17 16:20:11 +02:00
77 changed files with 2959 additions and 2171 deletions

View File

@@ -181,7 +181,7 @@ TTrack * TTrack::Create400m(int what, double dx)
trk->Segment->Init( Math3D::vector3( -dx, 0, 0 ), Math3D::vector3( -dx, 0, 400 ), 10.0, 0, 0 ); // prosty
trk->location( glm::dvec3{ -dx, 0, 200 } ); //środek, aby się mogło wyświetlić
simulation::Paths.insert( trk );
simulation::Region->insert_path( trk, scene::scratch_data() );
simulation::Region->insert( trk );
return trk;
};
@@ -275,11 +275,11 @@ TTrack * TTrack::NullCreate(int dir)
// trzeba jeszcze dodać do odpowiedniego segmentu, aby się renderowały z niego pojazdy
trk->location( glm::dvec3{ 0.5 * ( p1 + p2 ) } ); //środek, aby się mogło wyświetlić
simulation::Paths.insert( trk );
simulation::Region->insert_path( trk, scene::scratch_data() );
simulation::Region->insert( trk );
if( trk2 ) {
trk2->location( trk->location() ); // ten sam środek jest
simulation::Paths.insert( trk2 );
simulation::Region->insert_path( trk2, scene::scratch_data() );
simulation::Region->insert( trk2 );
}
return trk;
};
@@ -345,7 +345,7 @@ void TTrack::ConnectNextNext(TTrack *pTrack, int typ)
}
}
void TTrack::Load(cParser *parser, Math3D::vector3 pOrigin)
void TTrack::Load(cParser *parser, glm::dvec3 const &pOrigin)
{ // pobranie obiektu trajektorii ruchu
Math3D::vector3 pt, vec, p1, p2, cp1, cp2, p3, p4, cp3, cp4; // dodatkowe punkty potrzebne do skrzyżowań
double a1, a2, r1, r2, r3, r4;
@@ -864,11 +864,11 @@ void TTrack::Load(cParser *parser, Math3D::vector3 pOrigin)
}
// calculate path location
m_area.center = ( glm::dvec3{ (
location( (
CurrentSegment()->FastGetPoint_0()
+ CurrentSegment()->FastGetPoint( 0.5 )
+ CurrentSegment()->FastGetPoint_1() )
/ 3.0 } );
/ 3.0 );
}
bool TTrack::AssignEvents() {