This will work if all you're concerned about is the translation part of each bone, but it is more common to represent your bone structure as a transformation matrix tree, which is probably the most popular way to do Forward Kinematics.
Node as follows:
// Computes the global transform of the node with respect to the world.
if (parent == null) return localTransform;
else return parent.ComputeGlobalTransform() * localTransform;
Link is a
Node that has mesh geometry. A
Joint is a node that connects two links, and rotates around its
class Link : Node
class Joint : Node
void SetJointAngle(float value)
// The local transform is a rotation around the Z axis by convention.
// Make sure to preserve the translation part of the transform.
You can make more complicated joints such as prismatic and ball-in-socket joints fairly easily this way. Representing your links and joints as transforms rather than just a direction and a length also disambiguates the rotation part of your skeletal animation system. It also allows you to offset links in an arbitrary way.