openGL构造二维旋转矩阵

编程入门 行业动态 更新时间:2024-10-27 08:25:50

openGL构造二维<a href=https://www.elefans.com/category/jswz/34/1765693.html style=旋转矩阵"/>

openGL构造二维旋转矩阵

效果图:


#include<stdlib.h>

#include<GL/glut.h>
#include<math.h>
GLsizei winWidth=600,winHeight=600;
GLfloat xwcMin=0.0,xwcMax=225.0;
GLfloat ywcmin=0.0,ywcMax=225.0;
class wcPt2D
{
public:
GLfloat x,y;
};
typedef GLfloat Matrix3x3[3][3];
Matrix3x3 matComposite;
const double pi=3.14159;
void init()
{
glClearColor(1.0,1.0,1.0,0.0);
}
void matrix3x3SetIdentity(Matrix3x3 matIdent3x3)
{
GLint row,col;
for(row=0;row<3;row++)
{
for(col=0;col<3;col++)
{
matIdent3x3[row][col]=(row==col);
}
}
}
void matrix3x3PreMultiply(Matrix3x3 m1,Matrix3x3 m2)
{
GLint row,col;
Matrix3x3 matTemp;
for(row=0;row<3;row++)
</

更多推荐

openGL构造二维旋转矩阵

本文发布于:2024-02-25 07:39:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1698254.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:旋转矩阵   openGL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!