く、腐ってやがる...

quat の掛け算を書くのが面倒だったので、nv_math からコピッて来ようと思ったが、実験してみたところD3DXQUATERNIONと掛け算の結果が違う...。調べてみると、

Microsoft DirectX 8.1 (C++) help "D3DXQuaternionMultiply" より

The result represents the rotation Q2 followed by the rotation Q1 (Out = Q2 * Q1). The output is actually Q2*Q1 (not Q1*Q2). This is done so that D3DXQuaternionMultiply maintain the same semantics as D3DXMatrixMultiply because unit quaternions can be considered as another way to represent rotation matrices.

ぐぬ〜!!!今度は D3DX に裏切られた。まあ、ここらへんは「好み」の問題ではあるが、「素直」が一番だと思う。