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

build 171027: bounding area calculation fixes, novice ui obstacle indicator, minor traction render enhancement, shadow calculations for tall enough platforms

This commit is contained in:
tmj-fstate
2017-10-28 00:56:10 +02:00
parent d8c3b5caf4
commit 4ce975a656
23 changed files with 334 additions and 138 deletions

View File

@@ -169,7 +169,7 @@ TTraction::Load( cParser *parser, glm::dvec3 const &pOrigin ) {
Init(); // przeliczenie parametrów
// calculate traction location
m_location = interpolate( pPoint2, pPoint1, 0.5 );
location( interpolate( pPoint2, pPoint1, 0.5 ) );
}
// retrieves list of the track's end points
@@ -543,6 +543,18 @@ double TTraction::VoltageGet(double u, double i)
return 0.0; // gdy nie podłączony wcale?
};
// calculates path's bounding radius
void
TTraction::radius_() {
auto const points = endpoints();
for( auto &point : points ) {
m_area.radius = std::max(
m_area.radius,
static_cast<float>( glm::length( m_area.center - point ) ) );
}
}
glm::vec3
TTraction::wire_color() const {