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

Editor checkpoint: turnout domain service, web->editor rename, Id-1 templates

Checkpoint of the editor branch so work isn't carried loose across a branch
switch. Builds.

- maj0sted turnout geometry moved into the domain: domain::lay_turnout lays the
  diverging path (pre-blade lead, blade at beta, arc of alfa-beta, frog rail) and
  solve_junction is a thin adapter onto it.
- the maj0sted web/ tree renamed to editor/ (namespace and paths) - there is no
  WASM here, it's plain native C++ the editor calls.
- click places the switch at its start (początek rozjazdu); the branch's leaving
  straight is locked tangent to the frog; switches can be slid along the through
  track and flipped L/P.
- Polish turnout templates carry catalogue length (Id-1-consistent lengths), plus
  blade-angle and pre-blade fields (left 0 until the catalogue figures are in).
- TURNOUT_SPEC.md: the Bezier-based runtime/model contract.
- also folds in other pending branch changes (scenery, tests) to leave a clean tree.
This commit is contained in:
maj00r
2026-08-01 19:55:33 +02:00
committed by maj00r
parent d069743265
commit 707b4de2f4
41 changed files with 2224 additions and 471 deletions

View File

@@ -549,13 +549,6 @@ void TTrack::Load(cParser *parser, glm::dvec3 const &pOrigin)
// na przechyłce doliczyć jeszcze pół przechyłki
}
// length2 is better than length for comparing because it does not require sqrt function
if( glm::length2((p1 + p1 + p2) / 3.0 - p1 - cp1) < sq(0.02)
|| glm::length2((p1 + p2 + p2) / 3.0 - p2 + cp1) < sq(0.02) ) {
// "prostowanie" prostych z kontrolnymi, dokładność 2cm
cp1 = cp2 = glm::dvec3(0, 0, 0);
}
if( fRadius != 0 ) {
// gdy podany promień
segsize =
@@ -644,16 +637,6 @@ void TTrack::Load(cParser *parser, glm::dvec3 const &pOrigin)
// na przechyłce doliczyć jeszcze pół przechyłki?
}
if( eType != tt_Cross ) {
// dla skrzyżowań muszą być podane kontrolne
// length2 is better than length for comparing because it does not require sqrt function
if( glm::length2(( p1 + p1 + p2 ) / 3.0 - p1 - cp1 ) < sq(0.02)
|| glm::length2(( p1 + p2 + p2 ) / 3.0 - p2 + cp1 ) < sq(0.02) ) {
// "prostowanie" prostych z kontrolnymi, dokładność 2cm
cp1 = cp2 = glm::dvec3(0, 0, 0);
}
}
if( fRadiusTable[ 0 ] != 0 ) {
// gdy podany promień
segsize =
@@ -709,16 +692,6 @@ void TTrack::Load(cParser *parser, glm::dvec3 const &pOrigin)
// na przechyłce doliczyć jeszcze pół przechyłki?
}
if( eType != tt_Cross ) {
// dla skrzyżowań muszą być podane kontrolne
// length2 is better than length for comparing because it does not require sqrt function
if( glm::length2((p3 + p3 + p4) / 3.0 - p3 - cp3) < sq(0.02)
|| glm::length2((p3 + p4 + p4) / 3.0 - p4 + cp3) < sq(0.02) ) {
// "prostowanie" prostych z kontrolnymi, dokładność 2cm
cp3 = cp4 = glm::dvec3(0, 0, 0);
}
}
if( fRadiusTable[ 1 ] != 0 ) {
// gdy podany promień
segsize =