载入中...
搜索中...
未找到
OceanInteractionCodec.cpp
浏览该文件的文档.
18 keys(value, {"resolution", "length", "depth", "gravity", "damping", "absorptionWidth", "foamDecay", "center"});
34 Diagnostic::error(DiagnosticCode::InvalidArgument, "Invalid ocean wake arguments", error.what()));
52 keys(value, {"cells", "waterDensity", "gravity", "drag", "propeller", "thrust", "rudderCoefficient"});
65 out.cells.push_back({vector3(field(c, "center")), number(field(c, "radius")), number(field(c, "volume"))});
70 Diagnostic::error(DiagnosticCode::InvalidArgument, "Invalid ocean hull arguments", error.what()));
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
std::variant< std::monostate, std::int64_t, double, std::string, bool > Value
Definition Database.h:27
void keys(const Value &value, std::initializer_list< const char * > names)
Definition OceanCodecInternal.h:8
glm::dvec3 vector3(const Value &value)
Definition OceanCodecInternal.h:36
const Value & field(const Value &value, const char *name)
Borrow a required child of value; throws on a missing field.
Definition OceanCodecInternal.h:20
Value encodeOceanHullSettings(const OceanHullSettings &s)
Encode owning transient hull arguments; physics links are deliberately absent. @thread Const/reentran...
Definition OceanInteractionCodec.cpp:37
Result< OceanHullSettings > decodeOceanHullSettings(const Value &value)
Strict structural decode of at most 64 cells; OceanBoat::create validates all physical domains.
Definition OceanInteractionCodec.cpp:50
Value encodeOceanWakeSettings(const OceanWakeSettings &s)
Encode owning transient wake construction arguments; not a persistent checkpoint. @thread Const/reent...
Definition OceanInteractionCodec.cpp:6
Result< OceanWakeSettings > decodeOceanWakeSettings(const Value &value)
Strict bounded structural decode; native OceanWake::create owns domain validation.
Definition OceanInteractionCodec.cpp:16
@ InvalidArgument
Hull water response; local +Z forward, +X starboard, +Y up.
Definition OceanBoat.h:20
Local dispersive wave tile, SI units; kept independent of the observing camera.
Definition OceanWake.h:16