载入中...
搜索中...
未找到
eve::animation::hair 命名空间参考

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 
)

◆ 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().

被这些函数引用 eve::animation::Animation::setupHairHeadCollider().

◆ 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.

参数
clearFirstWhen 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().