Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
このように四元数クラスを実装しました。クォータニオンを 3x3 回転行列に変換できますが、それをモデルビュー行列にどのように適用すればよいですか?
glMultMatrixf(GLfloat*) と glMultMatrixd(GLdouble*) はまさに必要なことを行います。唯一のことは、0 と 1 を追加して 3x3 行列 (O) を 4x4 行列 (O') に変換することです。
| 0| O' = | O 0| | 0| | 0 0 0 1|
openGL は (Fortran のように) 列優先順で行列を格納することに注意してください。