载入中...
搜索中...
未找到
AnimCurveLibrary.cpp
浏览该文件的文档.
27 for (unsigned i = 0; i < 4; ++i) result |= std::to_integer<std::uint32_t>(bytes[offset++]) << (8 * i);
55 return eve::Diagnostic::error(eve::DiagnosticCode::InvalidArgument, message, "animationCurves", {},
108bool AnimCurveLibrary::contains(std::string_view source) const { return impl_->clips.contains(source); }
110eve::Result<std::optional<float>> AnimCurveLibrary::sample(std::string_view source, std::string_view channel,
116 return Result::failure(eve::Diagnostic::error(eve::DiagnosticCode::NotFound, "animation curve source not found",
std::map< std::string, std::vector< Key >, std::less<> > channels
Definition AnimCurveLibrary.cpp:19
Strict allocation-free UTF-8 validation.
A structured explanation of a failed, degraded, or noteworthy result.
Definition Diagnostic.h:94
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
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
static Status success(StatusCode code=StatusCode::Ok)
Construct a successful status with an explicit non-error outcome.
Definition Status.h:81
AnimCurveLibrary()
Construct an empty library with independent lifetime.
Definition AnimCurveLibrary.cpp:62
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
~AnimCurveLibrary()
Destroy owned curve data without accessing external objects.
Definition Animation.cpp:58
@ InvalidArgument
@ NotFound
@ Applied
bool isValidUtf8(std::string_view text, Utf8NullPolicy nullPolicy) noexcept
Validate shortest-form UTF-8, Unicode scalar range and optional NUL exclusion.
Definition Utf8Validation.cpp:5
@ Reject
Definition Container.h:602
std::map< std::string, Clip, std::less<> > clips
Definition AnimCurveLibrary.cpp:60