Summary
In this chapter, you implemented the Pose
and Clip
classes. You learned how to load the rest pose out of a glTF file, as well as how to load animation clips. You also learned how to sample an animation clip to produce a pose.
The downloadable content for this book can be found on GitHub at https://github.com/PacktPublishing/Game-Animation-Programming. The sample in Chapter09/Sample01
loads a glTF file and uses the DebugDraw
functions to draw both the rest pose and the currently animated pose. To draw a bone using debug lines, draw a line from the position of the joint to the position of its parent.
Keep in mind that not all clips animate every joint of a pose. Any time the animation clip that you are sampling changes, the post it is sampled into needs to be reset. Resetting a pose is easy—assign to it the value of the rest pose. This is demonstrated in the code samples for this chapter.
In the next chapter, you will learn how to skin an animated mesh. Once you...