Compiled rig with an owned skeleton snapshot and indexed solve schedule. @ownership Owns all retained inputs. Returned pose/transform values are independent. @thread One owner thread per instance; independent instances may evaluate concurrently. @reentrancy No callbacks. Inputs are borrowed only for each synchronous call. 更多...
#include <ControlRig.h>
类 | |
| struct | Impl |
Public 成员函数 | |
| ~ControlRig () | |
| Destroy the owned compiled program and skeleton. | |
| ControlRig (const ControlRig &)=delete | |
| ControlRig & | operator= (const ControlRig &)=delete |
| Result< void > | evaluate (double seconds, const AnimPose &input, AnimPose &output, const std::vector< TransformTRS > &overrides={}) const |
| Evaluate controls at seconds over input pose, publishing output only on success. | |
| Result< std::vector< TransformTRS > > | sampleControls (double seconds) const |
| Sample parent-local control transforms in declaration order; returns owning values. | |
| Result< std::vector< TransformTRS > > | controlWorlds (const std::vector< TransformTRS > &locals) const |
| Convert validated local controls to model space in declaration order. | |
| Result< TransformTRS > | localFromWorld (int index, const TransformTRS &world, double seconds) const |
| Convert a model-space edit into the control's sampled parent space. | |
| Result< std::vector< TransformTRS > > | matchFK (const AnimPose &pose) const |
| Match unique full-weight FK controls to a pose; rejects non-FK or ambiguous graphs. | |
| Result< std::unique_ptr< AnimClip > > | bake (double sampleRate, const AnimPose &input) const |
| Bake sampled rig output into a new caller-owned clip; no live clip is mutated. @cost Offline work proportional to frames times solve nodes/bones; reuse the returned clip. | |
静态 Public 成员函数 | |
| static Result< std::unique_ptr< ControlRig > > | compile (const RigDefinition &definition, const AnimSkeleton &skeleton) |
| Validate and compile an owning rig snapshot; failure publishes nothing. @cost Higher than evaluation; name resolution and graph sorting amortized per document revision. | |
详细描述
Compiled rig with an owned skeleton snapshot and indexed solve schedule. @ownership Owns all retained inputs. Returned pose/transform values are independent. @thread One owner thread per instance; independent instances may evaluate concurrently. @reentrancy No callbacks. Inputs are borrowed only for each synchronous call.
Controls use positive uniform scale to avoid unrepresentable shear. Compilation resolves names; evaluation uses indices. Time is supplied explicitly, clamped to duration.
在文件 ControlRig.h 第 76 行定义.
构造及析构函数说明
◆ ~ControlRig()
|
default |
Destroy the owned compiled program and skeleton.
◆ ControlRig()
|
delete |
成员函数说明
◆ bake()
◆ compile()
|
static |
Validate and compile an owning rig snapshot; failure publishes nothing. @cost Higher than evaluation; name resolution and graph sorting amortized per document revision.
在文件 ControlRig.cpp 第 79 行定义.
引用了 a, active, bindings, eve::animation::AnimSkeleton::bindLocal(), bone, c, eve::animation::constrainRigControl(), eve::animation::rig_detail::controlIndex(), eve::animation::rig_detail::controlOrder(), d, eve::animation::AnimSkeleton::findBone(), eve::animation::FK, eve::animation::Free, eve::animation::AnimSkeleton::getBoneCount(), eve::animation::AnimSkeleton::getBoneName(), eve::animation::AnimSkeleton::getParent(), index, key, n, name, order, p, parent, t, tip, eve::animation::TwoBoneIK, valid, eve::animation::validateRigDefinition() , 以及 eve::animation::rig_detail::validTRS().
◆ controlWorlds()
| Result< std::vector< TransformTRS > > eve::animation::ControlRig::controlWorlds | ( | const std::vector< TransformTRS > & | locals | ) | const |
Convert validated local controls to model space in declaration order.
在文件 ControlRig.cpp 第 186 行定义.
引用了 eve::animation::constrainRigControl(), error, eve::animation::detail::mulTRS(), parent, t, eve::animation::rig_detail::validTRS() , 以及 worlds.
被这些函数引用 evaluate(), localFromWorld() , 以及 matchFK().
◆ evaluate()
| Result< void > eve::animation::ControlRig::evaluate | ( | double | seconds, |
| const AnimPose & | input, | ||
| AnimPose & | output, | ||
| const std::vector< TransformTRS > & | overrides = {} |
||
| ) | const |
Evaluate controls at seconds over input pose, publishing output only on success.
- 参数
-
overrides Optional complete parent-local control array; empty samples authored tracks.
- 返回
- Structured diagnostic for incompatible pose, degenerate solve or invalid time/TRS.
在文件 ControlRig.cpp 第 208 行定义.
引用了 eve::animation::Aim, eve::animation::AnimPose::aimBone(), eve::animation::blendTRS(), bone, eve::animation::AnimPose::computeWorld(), eve::animation::constrainRigControl(), controlWorlds(), eve::animation::AnimPose::copyFrom(), eve::Result< T >::failure(), eve::animation::FK, eve::animation::AnimPose::getBoneCount(), input, local, eve::animation::AnimPose::local(), n, output, parent, relative, sampleControls(), eve::animation::AnimPose::solveTwoBoneIK(), eve::Result< T >::success(), target, eve::animation::rig_detail::validTRS(), eve::animation::AnimPose::world() , 以及 worlds.
被这些函数引用 bake().
◆ localFromWorld()
| Result< TransformTRS > eve::animation::ControlRig::localFromWorld | ( | int | index, |
| const TransformTRS & | world, | ||
| double | seconds | ||
| ) | const |
Convert a model-space edit into the control's sampled parent space.
在文件 ControlRig.cpp 第 254 行定义.
引用了 eve::animation::constrainRigControl(), controlWorlds(), eve::Result< T >::failure(), index, parent, relative, sampleControls(), eve::animation::rig_detail::validTRS() , 以及 worlds.
◆ matchFK()
| Result< std::vector< TransformTRS > > eve::animation::ControlRig::matchFK | ( | const AnimPose & | pose | ) | const |
Match unique full-weight FK controls to a pose; rejects non-FK or ambiguous graphs.
在文件 ControlRig.cpp 第 266 行定义.
引用了 bones, eve::animation::AnimPose::computeWorld(), eve::animation::constrainRigControl(), controlWorlds(), eve::animation::AnimPose::copyFrom(), error, eve::animation::FK, eve::animation::AnimPose::getBoneCount(), n, pose, relative, sampleControls(), eve::animation::rig_detail::validTRS(), eve::animation::AnimPose::world() , 以及 worlds.
◆ operator=()
|
delete |
◆ sampleControls()
| Result< std::vector< TransformTRS > > eve::animation::ControlRig::sampleControls | ( | double | seconds | ) | const |
Sample parent-local control transforms in declaration order; returns owning values.
在文件 ControlRig.cpp 第 159 行定义.
引用了 a, eve::animation::blendTRS(), c, eve::animation::constrainRigControl(), result , 以及 t.
被这些函数引用 evaluate(), localFromWorld() , 以及 matchFK().
该类的文档由以下文件生成:
- src/modules/animation/ControlRig.h
- src/modules/animation/ControlRig.cpp