17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 10:59:20 +02:00
Files
maszyna/environment/stars.cppm
maj00r b8f040e6fd propagate template headers transitively, import Console where used
AnimModel.cpp reaches cParser through the simulation core, not a direct
import, so the previous pass missed it; the propagation now follows the
whole import closure. Train.cpp, drivermode.cpp and Globals.cpp call
Console:: inside _WIN32 guards without importing eu07.console - invisible
on Linux, where those blocks are skipped.
2026-09-10 01:41:24 +02:00

50 lines
1.1 KiB
C++

//////////////////////////////////////////////////////////////////////////////////////////
// cStars -- simple starfield model, simulating appearance of starry sky
module;
#include <array>
#include <chrono>
#include <cstddef>
#include <deque>
#include <limits>
#include <mutex>
#include <ostream>
#include <sstream>
#include <string>
#include <type_traits>
#include <unordered_map>
#include <utility>
#include <vector>
export module eu07.environment.stars;
import eu07.simcore;
import eu07.utilities.classes;
export {
class cStars {
public:
// types:
// methods:
void init();
// constructors:
cStars() = default;
// deconstructor:
// members:
public:
// read directly by the renderers. They used to be friends, but a friend
// declaration naming a class from another module would require importing it,
// and that import closes a cycle the module graph does not allow.
// members:
float m_longitude{ 19.0f }; // geograpic coordinates hardcoded roughly to Poland location, for the time being
float m_latitude{ 52.0f };
TModel3d *m_stars { nullptr };
};
} // export