تخفیف های داغ در جشنواره تابستانه توسینسو تخفیف های داغ در جشنواره تابستانه توسینسو
مانده تا پایان تخفیف
مشاهده دوره ها
0

مفهوم projection matrix

سلام دوستان. مفهوم این قطعه کد چی هست در قسمت توضیحات این نوشته شده :

Computes an orthographic projection matrix.

public static void orthoM(float[] m, int mOffset, float left, float right, float bottom, float top, float near,
                              float far) {
        if (left == right) {
            throw new IllegalArgumentException("left == right");
        }
        if (bottom == top) {
            throw new IllegalArgumentException("bottom == top");
        }
        if (near == far) {
            throw new IllegalArgumentException("near == far");
        }

        final float r_width = 1.0f / (right - left);
        final float r_height = 1.0f / (top - bottom);
        final float r_depth = 1.0f / (far - near);
        final float x = 2.0f * (r_width);
        final float y = 2.0f * (r_height);
        final float z = -2.0f * (r_depth);
        final float tx = -(right + left) * r_width;
        final float ty = -(top + bottom) * r_height;
        final float tz = -(far + near) * r_depth;
        m[mOffset + 0] = x;
        m[mOffset + 5] = y;
        m[mOffset + 10] = z;
        m[mOffset + 12] = tx;
        m[mOffset + 13] = ty;
        m[mOffset + 14] = tz;
        m[mOffset + 15] = 1.0f;
        m[mOffset + 1] = 0.0f;
        m[mOffset + 2] = 0.0f;
        m[mOffset + 3] = 0.0f;
        m[mOffset + 4] = 0.0f;
        m[mOffset + 6] = 0.0f;
        m[mOffset + 7] = 0.0f;
        m[mOffset + 8] = 0.0f;
        m[mOffset + 9] = 0.0f;
        m[mOffset + 11] = 0.0f;

در کل معنی PROJECTION MATRIX چی میشه؟

پرسیده شده در 1396/05/22 توسط

1 پاسخ

0

سلام و عرض ادب، بنده آشنایی زیادی با مفاهیم ریاضی که گفتید ندارم. اما ظاهراً Projection Matrix بیشتر در مورد فضای سه بعدی و گرافیک هست. تو این لینک بیشتر در موردش توضیح داده.

پاسخ در 1396/05/23 توسط

پاسخ شما