|
|
请问为什么Ogre的平移矩阵是这样的?坐标系不同?
/** Builds a translation matrix
*/
inline void makeTrans( const Vector3& v )
{
m[0][0] = 1.0; m[0][1] = 0.0; m[0][2] = 0.0; m[0][3] = v.x;
m[1][0] = 0.0; m[1][1] = 1.0; m[1][2] = 0.0; m[1][3] = v.y;
m[2][0] = 0.0; m[2][1] = 0.0; m[2][2] = 1.0; m[2][3] = v.z;
m[3][0] = 0.0; m[3][1] = 0.0; m[3][2] = 0.0; m[3][3] = 1.0;
}
注:微软标准平移矩阵
平移矩阵(Translation Matrix)
[ 1, 0, 0, 0]
[ 0, 1, 0, 0]
[ 0, 0, 1, 0]
[tx, ty, tz, 1]
D3DXMatrixTranslation |
|