16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 16:59:17 +02:00

build 1020: error fixes and backward compatibility improvements

This commit is contained in:
tmj-fstate
2017-10-22 19:19:16 +02:00
parent 87348a2ab8
commit 7ad760821f
17 changed files with 369 additions and 149 deletions

View File

@@ -65,7 +65,7 @@ basic_cell::update_traction( TDynamicObject *Vehicle, int const Pantographindex
auto pantograph = Vehicle->pants[ Pantographindex ].fParamPants;
auto const pantographposition = position + ( vLeft * pantograph->vPos.z ) + ( vUp * pantograph->vPos.y ) + ( vFront * pantograph->vPos.x );
for( auto *traction : m_traction ) {
for( auto *traction : m_directories.traction ) {
// współczynniki równania parametrycznego
auto const paramfrontdot = glm::dot( traction->vParametric, vFront );
@@ -174,6 +174,11 @@ basic_cell::insert( shape_node Shape ) {
m_active = true;
// re-calculate cell radius, in case shape geometry extends outside the cell's boundaries
m_area.radius = std::max<float>(
m_area.radius,
glm::length( m_area.center - Shape.data().area.center ) + Shape.data().area.radius );
auto const &shapedata { Shape.data() };
auto &shapes = (
shapedata.translucent ?
@@ -507,7 +512,7 @@ basic_section::update_traction( TDynamicObject *Vehicle, int const Pantographind
auto pantograph = Vehicle->pants[ Pantographindex ].fParamPants;
auto const pantographposition = position + ( vLeft * pantograph->vPos.z ) + ( vUp * pantograph->vPos.y ) + ( vFront * pantograph->vPos.x );
auto const radius { 0.0 }; // { EU07_CELLSIZE * 0.5 }; // experimentally limited, check if it has any negative effect
auto const radius { EU07_CELLSIZE * 0.5 };
for( auto &cell : m_cells ) {
// we reject early cells which aren't within our area of interest
@@ -728,7 +733,7 @@ basic_region::update_traction( TDynamicObject *Vehicle, int const Pantographinde
auto const pant0 = position + ( vLeft * p->vPos.z ) + ( vUp * p->vPos.y ) + ( vFront * p->vPos.x );
p->PantTraction = std::numeric_limits<double>::max(); // taka za duża wartość
auto const &sectionlist = sections( pant0, 0.0 );
auto const &sectionlist = sections( pant0, EU07_CELLSIZE * 0.5 );
for( auto *section : sectionlist ) {
section->update_traction( Vehicle, Pantographindex );
}