1 0 0 x
0 1 0 y
0 0 1 z
0 0 0 1
But in my program I use method like this:
public static final float[] translation(float x, float y, float z) {
// 4x4 translation matrix.
return new float[] {
1.0f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f,
x, y, z, 1.0f,
};
}And it works until I try to change x, y, z position to last column.
Does this have to do with the fact that I use 1D array and not 2D? Does each row in this array represents a column when passed to opengl methods?
Thank you,
Martin






