Paired-foot IK with contact smoothing and pelvis compensation. 更多...
#include <FootIKSolver.h>
Public 成员函数 | |
| FootIKSolver (AnimSkeleton *skeleton) | |
| Construct for a non-null borrowed skeleton. | |
| ~FootIKSolver () | |
| Foot ik solver. | |
| FootIKSolver (const FootIKSolver &)=default | |
| Foot ik solver. | |
| FootIKSolver & | operator= (const FootIKSolver &)=default |
| Operator =. | |
| void | setSkeleton (AnimSkeleton *skeleton) |
| Rebind; changing skeleton clears all bone-index configuration. | |
| AnimSkeleton * | getSkeleton () const |
| Return the borrowed skeleton, or null. @ownership Borrowed; ownership remains with the animation source. @lifetime Valid until setSkeleton(), skeleton destruction, or solver destruction. | |
| void | setPelvisBone (int bone) |
| Configure the pelvis bone. | |
| void | configureLeftLeg (int hip, int knee, int foot, float soleOffset=0.f) |
| Configure the left hip-knee-foot chain and sole offset. | |
| void | configureRightLeg (int hip, int knee, int foot, float soleOffset=0.f) |
| Configure the right hip-knee-foot chain and sole offset. | |
| void | configureLeftToe (int toe, float soleOffset=0.f) |
| Configure an optional left toe child and its sole offset. | |
| void | configureRightToe (int toe, float soleOffset=0.f) |
| Configure an optional right toe child and its sole offset. | |
| void | setGroundProvider (const FootIKGroundProvider *provider) |
| Set an optional automatic ground-query provider. @ownership Borrowed; ownership remains with the caller. @lifetime The provider must outlive this solver or be cleared before destruction. | |
| const FootIKGroundProvider * | getGroundProvider () const |
| Return the borrowed ground provider, or null. @ownership Borrowed; ownership remains with the caller. @lifetime Valid until setGroundProvider(), provider destruction, or solver destruction. | |
| void | setGroundQuery (float startHeight, float distance) |
| Set ray origin height and downward query distance. | |
| void | setLeftContact (bool hit, float x, float y, float z, float nx, float ny, float nz, float weight=1.f) |
| Supply the left model-space ground contact. | |
| void | setRightContact (bool hit, float x, float y, float z, float nx, float ny, float nz, float weight=1.f) |
| Supply the right model-space ground contact. | |
| void | setMaxPelvisOffset (float distance) |
| Set maximum pelvis compensation distance. | |
| void | setMinGroundNormalY (float value) |
| Set minimum accepted upward normal cosine in [0, 1]. | |
| void | setPositionResponse (float value) |
| Set contact interpolation response in inverse seconds. | |
| void | setRotationResponse (float value) |
| Set foot-normal interpolation response in inverse seconds. | |
| void | setContactGraceTime (float seconds) |
| Set how long a missing automatic contact retains its prior target. | |
| void | setFootLockEnabled (bool enabled) |
| Enable or disable world-space foot locking. | |
| void | setFootLockThresholds (float enterWeight, float exitWeight) |
| Set lock enter and release contact-weight thresholds. | |
| bool | isLeftFootLocked () const |
| Return whether the left foot is currently locked. | |
| bool | isRightFootLocked () const |
| Return whether the right foot is currently locked. | |
| void | reset () |
| Clear interpolated contacts. | |
| void | apply (AnimPose *pose, float dt) |
| Apply using injected delta time and owning contact values. | |
| FootIKDebugSnapshot | debugSnapshot () const |
| Copy smoothed contacts and lock state for tooling visualization. | |
详细描述
Paired-foot IK with contact smoothing and pelvis compensation.
- 注解
- Main-thread only. The borrowed skeleton must outlive this object.
在文件 FootIKSolver.h 第 32 行定义.
构造及析构函数说明
◆ FootIKSolver() [1/2]
|
explicit |
Construct for a non-null borrowed skeleton.
在文件 FootIKSolver.cpp 第 15 行定义.
◆ ~FootIKSolver()
|
default |
Foot ik solver.
◆ FootIKSolver() [2/2]
|
default |
Foot ik solver.
成员函数说明
◆ apply()
| void eve::animation::FootIKSolver::apply | ( | AnimPose * | pose, |
| float | dt | ||
| ) |
Apply using injected delta time and owning contact values.
在文件 FootIKSolver.cpp 第 112 行定义.
引用了 eve::animation::AnimSkeleton::getBoneCount(), eve::animation::Leg, offset, p , 以及 pose.
◆ configureLeftLeg()
| void eve::animation::FootIKSolver::configureLeftLeg | ( | int | hip, |
| int | knee, | ||
| int | foot, | ||
| float | soleOffset = 0.f |
||
| ) |
Configure the left hip-knee-foot chain and sole offset.
在文件 FootIKSolver.cpp 第 36 行定义.
◆ configureLeftToe()
| void eve::animation::FootIKSolver::configureLeftToe | ( | int | toe, |
| float | soleOffset = 0.f |
||
| ) |
Configure an optional left toe child and its sole offset.
在文件 FootIKSolver.cpp 第 43 行定义.
引用了 offset.
◆ configureRightLeg()
| void eve::animation::FootIKSolver::configureRightLeg | ( | int | hip, |
| int | knee, | ||
| int | foot, | ||
| float | soleOffset = 0.f |
||
| ) |
Configure the right hip-knee-foot chain and sole offset.
在文件 FootIKSolver.cpp 第 37 行定义.
◆ configureRightToe()
| void eve::animation::FootIKSolver::configureRightToe | ( | int | toe, |
| float | soleOffset = 0.f |
||
| ) |
Configure an optional right toe child and its sole offset.
在文件 FootIKSolver.cpp 第 44 行定义.
引用了 offset.
◆ debugSnapshot()
| FootIKDebugSnapshot eve::animation::FootIKSolver::debugSnapshot | ( | ) | const |
Copy smoothed contacts and lock state for tooling visualization.
在文件 FootIKSolver.cpp 第 129 行定义.
引用了 eve::animation::FootIKDebugFoot::configured, eve::animation::FootIKDebugFoot::contact, eve::animation::Leg, eve::animation::FootIKDebugFoot::locked, eve::animation::FootIKDebugFoot::nx, eve::animation::FootIKDebugFoot::ny, eve::animation::FootIKDebugFoot::nz, eve::animation::FootIKDebugFoot::toeConfigured, eve::animation::FootIKDebugFoot::toeX, eve::animation::FootIKDebugFoot::toeY, eve::animation::FootIKDebugFoot::toeZ, eve::animation::FootIKDebugFoot::x, eve::animation::FootIKDebugFoot::y , 以及 eve::animation::FootIKDebugFoot::z.
被这些函数引用 eve::animation_editing::ProceduralBoneOverlayBuilder::build().
◆ getGroundProvider()
|
inline |
Return the borrowed ground provider, or null. @ownership Borrowed; ownership remains with the caller. @lifetime Valid until setGroundProvider(), provider destruction, or solver destruction.
在文件 FootIKSolver.h 第 71 行定义.
◆ getSkeleton()
|
inline |
Return the borrowed skeleton, or null. @ownership Borrowed; ownership remains with the animation source. @lifetime Valid until setSkeleton(), skeleton destruction, or solver destruction.
在文件 FootIKSolver.h 第 49 行定义.
◆ isLeftFootLocked()
|
inline |
Return whether the left foot is currently locked.
在文件 FootIKSolver.h 第 95 行定义.
◆ isRightFootLocked()
|
inline |
Return whether the right foot is currently locked.
在文件 FootIKSolver.h 第 97 行定义.
◆ operator=()
|
default |
Operator =.
◆ reset()
| void eve::animation::FootIKSolver::reset | ( | ) |
Clear interpolated contacts.
在文件 FootIKSolver.cpp 第 66 行定义.
◆ setContactGraceTime()
| void eve::animation::FootIKSolver::setContactGraceTime | ( | float | seconds | ) |
Set how long a missing automatic contact retains its prior target.
在文件 FootIKSolver.cpp 第 63 行定义.
引用了 v.
◆ setFootLockEnabled()
| void eve::animation::FootIKSolver::setFootLockEnabled | ( | bool | enabled | ) |
◆ setFootLockThresholds()
| void eve::animation::FootIKSolver::setFootLockThresholds | ( | float | enterWeight, |
| float | exitWeight | ||
| ) |
Set lock enter and release contact-weight thresholds.
在文件 FootIKSolver.cpp 第 65 行定义.
◆ setGroundProvider()
|
inline |
Set an optional automatic ground-query provider. @ownership Borrowed; ownership remains with the caller. @lifetime The provider must outlive this solver or be cleared before destruction.
在文件 FootIKSolver.h 第 65 行定义.
◆ setGroundQuery()
| void eve::animation::FootIKSolver::setGroundQuery | ( | float | startHeight, |
| float | distance | ||
| ) |
◆ setLeftContact()
| void eve::animation::FootIKSolver::setLeftContact | ( | bool | hit, |
| float | x, | ||
| float | y, | ||
| float | z, | ||
| float | nx, | ||
| float | ny, | ||
| float | nz, | ||
| float | weight = 1.f |
||
| ) |
◆ setMaxPelvisOffset()
| void eve::animation::FootIKSolver::setMaxPelvisOffset | ( | float | distance | ) |
◆ setMinGroundNormalY()
| void eve::animation::FootIKSolver::setMinGroundNormalY | ( | float | value | ) |
◆ setPelvisBone()
| void eve::animation::FootIKSolver::setPelvisBone | ( | int | bone | ) |
Configure the pelvis bone.
在文件 FootIKSolver.cpp 第 23 行定义.
◆ setPositionResponse()
| void eve::animation::FootIKSolver::setPositionResponse | ( | float | value | ) |
◆ setRightContact()
| void eve::animation::FootIKSolver::setRightContact | ( | bool | hit, |
| float | x, | ||
| float | y, | ||
| float | z, | ||
| float | nx, | ||
| float | ny, | ||
| float | nz, | ||
| float | weight = 1.f |
||
| ) |
◆ setRotationResponse()
| void eve::animation::FootIKSolver::setRotationResponse | ( | float | value | ) |
◆ setSkeleton()
| void eve::animation::FootIKSolver::setSkeleton | ( | AnimSkeleton * | skeleton | ) |
Rebind; changing skeleton clears all bone-index configuration.
在文件 FootIKSolver.cpp 第 19 行定义.
该类的文档由以下文件生成:
- src/modules/animation/FootIKSolver.h
- src/modules/animation/FootIKSolver.cpp