菜鸟教程小白 发表于 2022-12-11 21:53:58

ios - 如何使用 GLKit 的 GLKMatrixStack 库生成模型 View 矩阵?


                                            <p><p>GLKit中有一个头文件,注释如下:</p>

<blockquote>
<p>GLKMatrixStack is a CFType that allows for the creation of a 4x4 matrix stack similar to OpenGL&#39;s matrix stack. Any number of matrix stacks can be created and operated on with functions similar to those found in fixed function versions of OpenGL.</p>
</blockquote>

<p>您将如何根据堆栈的内容生成模型 View 矩阵?我在 <code>GLKMatrixStack</code>header 之外找不到对 <code>GLKMatrixStackRef</code> 类型的任何引用。</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>在 Apple 的 C 库中,<code><whatever>Ref</code> 是指向 <code><whatever></code> 的指针的 typedef。所以适当的文档是 <a href="https://developer.apple.com/library/ios/ipad/#DOCUMENTATION/GLkit/Reference/GLKMatrixStack/Reference/reference.html" rel="noreferrer noopener nofollow">GLMatrixStack</a> .所以你会使用 <code>GLMatrixStackCreate</code>,然后是 <code>GLMatrixStackRotate</code>、<code>GLMatrixStackScale</code>、<code>GLMatrixStackPush/Pop</code> 等的任何组合以及类似的东西<code>GLMatrixStackGetMatrix4</code> 当你想将结果传达给你的着色器时。</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 如何使用 GLKit 的 GLKMatrixStack 库生成模型 View 矩阵?,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/9649980/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/9649980/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 如何使用 GLKit 的 GLKMatrixStack 库生成模型 View 矩阵?