载入中...
搜索中...
未找到
BakeRecipe.cpp
浏览该文件的文档.
27 for (unsigned shift = 0; shift < 32; shift += 8) out.push_back(static_cast<char>((value >> shift) & 255));
50 for (unsigned i = 0; i < 4; ++i) result |= std::uint32_t(static_cast<unsigned char>(data[i])) << (8 * i);
71 if (!token(revision)) return Result<void>::failure(invalidRecipe("invalid producer revision token"));
76 if (!token(revision)) return Result<void>::failure(invalidRecipe("invalid backend revision token"));
130 auto failure = [] { return Result<BakeRecipe>::failure(invalidRecipe("invalid bake provenance schema or data")); };
std::vector< std::pair< std::uint64_t, OceanBoatReceipt > > sources
Definition OceanSprayBindings.cpp:21
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
Bounded provenance builder for explicit-coordinate baked recordings. @ownership Owns names and conten...
Definition BakeRecipe.h:21
Result< void > setTiming(float stepSeconds, std::uint32_t sampleStride)
Set the actual finite positive simulation step in seconds and positive ticks per captured sample.
Definition BakeRecipe.cpp:80
Result< std::string > key() const
Compute the noncryptographic cache key of the complete canonical recipe. @cost Linear in bounded meta...
Definition BakeRecipe.cpp:181
Result< void > setParameters(std::string_view bytes)
Digest complete parameter bytes, including defaults resolved by the producer. @cost Linear in bytes; ...
Definition BakeRecipe.cpp:87
Result< std::string > encode() const
Encode complete provenance canonically, sorting dependency and RNG names. @cost Linear in bounded met...
Definition BakeRecipe.cpp:104
Result< void > setBackend(std::string_view revision)
Set the explicit backend and its revision; never infer it from the player platform.
Definition BakeRecipe.cpp:75
Result< void > setSource(std::string_view name, std::string_view bytes)
Insert or replace a named dependency digest; names are stable logical IDs, not absolute paths....
Definition BakeRecipe.cpp:91
Result< void > setRandomStream(std::string_view name, std::uint64_t seed)
Insert or replace one of at most 64 named RNG seeds. Empty stream sets explicitly mean no RNG.
Definition BakeRecipe.cpp:98
BakeCoordinates coordinates() const noexcept
Current coordinate contract, defaulting to the original metre convention.
Definition BakeRecipe.cpp:69
Result< void > setProducer(std::string_view revision)
Set an explicit algorithm/build revision token; invalid input leaves the builder unchanged.
Definition BakeRecipe.cpp:70
static Result< BakeRecipe > decode(std::string_view bytes)
Parse a bounded canonical recipe record, rejecting duplicate names and trailing bytes....
Definition BakeRecipe.cpp:129
Result< void > setCoordinates(BakeCoordinates coordinates)
Select the producer coordinate contract; unknown values fail without changing the recipe.
Definition BakeRecipe.cpp:63
Result< void > validateSampleTime(std::uint32_t frame, float seconds) const
Validate a sample against the declared fixed-step/stride grid.
Definition BakeRecipe.cpp:170
std::string bakedAssetContentKey(std::string_view source)
Stable noncryptographic 128-bit content digest, encoded as 32 lowercase hexadecimal bytes....
Definition BakedAssetFile.cpp:14
BakeCoordinates
Explicit source coordinates; planar pixels preserve XY axes without an implicit flip.
Definition BakeRecipe.h:11
@ PlanarPixels
@ MetresRightHandedYUp
@ InvalidArgument