This is a sample code to create an animation from matrices. Use HPS::MatrixKit::Decompose
to get a translation and rotation from that matrix, then make a keyframe for each of those values that occur at tick X and append them to their respective channel's keyframe arrays.
https://docs.techsoft3d.com/hps/latest/build/prog_guide/0306_animation.html#toc_rotation_animationshtml?
Language: C++ / mfc_sandbox
...