载入中...
搜索中...
未找到
eve::physics::BakeRecipe类 参考

Bounded provenance builder for explicit-coordinate baked recordings. @ownership Owns names and content digests; never retains source bytes or world pointers. @thread Owner-thread mutation; const encoding is reentrant without concurrent mutation. No callbacks or IO. Schemas EVECREC1 (metres) and EVEBREC1 (planar pixels) fix units, field order and length framing. Unknown versions/fields are rejected. Producers must supply algorithm/backend revisions, all source dependencies, parameters, the actual fixed timestep and sampling stride, and every named RNG seed. These describe admission, not cross-backend determinism. 更多...

#include <BakeRecipe.h>

Public 成员函数

Result< void > setCoordinates (BakeCoordinates coordinates)
 Select the producer coordinate contract; unknown values fail without changing the recipe.
 
BakeCoordinates coordinates () const noexcept
 Current coordinate contract, defaulting to the original metre convention.
 
Result< void > setProducer (std::string_view revision)
 Set an explicit algorithm/build revision token; invalid input leaves the builder unchanged.
 
Result< void > setBackend (std::string_view revision)
 Set the explicit backend and its revision; never infer it from the player platform.
 
Result< void > setTiming (float stepSeconds, std::uint32_t sampleStride)
 Set the actual finite positive simulation step in seconds and positive ticks per captured sample.
 
Result< void > setParameters (std::string_view bytes)
 Digest complete parameter bytes, including defaults resolved by the producer. @cost Linear in bytes; do once before baking, not during capture or playback.
 
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. @cost Linear in source bytes; do once per dependency admission, not per frame.
 
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.
 
Result< std::string > encode () const
 Encode complete provenance canonically, sorting dependency and RNG names. @cost Linear in bounded metadata; encode once per admission, never per frame.
 
Result< void > validateSampleTime (std::uint32_t frame, float seconds) const
 Validate a sample against the declared fixed-step/stride grid.
 
Result< std::string > key () const
 Compute the noncryptographic cache key of the complete canonical recipe. @cost Linear in bounded metadata, once per admission. Not a security/authentication digest.
 

静态 Public 成员函数

static Result< BakeRecipe > decode (std::string_view bytes)
 Parse a bounded canonical recipe record, rejecting duplicate names and trailing bytes. @cost Linear in metadata, once per asset load.
 

详细描述

Bounded provenance builder for explicit-coordinate baked recordings. @ownership Owns names and content digests; never retains source bytes or world pointers. @thread Owner-thread mutation; const encoding is reentrant without concurrent mutation. No callbacks or IO. Schemas EVECREC1 (metres) and EVEBREC1 (planar pixels) fix units, field order and length framing. Unknown versions/fields are rejected. Producers must supply algorithm/backend revisions, all source dependencies, parameters, the actual fixed timestep and sampling stride, and every named RNG seed. These describe admission, not cross-backend determinism.

在文件 BakeRecipe.h 第 21 行定义.

成员函数说明

◆ coordinates()

BakeCoordinates eve::physics::BakeRecipe::coordinates ( ) const
noexcept

Current coordinate contract, defaulting to the original metre convention.

在文件 BakeRecipe.cpp 第 69 行定义.

被这些函数引用 decode(), setCoordinates() , 以及 eve::physics::bake_detail::validateDeformFrame().

◆ decode()

Result< BakeRecipe > eve::physics::BakeRecipe::decode ( std::string_view  bytes)
static

Parse a bounded canonical recipe record, rejecting duplicate names and trailing bytes. @cost Linear in metadata, once per asset load.

返回
Complete owning recipe; failures publish no partial state.

在文件 BakeRecipe.cpp 第 129 行定义.

引用了 bytes, coordinates(), digest, eve::Result< T >::failure(), key(), eve::physics::MetresRightHandedYUp, name, eve::physics::PlanarPixels, recipe, sources, eve::Result< T >::success() , 以及 token.

被这些函数引用 eve::physics::CollapseAnimation::load(), eve::physics::DeformTrack::load(), eve::physics::ParticleTrack::load() , 以及 eve::physics::RigidPoseTrack::load().

◆ encode()

Result< std::string > eve::physics::BakeRecipe::encode ( ) const

Encode complete provenance canonically, sorting dependency and RNG names. @cost Linear in bounded metadata; encode once per admission, never per frame.

返回
Owning canonical schema bytes, or failure for incomplete metadata. Empty parameter bytes are valid.

在文件 BakeRecipe.cpp 第 104 行定义.

引用了 digest, eve::Result< T >::failure(), key(), name, out, eve::physics::PlanarPixels, seed, eve::Result< T >::success() , 以及 token.

