The above code looks like a version of the constructor for a Matrix object that initializes the i,j,k vectors of the Matrix object from the given Quat object. I'm guessing it is just computing the rotation matrix that corresponds to the quaternion... but I don't know enough about quaternions to verify that statement... ;-)
Hope this helps...
Hope this helps...