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:
14
Traction.cpp
14
Traction.cpp
@@ -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 {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user