public void put3x3(Matrix3x2f m, long destAddr) {
UNSAFE.putLong( null, destAddr, UNSAFE.getLong(m, Matrix3x2f_m00));
UNSAFE.putInt( null, destAddr+8, 0);
UNSAFE.putLong( null, destAddr+12, UNSAFE.getLong(m, Matrix3x2f_m00+8));
UNSAFE.putInt( null, destAddr+20, 0);
UNSAFE.putLong( null, destAddr+24, UNSAFE.getLong(m, Matrix3x2f_m00+16));
UNSAFE.putFloat(null, destAddr+32, 0.0f); // Wrong??? Should be 1.0f ???
}
However, I believe that the bottom right corner of the matrix should be 1.0f, not 0.0f.
See my comment in the code above.
This has the effect of ignoring translations when two matrices are multiplied together.
FYI, the MemUtilNIO implementation does put 1.0f in the bottom right :
In MemUtilUnsafe :
However, I believe that the bottom right corner of the matrix should be 1.0f, not 0.0f. See my comment in the code above. This has the effect of ignoring translations when two matrices are multiplied together.
FYI, the MemUtilNIO implementation does put 1.0f in the bottom right :