载入中...
搜索中...
未找到
AnimationCurveBindings.cpp
浏览该文件的文档.
28 "AnimCurveLibrary", std::function<AnimCurveLibrary*()>([] { return new AnimCurveLibrary(); }), true);
44 script::bindMethod(cls, "getSourceCount", [](AnimCurveLibrary* self) { return static_cast<int>(self->size()); });
Per-translation-unit VM + diagnostic-source helper for Squirrel bindings.
The single Squirrel projection for common Result, Status and Value.
Explicit Value/Owned/Borrowed semantics at the Squirrel boundary.
Owned scalar animation curves indexed by stable source and channel names.
Definition AnimCurveLibrary.h:17
eve::Result< std::optional< float > > sample(std::string_view source, std::string_view channel, double seconds, bool loop) const
Evaluate one scalar channel with linear interpolation.
Definition AnimCurveLibrary.cpp:110
std::size_t size() const noexcept
Return the number of source records currently owned.
Definition AnimCurveLibrary.cpp:109
bool contains(std::string_view source) const
Query whether a source record exists, including records without channels.
Definition AnimCurveLibrary.cpp:108
eve::Result< void > load(std::span< const std::byte > bytes)
Atomically replace data from little-endian eve.animation-curves/1 bytes.
Definition AnimCurveLibrary.cpp:64
Pins the active VM and a stable diagnostic source for one expose() TU.
Definition SquirrelBindContext.h:32
Definition Animation.cpp:58
void exposeAnimCurveLibraryBindings(ssq::Table &table)
Register the owned scalar animation curve library and checked loader.
Definition AnimationCurveBindings.cpp:25
std::unique_ptr< T > Owned
C++ owning storage used by an object factory.
Definition RuntimeRegistry.h:33
void bindMethod(ssq::Class &cls, const char *name, F &&fn)
Register one script method while keeping a literal name for Binding Contracts.
Definition SquirrelBindContext.h:130
ssq::Table projectResult(HSQUIRRELVM vm, Result< void > &&result)
Consume and project a void native Result using the common schema.
Definition SquirrelBinding.cpp:470