Today, I received a free license of gDEBugger, an OpenGL debugging and profiling application, from its actual vendor Graphic Remedy. Here I'd like to appreciate Yaki Tebeka (co-founder and chief technical officer of the company) for his kind offer.
Let v denote the vertex position in reference space (the parent bone's local space), and let Mi denote the bone-to-world transformation matrix, then the skinned vertex position v' is given by the expression above; where, wi is the associated weight, and Mrefi-1 is the inverse of the reference transformation matrix.
Since all the bone data defined in the Reference SMD is given by in their parents' local spaces, first of all, I transform all of the bones' local transformation matrices into the bone-to-world transformation matrices (these are Mrefi in the expression). Then I calculate the Mrefi-1 in order to transform the vertex from the model space into the parent's local space, because the bone transformation matrix Mi attached to the keyframe of the animation is also a bone-to-world, 4x4 affine transformation matrix.