FileDocCategorySizeDatePackage
MatrixGrabber.javaAPI DocAndroid 1.5 API1946Wed May 06 22:41:08 BST 2009com.example.android.apis.graphics.spritetext

MatrixGrabber

public class MatrixGrabber extends Object

Fields Summary
public float[]
mModelView
public float[]
mProjection
Constructors Summary
public MatrixGrabber()

        mModelView = new float[16];
        mProjection = new float[16];
    
Methods Summary
public voidgetCurrentModelView(javax.microedition.khronos.opengles.GL10 gl)
Record the current modelView matrix state. Has the side effect of setting the current matrix state to GL_MODELVIEW

param
gl

        getMatrix(gl, GL10.GL_MODELVIEW, mModelView);
    
public voidgetCurrentProjection(javax.microedition.khronos.opengles.GL10 gl)
Record the current projection matrix state. Has the side effect of setting the current matrix state to GL_PROJECTION

param
gl

        getMatrix(gl, GL10.GL_PROJECTION, mProjection);
    
public voidgetCurrentState(javax.microedition.khronos.opengles.GL10 gl)
Record the current modelView and projection matrix state. Has the side effect of setting the current matrix state to GL_MODELVIEW

param
gl

        getCurrentProjection(gl);
        getCurrentModelView(gl);
    
private voidgetMatrix(javax.microedition.khronos.opengles.GL10 gl, int mode, float[] mat)

        MatrixTrackingGL gl2 = (MatrixTrackingGL) gl;
        gl2.glMatrixMode(mode);
        gl2.getMatrix(mat, 0);