Class PMVMatrix

  • All Implemented Interfaces:
    GLMatrixFunc

    public final class PMVMatrix
    extends Object
    implements GLMatrixFunc
    PMVMatrix implements a subset of the fixed function pipeline regarding the projection (P), modelview (Mv) matrix operation which is specified in GLMatrixFunc.

    Further more, PMVMatrix provides the inverse modelview matrix (Mvi) and inverse transposed modelview matrix (Mvit). Frustum is also provided by glGetFrustum(). To keep these derived values synchronized after mutable Mv operations like glRotatef(..) in glMatrixMode(GL_MODELVIEW), users have to call update() before using Mvi and Mvit.

    All matrices are provided in column-major order, as specified in the OpenGL fixed function pipeline, i.e. compatibility profile. See FloatUtil.

    PMVMatrix can supplement GL2ES2 applications w/ the lack of the described matrix functionality.

    Matrix storage details

    All matrices are backed up by a common primitive float-array for performance considerations and are a sliced representation of it.

    Note:

    • The matrix is a sliced part of a host matrix and it's start position has been marked.
    • Use reset() to rewind it to it's start position after relative operations, like get().
    • If using absolute operations like get(int), use it's reset position as it's offset.