Owned scalar animation curves indexed by stable source and channel names. 更多...
#include <AnimCurveLibrary.h>
类 | |
| struct | Impl |
Public 成员函数 | |
| AnimCurveLibrary () | |
| Construct an empty library with independent lifetime. | |
| ~AnimCurveLibrary () | |
| Destroy owned curve data without accessing external objects. | |
| AnimCurveLibrary (const AnimCurveLibrary &)=delete | |
| AnimCurveLibrary & | operator= (const AnimCurveLibrary &)=delete |
| eve::Result< void > | load (std::span< const std::byte > bytes) |
| Atomically replace data from little-endian eve.animation-curves/1 bytes. | |
| bool | contains (std::string_view source) const |
| Query whether a source record exists, including records without channels. | |
| std::size_t | size () const noexcept |
| Return the number of source records currently owned. | |
| 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. | |
详细描述
Owned scalar animation curves indexed by stable source and channel names.
Contains no skeleton, clip, filesystem or script references. Mutations are owner-thread only, with no callbacks or reentrancy. Concurrent const sampling is allowed while the owner guarantees no load/destruction. Samples use injected time.
在文件 AnimCurveLibrary.h 第 17 行定义.
构造及析构函数说明
◆ AnimCurveLibrary() [1/2]
| eve::animation::AnimCurveLibrary::AnimCurveLibrary | ( | ) |
Construct an empty library with independent lifetime.
在文件 AnimCurveLibrary.cpp 第 62 行定义.
◆ ~AnimCurveLibrary()
|
default |
Destroy owned curve data without accessing external objects.
◆ AnimCurveLibrary() [2/2]
|
delete |
成员函数说明
◆ contains()
| bool eve::animation::AnimCurveLibrary::contains | ( | std::string_view | source | ) | const |
Query whether a source record exists, including records without channels.
在文件 AnimCurveLibrary.cpp 第 108 行定义.
引用了 source.
◆ load()
| eve::Result< void > eve::animation::AnimCurveLibrary::load | ( | std::span< const std::byte > | bytes | ) |
Atomically replace data from little-endian eve.animation-curves/1 bytes.
- 参数
-
bytes Borrowed for this synchronous call only; decoded values are owned.
- 返回
- Applied, or InvalidArgument preserving all previous data. Rejects unknown versions, trailing bytes, invalid UTF-8, duplicates, nonfinite/unsorted keys and resource limits. Empty channels are absent; endpoints must span clip duration.
在文件 AnimCurveLibrary.cpp 第 64 行定义.
引用了 eve::Applied, bytes, clip, count, error, eve::Result< T >::failure(), key, name, source, eve::Status::success() , 以及 eve::Result< T >::success().
◆ operator=()
|
delete |
◆ sample()
| eve::Result< std::optional< float > > eve::animation::AnimCurveLibrary::sample | ( | std::string_view | source, |
| std::string_view | channel, | ||
| double | seconds, | ||
| bool | loop | ||
| ) | const |
Evaluate one scalar channel with linear interpolation.
- 参数
-
source Borrowed stable source name; never retained. channel Borrowed channel name; never retained. seconds Finite simulation time; looping wraps negative time too, otherwise clamps. loop Whether to wrap at the source duration. No external clip state is read.
- 返回
- Owning optional value (empty for an absent channel), NotFound for an unknown source, or InvalidArgument for nonfinite time. No state is mutated; repeat calls are deterministic within float rounding tolerance.
在文件 AnimCurveLibrary.cpp 第 110 行定义.
引用了 a, b, clip, curve, end, eve::Diagnostic::error(), eve::Result< T >::failure(), found, key, loop, eve::NotFound, source, eve::Result< T >::success() , 以及 time.
◆ size()
|
noexcept |
Return the number of source records currently owned.
在文件 AnimCurveLibrary.cpp 第 109 行定义.
该类的文档由以下文件生成:
- src/modules/animation/AnimCurveLibrary.h
- src/modules/animation/AnimCurveLibrary.cpp