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.
All matrices are backed up by a common primitive float-array for performance considerations
and are a sliced representation of it.
Note:
| Modifier and Type | Field and Description |
|---|---|
| public static final int | DIRTY_ALL
Bit value stating all is dirty |
| public static final int | DIRTY_FRUSTUM
Bit value stating a dirty |
| public static final int | DIRTY_INVERSE_MODELVIEW
Bit value stating a dirty |
| public static final int | DIRTY_INVERSE_TRANSPOSED_MODELVIEW
Bit value stating a dirty |
| private int | |
| private Frustum | |
| private final float[] | |
| private final float[] | |
| private final float[] | |
| private final float[] | |
| private int | |
| private final FloatBuffer | |
| private final FloatBuffer | |
| private final FloatBuffer | |
| private final FloatStack | |
| private final FloatBuffer | |
| private final FloatBuffer | |
| private final FloatBuffer | |
| private final FloatBuffer | |
| private final FloatStack | |
| private final FloatBuffer | |
| private final FloatStack | |
| private final float[] | |
| private final int | |
| public static final int | MODIFIED_ALL
Bit value stating all is modified |
| public static final int | MODIFIED_MODELVIEW
Bit value stating a modified |
| public static final int | MODIFIED_PROJECTION
Bit value stating a modified |
| public static final int | MODIFIED_TEXTURE
Bit value stating a modified |
| private int | |
| private final int | |
| private static final String | |
| private final int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final void | clearAllUpdateRequests()
Clears all |
| public final int | getDirtyBits()
Deprecated
Function is exposed for debugging purposes only.
Returns the dirty bits due to mutable operations.
|
| public final int | getModifiedBits(final boolean
if true, clears the modified bits, otherwise leaves them untouched. clear)Returns the modified bits due to mutable operations.. |
| public final int | getRequestMask()
Deprecated
Function is exposed for debugging purposes only.
Returns the request bit mask, which uses bit values equal to the dirty mask.
|
| public final void | glFrustumf(final float left, final float right, final float bottom, final float top, final float zNear, final float zFar)
Implements com. Multiply the current matrix with the frustum matrix.
|
| public final void | glGetFloatv(final int matrixGetName, final FloatBuffer
the FloatBuffer's position remains unchanged,
which is the same behavior than the native JOGL GL impl params)Implements com. |
| public final void | glGetFloatv(final int matrixGetName, final float[]
storage params, final int storage offset params_offset)Implements com. |
| public final Frustum | |
| public final void | glGetIntegerv(final int
GL_MATRIX_MODE to receive the current matrix modethe FloatBuffer's position remains unchanged
which is the same behavior than the native JOGL GL impl params)Implements com. |
| public final void | glGetIntegerv(final int pname, final int[] params, final int params_offset)
Implements com. |
| public final FloatBuffer | |
| public final FloatBuffer | Returns: the named matrix, not a copy!Either a matrix-get-name, i.e.
matrixName)GL_MODELVIEW_MATRIX, GL_PROJECTION_MATRIX or GL_TEXTURE_MATRIX,
or a matrix-mode-name, i.e.
GL_MODELVIEW, GL_PROJECTION or GL_TEXTURE
|
| public final int | |
| public final FloatBuffer | |
| public final FloatBuffer | |
| public final FloatBuffer | |
| public final FloatBuffer | |
| public final FloatBuffer | |
| public final FloatBuffer | |
| public final FloatBuffer | |
| public final FloatBuffer | |
| public final void | glLoadIdentity()
Implements com. |
| public final void | glLoadMatrix(final Quaternion quat)
Load the current matrix with the values of the given |
| public final void | glLoadMatrixf(final float[] values, final int offset)
Implements com. |
| public final void | glLoadMatrixf(final FloatBuffer
the FloatBuffer's position remains unchanged,
which is the same behavior than the native JOGL GL impl m)Implements com. |
| public final void | glMatrixMode(final int matrixName)
Implements com. |
| public final void | glMultMatrixf(final FloatBuffer
the FloatBuffer's position remains unchanged,
which is the same behavior than the native JOGL GL impl m)Implements com. |
| public final void | glMultMatrixf(final float[] m, final int m_offset)
Implements com. |
| public final void | glOrthof(final float left, final float right, final float bottom, final float top, final float zNear, final float zFar)
Implements com. Multiply the current matrix with the orthogonal matrix.
|
| public final void | glPopMatrix()
Implements com. |
| public final void | glPushMatrix()
Implements com. |
| public final void | glRotate(final Quaternion quat)
Rotate the current matrix with the given |
| public final void | glRotatef(final float ang_deg, final float x, final float y, final float z)
Implements com. |
| public final void | glScalef(final float x, final float y, final float z)
Implements com. |
| public final void | glTranslatef(final float x, final float y, final float z)
Implements com. |
| public final void | gluLookAt(final float eyex, final float eyey, final float eyez, final float centerx, final float centery, final float centerz, final float upx, final float upy, final float upz)
|
| public final void | gluPerspective(final float
fov angle in degrees fovy_deg, final float aspect ratio width / height aspect, final float zNear, final float zFar)
|
| public final void | gluPickMatrix(final float
the center x-component of a picking region in window coordinates x, final float the center y-component of a picking region in window coordinates y, final float the width of the picking region in window coordinates. deltaX, final float the height of the picking region in window coordinates. deltaY, final int[] 4 component viewport vector viewport, final int viewport_offset)Make given matrix the pick matrix based on given parameters. |
| public final boolean | Returns: true if successful, otherwise false (z is 1)4 component viewport vector viewport, final int viewport_offset, final float[] 3 component window coordinate, the result win_pos, final int win_pos_offset)Map object coordinates to window coordinates. |
| public final boolean | Returns: true if successful, otherwise false (failed to invert matrix, or becomes infinity due to zero z)4 component viewport vector viewport, final int viewport_offset, final float[] 3 component object coordinate, the result obj_pos, final int obj_pos_offset)Map window coordinates to object coordinates. |
| public boolean | Returns: true if successful, otherwise false (failed to invert matrix, or becomes infinity due to zero z)4 component viewport vector viewport, final int viewport_offset, final float near, final float far, final float[] 4 component object coordinate, the result obj_pos, final int obj_pos_offset)Map window coordinates to object coordinates. |
| public final boolean | Returns: true if successful, otherwise false (failed to invert matrix, or becomes z is infinity)storage for the resulting ray)RayMap two window coordinates w/ shared X/Y and distinctive Z
to a |
| public static final boolean | Returns: true if the given matrix-get name is valid, otherwise false.
|
| public static final boolean | Returns: true if the given matrix-mode name is valid, otherwise false.
|
| public static final int | |
| public static final int | Returns: The corresponding matrix-get name, one ofGL_MODELVIEW_MATRIX, GL_PROJECTION_MATRIX or GL_TEXTURE_MATRIX
|
| public static StringBuilder | Returns: matrix string representationoptional passed StringBuilder instance to be used sb, final String the format string of one floating point, i.e. "%10.5f", see f, final FloatBuffer java.4x4 matrix in column major order (OpenGL) a)
|
| public static StringBuilder | Returns: side by side representationoptional passed StringBuilder instance to be used sb, final String the format string of one floating point, i.e. "%10.5f", see f, final FloatBuffer java.4x4 matrix in column major order (OpenGL) a, final FloatBuffer 4x4 matrix in column major order (OpenGL) b)
|
| public final float[] | Returns: given matrix for chaining4x4 matrix storage for result mat4MvP, final int mat4MvP_offset)Multiplies the mat4MvP = Mv x P |
| public final float[] | Returns: given matrix for chaining4x4 matrix storage for result mat4PMv, final int mat4PMv_offset)Multiplies the mat4PMv = P x Mv |
| public final void | reset()
Issues |
| private final boolean | |
| public StringBuilder | |
| public String | |
| public final boolean | Returns: true if any matrix has been modified since last update call or if the derived matrices Mvi and Mvit orFrustum were updated, otherwise false.
In other words, method returns true if any matrix used by the caller must be updated,
e.g. uniforms in a shader program.Update the derived |
| private final boolean |