I don't know if you want to write this all yourself or not, but you could look at Assimp to get some ideas
assimp loads lots of 3D file types and they make it easy to extract 3D animation data. Assimp is written for a few languages and they have the source code available for download