public void fromFrustum(float near, float far, float left, float right,
            float top, float bottom, boolean parallel) {
        loadIdentity();
        if (parallel) {
            // scale
            m00 = 2.0f / (right - left);
            //m11 = 2.0f / (bottom - top);
            m11 = 2.0f / (top - bottom);
            m22 = -2.0f / (far - near);
            m33 = 1f;

            // translation
            m03 = -(right + left) / (right - left);
            //m31 = -(bottom + top) / (bottom - top);
            m13 = -(top + bottom) / (top - bottom);
            m23 = -(far + near) / (far - near);
        } else {
            m00 = (2.0f * near) / (right - left);
            m11 = (2.0f * near) / (top - bottom);
            m32 = -1.0f;
            m33 = -0.0f;

            // A
            m02 = (right + left) / (right - left);

            // B
            m12 = (top + bottom) / (top - bottom);

            // C
            m22 = -(far + near) / (far - near);

            // D
            m23 = -(2.0f * far * near) / (far - near);
        }
    }
Load a perspective-view transform with the specified clipping planes.

@param near the coordinate of the near plane
@param far the coordinate of the far plane
@param left the coordinate of the left plane
@param right the coordinate of the right plane
@param top the coordinate of the top plane
@param bottom the coordinate of the bottom plane
@param parallel true &rarr; parallel sides, false &rarr; perspective
jme3-core/src/main/java/com/jme3/math/Matrix4f.java