Revision efaeb2a1
Added by Leszek Koltunski almost 6 years ago
src/main/java/org/distorted/library/effect/MatrixEffectQuaternion.java | ||
---|---|---|
65 | 65 |
float y = uniforms[NUM_UNIFORMS*index+5]; |
66 | 66 |
float z = uniforms[NUM_UNIFORMS*index+6]; |
67 | 67 |
|
68 |
Matrix.translateM(matrix, 0, x,-y, z);
|
|
68 |
Matrix.translateM(matrix, 0, x,-y,-z);
|
|
69 | 69 |
multiplyByQuat( matrix, qX, qY, qZ, qW); |
70 |
Matrix.translateM(matrix, 0,-x, y,-z);
|
|
70 |
Matrix.translateM(matrix, 0,-x, y, z);
|
|
71 | 71 |
} |
72 | 72 |
|
73 | 73 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/library/effect/MatrixEffectRotate.java | ||
---|---|---|
63 | 63 |
float y = uniforms[NUM_UNIFORMS*index+5]; |
64 | 64 |
float z = uniforms[NUM_UNIFORMS*index+6]; |
65 | 65 |
|
66 |
Matrix.translateM(matrix, 0, x,-y, z);
|
|
66 |
Matrix.translateM(matrix, 0, x,-y,-z);
|
|
67 | 67 |
Matrix.rotateM( matrix, 0, alpha, axisX, axisY, axisZ); |
68 |
Matrix.translateM(matrix, 0,-x, y,-z);
|
|
68 |
Matrix.translateM(matrix, 0,-x, y, z);
|
|
69 | 69 |
} |
70 | 70 |
|
71 | 71 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Make Matrix effects Rotate and Quaternion actually correct when it comes to the Z-axis. Also corresponding adjustments in apps.