Project

General

Profile

« Previous | Next » 

Revision 9f34a0f6

Added by Leszek Koltunski about 4 years ago

new VertexEffectRotate

View differences:

src/main/java/org/distorted/library/effect/MatrixEffectRotate.java
54 54
 */
55 55
  public void apply(float[] matrix, float[] uniforms, int index)
56 56
    {
57
    float alpha = uniforms[NUM_UNIFORMS*index  ];
57
    float angle = uniforms[NUM_UNIFORMS*index  ];
58 58
    float axisX = uniforms[NUM_UNIFORMS*index+1];
59 59
    float axisY = uniforms[NUM_UNIFORMS*index+2];
60 60
    float axisZ = uniforms[NUM_UNIFORMS*index+3];
......
64 64
    float z = uniforms[NUM_UNIFORMS*index+CENTER_OFFSET+2];
65 65

  
66 66
    Matrix.translateM(matrix, 0, x, y, z);
67
    Matrix.rotateM( matrix, 0, alpha, axisX, axisY, axisZ);
67
    Matrix.rotateM( matrix, 0, angle, axisX, axisY, axisZ);
68 68
    Matrix.translateM(matrix, 0,-x,-y,-z);
69 69
    }
70 70

  

Also available in: Unified diff