mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 09:49:19 +02:00
Drop-in copy of C:\Users\maj00r\Projects\maj0sted-master minus its web/ directory - the WASM frontend is not being ported, the editor drives the same C++ API natively. What is left is plain C++20 with no dependencies: domain model (niweleta, plan and profile geometry, fitting, parallelism), project serialization, rail sampling and the editor document. src/web/ribbon.cpp was missing from the library source list; added, since without it the ribbon symbols never make it into the archive.
21 lines
533 B
C++
21 lines
533 B
C++
// Minimal walkthrough: create a map project and inspect its CRS.
|
|
|
|
#include <cstdio>
|
|
|
|
#include "maj0sted/maj0sted.hpp"
|
|
|
|
using namespace maj0sted::domain;
|
|
|
|
int main() {
|
|
std::printf("maj0sted %s\n\n", MAJ0STED_VERSION_STRING);
|
|
|
|
const MapProject project; // defaults to EPSG:2180
|
|
std::printf("Map project CRS: EPSG:%d\n", project.crs().epsg());
|
|
|
|
const CartesianPosition position{500000.0, 300000.0};
|
|
std::printf("Sample position: x=%.1f m, y=%.1f m\n", position.x(),
|
|
position.y());
|
|
|
|
return 0;
|
|
}
|