Example usage for android.opengl Matrix transposeM

List of usage examples for android.opengl Matrix transposeM

Introduction

In this page you can find the example usage for android.opengl Matrix transposeM.

Prototype

public static void transposeM(float[] mTrans, int mTransOffset, float[] m, int mOffset) 

Source Link

Document

Transposes a 4 x 4 matrix.

Usage

From source file:Main.java

public static float[] transposeMatrix(float[] m) {
    float[] mTrans = new float[m.length];
    Matrix.transposeM(mTrans, 0, m, 0);
    return mTrans;
}

From source file:Main.java

public static float[] multMatrix(float[] m1, float[] m2) {
    // TODO/*from  w w w .  ja v a  2  s. c o  m*/
    float[] m1i = new float[16];
    Matrix.transposeM(m1i, 0, m1, 0);
    float[] m2i = new float[16];
    Matrix.transposeM(m2i, 0, m2, 0);
    float[] m3 = new float[16];

    Matrix.multiplyMM(m3, 0, m1i, 0, m2i, 0);

    float[] m3i = new float[16];
    Matrix.transposeM(m3i, 0, m3, 0);
    return m3i;
}

From source file:Main.java

public static float[] inverseMatrix(float[] m1) {
    float[] m2 = new float[16];
    float[] m1i = new float[16];
    Matrix.transposeM(m1i, 0, m1, 0);

    Matrix.invertM(m2, 0, m1i, 0);//from  w w w. j a  v  a  2  s . co  m

    float[] m2i = new float[16];
    Matrix.transposeM(m2i, 0, m2, 0);
    return m2i;
}

From source file:Main.java

public static float[] multMatrixVector(float[] m1, float[] m2) {
    // TODO/*from  w  w  w.ja  v  a 2 s.  co  m*/
    float[] m3 = new float[4];
    float[] m1i = new float[16];
    Matrix.transposeM(m1i, 0, m1, 0);

    Matrix.multiplyMV(m3, 0, m1i, 0, m2, 0);

    return m3;
}