Convenience helpers for hair/tail/accessory spring chains on DynamicBoneSolver. 更多...
类 | |
| struct | ChainDesc |
| One named spring chain with game-friendly hair defaults. 更多... | |
函数 | |
| Result< int > | addChain (DynamicBoneSolver &solver, const ChainDesc &desc) |
| Add one hair/tail chain by bone name. | |
| Result< void > | setupChains (DynamicBoneSolver &solver, const std::vector< ChainDesc > &chains, bool clearFirst=true) |
| Replace or append hair chains. | |
| Result< int > | addHeadCollider (DynamicBoneSolver &solver, const std::string &boneName, float radius=0.12f, float offsetX=0.f, float offsetY=0.f, float offsetZ=0.f) |
| Attach a bone-following sphere collider (typically the head) for hair chains. | |
详细描述
Convenience helpers for hair/tail/accessory spring chains on DynamicBoneSolver.
This is the recommended path for card-based hair motion (guide bones), not strand simulation. Graphics never includes this header — sample bone positions in avatar/ script code and feed card meshes separately.
函数说明
◆ addChain()
| EVENGINE_API_WORLD Result< int > eve::animation::hair::addChain | ( | DynamicBoneSolver & | solver, |
| const ChainDesc & | desc | ||
| ) |
Add one hair/tail chain by bone name.
- 返回
- Chain index on success.
在文件 HairDynamicBones.cpp 第 17 行定义.
引用了 eve::animation::DynamicBoneSolver::addChainByName(), desc, eve::animation::DynamicBoneSolver::setChainEndLength(), eve::animation::DynamicBoneSolver::setChainSelfCollision() , 以及 eve::Result< T >::success().
被这些函数引用 setupChains() , 以及 eve::animation::Animation::setupHairChain().
◆ addHeadCollider()
| EVENGINE_API_WORLD Result< int > eve::animation::hair::addHeadCollider | ( | DynamicBoneSolver & | solver, |
| const std::string & | boneName, | ||
| float | radius = 0.12f, |
||
| float | offsetX = 0.f, |
||
| float | offsetY = 0.f, |
||
| float | offsetZ = 0.f |
||
| ) |
Attach a bone-following sphere collider (typically the head) for hair chains.
- 返回
- Collider count after add, or failure when the bone cannot be resolved.
在文件 HairDynamicBones.cpp 第 50 行定义.
引用了 eve::animation::DynamicBoneSolver::addBoneColliderSphere(), bone, eve::animation::AnimSkeleton::findBone(), eve::animation::DynamicBoneSolver::getColliderCount(), eve::animation::DynamicBoneSolver::getSkeleton(), offsetX, offsetY, radius , 以及 eve::Result< T >::success().
◆ setupChains()
| EVENGINE_API_WORLD Result< void > eve::animation::hair::setupChains | ( | DynamicBoneSolver & | solver, |
| const std::vector< ChainDesc > & | chains, | ||
| bool | clearFirst = true |
||
| ) |
Replace or append hair chains.
- 参数
-
clearFirst When true, clears existing chains before adding.
在文件 HairDynamicBones.cpp 第 36 行定义.
引用了 addChain(), eve::animation::DynamicBoneSolver::clearChains(), eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::Diagnostic::message() , 以及 eve::Result< T >::success().