GlScene's Geometry.pas units has several procedures dealing with quaternions, I haven't used them in detail myself though.
Just a pointer, not sure if it is what you need.

luck