• <legend id='CrtbR'><style id='CrtbR'><dir id='CrtbR'><q id='CrtbR'></q></dir></style></legend>
    <i id='CrtbR'><tr id='CrtbR'><dt id='CrtbR'><q id='CrtbR'><span id='CrtbR'><b id='CrtbR'><form id='CrtbR'><ins id='CrtbR'></ins><ul id='CrtbR'></ul><sub id='CrtbR'></sub></form><legend id='CrtbR'></legend><bdo id='CrtbR'><pre id='CrtbR'><center id='CrtbR'></center></pre></bdo></b><th id='CrtbR'></th></span></q></dt></tr></i><div id='CrtbR'><tfoot id='CrtbR'></tfoot><dl id='CrtbR'><fieldset id='CrtbR'></fieldset></dl></div>

      • <bdo id='CrtbR'></bdo><ul id='CrtbR'></ul>

        <tfoot id='CrtbR'></tfoot>

        <small id='CrtbR'></small><noframes id='CrtbR'>

      1. 获取当前 ModelView 矩阵

        时间:2023-09-17
              <tbody id='4jCEk'></tbody>
            <i id='4jCEk'><tr id='4jCEk'><dt id='4jCEk'><q id='4jCEk'><span id='4jCEk'><b id='4jCEk'><form id='4jCEk'><ins id='4jCEk'></ins><ul id='4jCEk'></ul><sub id='4jCEk'></sub></form><legend id='4jCEk'></legend><bdo id='4jCEk'><pre id='4jCEk'><center id='4jCEk'></center></pre></bdo></b><th id='4jCEk'></th></span></q></dt></tr></i><div id='4jCEk'><tfoot id='4jCEk'></tfoot><dl id='4jCEk'><fieldset id='4jCEk'></fieldset></dl></div>
          1. <small id='4jCEk'></small><noframes id='4jCEk'>

            <legend id='4jCEk'><style id='4jCEk'><dir id='4jCEk'><q id='4jCEk'></q></dir></style></legend>
            • <bdo id='4jCEk'></bdo><ul id='4jCEk'></ul>

                  <tfoot id='4jCEk'></tfoot>
                1. 本文介绍了获取当前 ModelView 矩阵的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  在 OpenGL 中,如何读取模型视图矩阵中的当前 x/y 平移?我知道您必须将当前矩阵加载到一个数组中并从那里读取浮点数,但我不知道具体该怎么做.

                  In OpenGL, how do I read the current x/y translation in the modelview matrix? I know that you have to load the current matrix into an array and read the floats from there, but I don't know precisely how to do it.

                  推荐答案

                  为了检索当前的模型视图矩阵,您必须调用 glGetFloatv 函数,带有 GL_MODELVIEW_MATRIX 参数.

                  In order to retrieve the current modelview matrix you have to call the glGetFloatv function with GL_MODELVIEW_MATRIX parameter.

                  GLfloat matrix[16]; 
                  glGetFloatv (GL_MODELVIEW_MATRIX, matrix); 
                  

                  来自文档:

                  GL_MODELVIEW_MATRIX

                  params 返回十六个值:顶部的模型视图矩阵模型视图矩阵堆栈.最初这矩阵是单位矩阵.

                  params returns sixteen values: the modelview matrix on the top of the modelview matrix stack. Initially this matrix is the identity matrix.

                  这篇关于获取当前 ModelView 矩阵的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何在 C++ 和 openGL 中将类方法作为另一个函数的 下一篇:OpenGL - 围绕 Y 轴旋转“曲线"

                  相关文章

                  最新文章

                2. <legend id='gV8LJ'><style id='gV8LJ'><dir id='gV8LJ'><q id='gV8LJ'></q></dir></style></legend>

                  <small id='gV8LJ'></small><noframes id='gV8LJ'>

                3. <i id='gV8LJ'><tr id='gV8LJ'><dt id='gV8LJ'><q id='gV8LJ'><span id='gV8LJ'><b id='gV8LJ'><form id='gV8LJ'><ins id='gV8LJ'></ins><ul id='gV8LJ'></ul><sub id='gV8LJ'></sub></form><legend id='gV8LJ'></legend><bdo id='gV8LJ'><pre id='gV8LJ'><center id='gV8LJ'></center></pre></bdo></b><th id='gV8LJ'></th></span></q></dt></tr></i><div id='gV8LJ'><tfoot id='gV8LJ'></tfoot><dl id='gV8LJ'><fieldset id='gV8LJ'></fieldset></dl></div>

                    <tfoot id='gV8LJ'></tfoot>

                      <bdo id='gV8LJ'></bdo><ul id='gV8LJ'></ul>