载入中...
搜索中...
未找到
HairDynamicBones.cpp
浏览该文件的文档.
44 Diagnostic::error(DiagnosticCode::InvalidArgument, diag ? std::string(diag->message()) : added.status().describe(), "hair.chains[" + std::to_string(i) + "]"));
Stable, structured diagnostics shared by engine modules.
A structured explanation of a failed, degraded, or noteworthy result.
Definition Diagnostic.h:94
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
3D bone hierarchy + bind-pose local TRS for skeletal animation. Independent of ik::Skeleton3D (FABRIK...
Definition AnimSkeleton.h:16
World-space spring-chain solver that writes results as local bone rotations.
Definition DynamicBoneSolver.h:37
AnimSkeleton * getSkeleton() const
Return the borrowed skeleton, or null. @ownership Borrowed; ownership remains with the animation sour...
Definition DynamicBoneSolver.h:55
void setChainSelfCollision(int chainIndex, bool enabled)
Enable or disable non-adjacent particle self-collision for a chain.
Definition DynamicBoneSolver.cpp:88
void setChainEndLength(int chainIndex, float length)
Add a virtual particle after the last bone along the animated terminal direction.
Definition DynamicBoneSolver.cpp:97
void addBoneColliderSphere(int boneIndex, float offsetX, float offsetY, float offsetZ, float radius)
Add a sphere collider following a bone-local offset.
Definition DynamicBoneSolver.cpp:110
int addChainByName(const std::string &rootBone, const std::string &endBone, float stiffness, float damping, float inertia, float gravityScale=1.f, float radius=0.f, int iterations=4)
Name-based addChain variant; returns -1 for invalid input.
Definition DynamicBoneSolver.cpp:79
Convenience helpers for hair/tail/accessory spring chains on DynamicBoneSolver.
Definition HairDynamicBones.cpp:7
Result< int > addHeadCollider(DynamicBoneSolver &solver, const std::string &boneName, float radius, float offsetX, float offsetY, float offsetZ)
Attach a bone-following sphere collider (typically the head) for hair chains.
Definition HairDynamicBones.cpp:50
Result< void > setupChains(DynamicBoneSolver &solver, const std::vector< ChainDesc > &chains, bool clearFirst)
Replace or append hair chains.
Definition HairDynamicBones.cpp:36
Result< int > addChain(DynamicBoneSolver &solver, const ChainDesc &desc)
Add one hair/tail chain by bone name.
Definition HairDynamicBones.cpp:17
@ InvalidArgument
One named spring chain with game-friendly hair defaults.
Definition HairDynamicBones.h:23