public void update(Matrix4f projection, Matrix4f view) {
        // http://www.crownandcutlass.com/features/technicaldetails/frustum.html
        final float[] clip = projection.mul(view).toArray(true);
        // Extract the numbers for the RIGHT plane
        frustum[0][0] = clip[3] - clip[0];
        frustum[0][1] = clip[7] - clip[4];
        frustum[0][2] = clip[11] - clip[8];
        frustum[0][3] = clip[15] - clip[12];
        // Extract the numbers for the LEFT plane
        frustum[1][0] = clip[3] + clip[0];
        frustum[1][1] = clip[7] + clip[4];
        frustum[1][2] = clip[11] + clip[8];
        frustum[1][3] = clip[15] + clip[12];
        // Extract the BOTTOM plane
        frustum[2][0] = clip[3] + clip[1];
        frustum[2][1] = clip[7] + clip[5];
        frustum[2][2] = clip[11] + clip[9];
        frustum[2][3] = clip[15] + clip[13];
        // Extract the TOP plane
        frustum[3][0] = clip[3] - clip[1];
        frustum[3][1] = clip[7] - clip[5];
        frustum[3][2] = clip[11] - clip[9];
        frustum[3][3] = clip[15] - clip[13];
        // Extract the FAR plane
        frustum[4][0] = clip[3] - clip[2];
        frustum[4][1] = clip[7] - clip[6];
        frustum[4][2] = clip[11] - clip[10];
        frustum[4][3] = clip[15] - clip[14];
        // Extract the NEAR plane
        frustum[5][0] = clip[3] + clip[2];
        frustum[5][1] = clip[7] + clip[6];
        frustum[5][2] = clip[11] + clip[10];
        frustum[5][3] = clip[15] + clip[14];
        // Compute the position
        // http://www.opengl.org/discussion_boards/showthread.php/178484-Extracting-camera-position-from-a-ModelView-Matrix
        final Vector4f nPos = view.invert().getColumn(3);
        position = nPos.div(nPos.getW()).toVector3();
        // Invalidate the caches
        vertices = null;
        farPlane = -1;
        nearPlane = -1;
    }
public void update ( Matrix4f projection , Matrix4f view ) { final float [ ] clip = projection . mul ( view ) . toArray ( true ) ; frustum [ 0 ] [ 0 ] = clip [ 3 ] - clip [ 0 ] ; frustum [ 0 ] [ 1 ] = clip [ 7 ] - clip [ 4 ] ; frustum [ 0 ] [ 2 ] = clip [ 11 ] - clip [ 8 ] ; frustum [ 0 ] [ 3 ] = clip [ 15 ] - clip [ 12 ] ; frustum [ 1 ] [ 0 ] = clip [ 3 ] + clip [ 0 ] ; frustum [ 1 ] [ 1 ] = clip [ 7 ] + clip [ 4 ] ; frustum [ 1 ] [ 2 ] = clip [ 11 ] + clip [ 8 ] ; frustum [ 1 ] [ 3 ] = clip [ 15 ] + clip [ 12 ] ; frustum [ 2 ] [ 0 ] = clip [ 3 ] + clip [ 1 ] ; frustum [ 2 ] [ 1 ] = clip [ 7 ] + clip [ 5 ] ; frustum [ 2 ] [ 2 ] = clip [ 11 ] + clip [ 9 ] ; frustum [ 2 ] [ 3 ] = clip [ 15 ] + clip [ 13 ] ; frustum [ 3 ] [ 0 ] = clip [ 3 ] - clip [ 1 ] ; frustum [ 3 ] [ 1 ] = clip [ 7 ] - clip [ 5 ] ; frustum [ 3 ] [ 2 ] = clip [ 11 ] - clip [ 9 ] ; frustum [ 3 ] [ 3 ] = clip [ 15 ] - clip [ 13 ] ; frustum [ 4 ] [ 0 ] = clip [ 3 ] - clip [ 2 ] ; frustum [ 4 ] [ 1 ] = clip [ 7 ] - clip [ 6 ] ; frustum [ 4 ] [ 2 ] = clip [ 11 ] - clip [ 10 ] ; frustum [ 4 ] [ 3 ] = clip [ 15 ] - clip [ 14 ] ; frustum [ 5 ] [ 0 ] = clip [ 3 ] + clip [ 2 ] ; frustum [ 5 ] [ 1 ] = clip [ 7 ] + clip [ 6 ] ; frustum [ 5 ] [ 2 ] = clip [ 11 ] + clip [ 10 ] ; frustum [ 5 ] [ 3 ] = clip [ 15 ] + clip [ 14 ] ; final Vector4f nPos = view . invert ( ) . getColumn ( 3 ) ; position = nPos . div ( nPos . getW ( ) ) . toVector3 ( ) ; vertices = null ; farPlane = - 1 ; nearPlane = - 1 ; }
Updates the frustum to match the view and projection matrix.

@param projection The projection matrix
@param view The view matrix