Class TwoBoneSolver
Namespace: ValveResourceFormat.Animation
Assembly: ValveResourceFormat.dll
Two-bone inverse kinematics.
public static class TwoBoneSolverInheritance
object ← TwoBoneSolver
Methods
HasChain(Skeleton, int)
Whether a bone has the parent and grandparent that form the chain to solve.
public static bool HasChain(Skeleton skeleton, int effectorBoneIdx)Parameters
skeleton Skeleton
effectorBoneIdx int
Returns
bool
Solve(Pose, int, FrameBone, float, IKBlendMode, float)
Solves the two bone chain ending in the effector towards the target, in place on the pose. The chain rotation weight picks how the effector rotation is solved: 0 fully rotates the effector, 1 rotates the chain.
public static void Solve(Pose pose, int effectorBoneIdx, FrameBone targetTransform, float chainRotationWeight = 0, IKBlendMode blendMode = IKBlendMode.Effector, float blendWeight = 1)Parameters
pose Pose
effectorBoneIdx int
targetTransform FrameBone
chainRotationWeight float
blendMode IKBlendMode
blendWeight float
Solve(Span<FrameBone>, ReadOnlySpan<FrameBone>, FrameBone, float)
Solves a three bone chain in model space towards the target, in place. Returns false for a degenerate chain.
public static bool Solve(Span<FrameBone> modelSpaceBoneTransforms, ReadOnlySpan<FrameBone> modelSpaceReferenceTransforms, FrameBone targetTransform, float chainRotationWeight)Parameters
modelSpaceBoneTransforms Span<FrameBone>
modelSpaceReferenceTransforms ReadOnlySpan<FrameBone>
targetTransform FrameBone
chainRotationWeight float
Returns
bool

