Basic setting of tranformation matrix in P3D
in
Programming Questions
•
1 year ago
Does anyone know, why the transformation matrix isn't empty at the beginning of a program? If I do the following:
I get this result:
( 1.0 , 0.0 , 0.0 , -50.0 )
( 0.0 , 1.0 , 0.0 , -50.0 )
( 0.0 , 0.0 , 1.0 , -86.60254 )
( 0.0 , 0.0 , 0.0 , 1.0 )
I would expect, that the translation column is zero (except the last entry) but there are values of -50,-50,-86.
Why is it like this?
- size(100,100,P3D);
- PMatrix3D pm = (PMatrix3D) getMatrix();
println("( "+pm.m00+" , "+pm.m01+" , "+pm.m02+" , "+pm.m03+" )");
println("( "+pm.m10+" , "+pm.m11+" , "+pm.m12+" , "+pm.m13+" )");
println("( "+pm.m20+" , "+pm.m21+" , "+pm.m22+" , "+pm.m23+" )");
println("( "+pm.m30+" , "+pm.m31+" , "+pm.m32+" , "+pm.m33+" )");
I get this result:
( 1.0 , 0.0 , 0.0 , -50.0 )
( 0.0 , 1.0 , 0.0 , -50.0 )
( 0.0 , 0.0 , 1.0 , -86.60254 )
( 0.0 , 0.0 , 0.0 , 1.0 )
I would expect, that the translation column is zero (except the last entry) but there are values of -50,-50,-86.
Why is it like this?
1