05 2019 档案

摘要:class wcPt3D { public: GLfloat x, y, z; }; typedef GLfloat Matrix4x4[4][4]; // 打印矩阵 void printMatrix4x4(Matrix4x4 mat) { printf("["); for (int row = 0; row < 4; ++row) { for (int col = 0; col... 阅读全文
posted @ 2019-05-14 21:20 鞭挞代码 阅读(780) 评论(0) 推荐(0)
摘要:二维几何变换相比三维略简单一点但原理基本一致,下列代码实现了平移、缩放、旋转变换,并有一个复合变换矩阵保存所有变换计算后的结果,方便用其结果在OpenGL进行渲染 阅读全文
posted @ 2019-05-01 22:10 鞭挞代码 阅读(1153) 评论(0) 推荐(0)