被这些函数引用 key(), eve::physics::DeformTrack::loadForRecipe(), eve::physics::ParticleTrack::loadForRecipe(), eve::physics::RigidPoseTrack::loadForRecipe() , 以及 eve::physics::CollapseAnimation::loadForRecipe().

◆ key()

Result< std::string > eve::physics::BakeRecipe::key ( ) const

Compute the noncryptographic cache key of the complete canonical recipe. @cost Linear in bounded metadata, once per admission. Not a security/authentication digest.

在文件 BakeRecipe.cpp 第 181 行定义.

引用了 eve::physics::bakedAssetContentKey(), bytes, encode(), eve::Result< T >::failure() , 以及 eve::Result< T >::success().

被这些函数引用 decode(), encode(), eve::physics::exposeCollapseBakeRecipe() , 以及 setSource().

◆ setBackend()

Result< void > eve::physics::BakeRecipe::setBackend ( std::string_view  revision)

Set the explicit backend and its revision; never infer it from the player platform.

在文件 BakeRecipe.cpp 第 75 行定义.

引用了 eve::Result< T >::failure(), revision, eve::Result< T >::success() , 以及 token.

被这些函数引用 eve::physics::exposeCollapseBakeRecipe().

◆ setCoordinates()

Result< void > eve::physics::BakeRecipe::setCoordinates ( BakeCoordinates  coordinates)

Select the producer coordinate contract; unknown values fail without changing the recipe.

在文件 BakeRecipe.cpp 第 63 行定义.

引用了 coordinates(), eve::Result< T >::failure(), eve::physics::MetresRightHandedYUp, eve::physics::PlanarPixels , 以及 eve::Result< T >::success().

◆ setParameters()

Result< void > eve::physics::BakeRecipe::setParameters ( std::string_view  bytes)

Digest complete parameter bytes, including defaults resolved by the producer. @cost Linear in bytes; do once before baking, not during capture or playback.

在文件 BakeRecipe.cpp 第 87 行定义.

引用了 eve::physics::bakedAssetContentKey(), bytes , 以及 eve::Result< T >::success().

被这些函数引用 eve::physics::exposeCollapseBakeRecipe().

◆ setProducer()

Result< void > eve::physics::BakeRecipe::setProducer ( std::string_view  revision)

Set an explicit algorithm/build revision token; invalid input leaves the builder unchanged.

在文件 BakeRecipe.cpp 第 70 行定义.

引用了 eve::Result< T >::failure(), revision, eve::Result< T >::success() , 以及 token.

被这些函数引用 eve::physics::exposeCollapseBakeRecipe().

◆ setRandomStream()

Result< void > eve::physics::BakeRecipe::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.

在文件 BakeRecipe.cpp 第 98 行定义.

引用了 eve::Result< T >::failure(), name, seed, eve::Result< T >::success() , 以及 token.

被这些函数引用 eve::physics::exposeCollapseBakeRecipe().

◆ setSource()

Result< void > eve::physics::BakeRecipe::setSource ( std::string_view  name,
std::string_view  bytes 
)

Insert or replace a named dependency digest; names are stable logical IDs, not absolute paths. @cost Linear in source bytes; do once per dependency admission, not per frame.

返回
Failure preserves prior entries. Up to 64 sources and 256 bytes per token.

在文件 BakeRecipe.cpp 第 91 行定义.

引用了 eve::physics::bakedAssetContentKey(), bytes, eve::Result< T >::failure(), key(), name, eve::Result< T >::success() , 以及 token.

被这些函数引用 eve::physics::exposeCollapseBakeRecipe().

◆ setTiming()

Result< void > eve::physics::BakeRecipe::setTiming ( float  stepSeconds,
std::uint32_t  sampleStride 
)

Set the actual finite positive simulation step in seconds and positive ticks per captured sample.

在文件 BakeRecipe.cpp 第 80 行定义.

引用了 eve::Result< T >::failure() , 以及 eve::Result< T >::success().

被这些函数引用 eve::physics::exposeCollapseBakeRecipe().

◆ validateSampleTime()

Result< void > eve::physics::BakeRecipe::validateSampleTime ( std::uint32_t  frame,
float  seconds 
) const

Validate a sample against the declared fixed-step/stride grid.

返回
Failure for nonfinite, unrepresentable or off-grid timestamps. Four float epsilons relative to max(expected time, step), capped at a quarter sample interval, tolerate producer multiplication order; frame zero must be exactly zero.

在文件 BakeRecipe.cpp 第 170 行定义.

引用了 eve::Result< T >::failure(), frame , 以及 eve::Result< T >::success().

被这些函数引用 eve::physics::bake_detail::validateDeformFrame().


该类的文档由以下文件生成: