I implemented my quaternion class like this. I can convert the quaternion to 3×3 rotation matrix, but then how should i apply that to my modelview matrix?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
glMultMatrixf(GLfloat*) and glMultMatrixd(GLdouble*) do exactly what you need. The only thing is to convert 3×3 matrix (O) to 4×4 matrix (O’) by adding some 0 and 1:
Note that openGL stores matrices in column-major order (like in Fortran).