载入中...
搜索中...
未找到
SkyTimeline.cpp
浏览该文件的文档.
8bool inRange(double value, double low, double high) { return std::isfinite(value) && value >= low && value <= high; }
10 return inRange(weather.cloudCoverage, 0, 10) && inRange(weather.fog, 0, 1) && inRange(weather.rain, 0, 1) &&
23 if (!inRange(clock.initialHour, 0, 24) || clock.initialHour == 24 || !inRange(clock.hoursPerSecond, 0, 24) ||
30 if (duration.nanoseconds() < 0) return Result<void>::failure(invalid("Sky time step must be nonnegative"));
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
Owns one independent sky clock, weather transition and integrated cloud travel.
Definition SkyTimeline.h:42
Definition DayNight.cpp:18
@ InvalidArgument
Runtime clock configuration, independent of the legacy DayNight module.
Definition SkyTimeline.h:19
Copied sky simulation state shared by main-view and reflection consumers.
Definition SkyTimeline.h:25
std::array< double, 2 > cloudTravelXZ
Definition SkyTimeline.h:29
Independent sky weather values; distances are metres and wind is metres/second.
Definition SkyTimeline.h:10