-1

I am trying to write a small 2D graphics library using SDL. I want to implement the equivalent of the Matrix stack in openGL and implement functions like pushMatrix() and popMatrix() in openGL. I can do all the coding for matrix multiplications. But the need the algorithm for storing that stack and managing the transformations.

4

1 回答 1

1

堆栈本质上是一个数组或链表,其中 PUSH 操作创建最后/最顶部元素的副本并将其附加到末尾,而 POP 操作从列表/数组中删除最后一个元素。

使用/实现数组/链表是基本的计算机科学知识。

于 2013-08-23T19:24:22.307 回答