Class BaseAnimationController
Namespace: ValveResourceFormat.Renderer
Assembly: Renderer.dll
Base class for computing animated bone poses
public class BaseAnimationControllerInheritance
object ← BaseAnimationController
Derived
Constructors
BaseAnimationController(Skeleton)
Initializes a new for the given skeleton, computing the bind pose and inverse bind pose matrices.
public BaseAnimationController(Skeleton skeleton)Parameters
skeleton Skeleton
The skeleton whose bones define the rig.
Properties
BindPose
The skeleton skinning bind pose.
public Matrix4x4[] BindPose { get; }Property Value
InverseBindPose
The skeleton inverse bind pose.
public Matrix4x4[] InverseBindPose { get; }Property Value
Pose
The flattened worldspace transform of each bone, according to the current animation frame.
public Matrix4x4[] Pose { get; }Property Value
Skeleton
The skeleton being animated.
public Skeleton Skeleton { get; }Property Value
Methods
GetBoneMatricesRecursive(Bone, Matrix4x4, Frame?, Span<Matrix4x4>)
Recursively computes the world-space transformation matrix for each bone in the hierarchy.
protected static void GetBoneMatricesRecursive(Bone bone, Matrix4x4 parent, Frame? frame, Span<Matrix4x4> boneMatrices)Parameters
bone Bone
The current bone to process.
parent Matrix4x4
The parent's world-space transformation matrix.
frame Frame?
The animation frame containing bone transforms, or null to use bind pose.
The output array to store computed bone matrices.
GetInverseBindPoseRecursive(Bone, Matrix4x4, Span<Matrix4x4>)
Recursively computes the inverse bind pose matrix for each bone in the hierarchy.
protected static void GetInverseBindPoseRecursive(Bone bone, Matrix4x4 parent, Span<Matrix4x4> boneMatrices)Parameters
bone Bone
The current bone to process.
parent Matrix4x4
The accumulated inverse bind pose from the parent.
The output array to store computed inverse bind pose matrices.
GetSkinningMatrices(Span<Matrix4x4>)
Get bone matrices in bindpose space. Bones that do not move from the original location will have an identity matrix. Thus there will be no transformation in the vertex shader.
public void GetSkinningMatrices(Span<Matrix4x4> modelBones)Parameters
Update(float)
Updates the animation controller, advancing the animation by the given time step.
public virtual bool Update(float timeStep)Parameters
timeStep float
Elapsed time in seconds since the last update.

