如何在OpenGl窗口上画圆?我用的投影模式是glOrtho,在线等,急.........急.........马上解决,立刻给分 如何在OpenGl窗口上画圆?我用的投影模式是glOrtho,在窗口中,中心点在窗口中心,我要随鼠标移动来改变圆的半径,在线等,急.........急.........马上解决,立刻给分 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我作的一个例子去看http://www.86vr.com/teach/cursor/200504/5470.html typedef struct{double rgbr;double rgbg;double rgbb;double x;double y;double r;double size;}cirStruct;vector<cirStruct> circles;cirStruct cirpot;cirpot.x=x;cirpot.y=y;cirpot.rgbr=localcolor.r;cirpot.rgbg=localcolor.g;cirpot.rgbb=localcolor.b;cirpot.size=local_size;cirpot.r=sqrt((x-cirpot.x)*(x-cirpot.x)+(y-cirpot.y)*(y-cirpot.y));circles.push_back(cirpot);for(vector<cirStruct>::iterator cir=circles.begin();cir!=circles.end();cir++) { for(double i=1;i<=circle_total;i+=(2*3.1416/circle_total)) { glLineWidth(cir->size); glBegin(GL_LINES); glColor3f(cir->rgbr,cir->rgbg,cir->rgbb); glVertex2f(cir->x+(cir->r)*sin(i),cir->y+(cir->r)*cos(i)); glVertex2f(cir->x+(cir->r)*sin(i+(2*3.1416/circle_total)),cir->y+(cir->r)*cos(i+(2*3.1416/circle_total))); glEnd(); } }直接从我以前写的东西里拉出来的可能看起来麻烦了点 画是可以画的。 WindowsXP还能坚持几年? 求大牛解答菜鸟的一系列问题(堆的分配与释放,以及自己写的链表)。。谢 setupapi使用问题 CWnd类型的指针 怎么指向他的VIEW 关于ListView,sdk的问题 我的机子中了恶意程序 关于MFC扩展动态链接库中的对话框资源问题! ATL的向导中有个invisible at runtime我用向导的时候忘记选了,该怎么补上? 在用CsocketFile接发数据时,如何知道发送数据产生了错误!大侠请指教! 如何固定主窗口的大小? 大家帮我看看这个debug 在单文档界面中如何在固定位置加载个对话框
http://www.86vr.com/teach/cursor/200504/5470.html
{
double rgbr;
double rgbg;
double rgbb;
double x;
double y;
double r;
double size;
}cirStruct;
vector<cirStruct> circles;
cirStruct cirpot;
cirpot.x=x;
cirpot.y=y;
cirpot.rgbr=localcolor.r;
cirpot.rgbg=localcolor.g;
cirpot.rgbb=localcolor.b;
cirpot.size=local_size;
cirpot.r=sqrt((x-cirpot.x)*(x-cirpot.x)+(y-cirpot.y)*(y-cirpot.y));
circles.push_back(cirpot);
for(vector<cirStruct>::iterator cir=circles.begin();cir!=circles.end();cir++)
{
for(double i=1;i<=circle_total;i+=(2*3.1416/circle_total))
{
glLineWidth(cir->size);
glBegin(GL_LINES);
glColor3f(cir->rgbr,cir->rgbg,cir->rgbb);
glVertex2f(cir->x+(cir->r)*sin(i),cir->y+(cir->r)*cos(i));
glVertex2f(cir->x+(cir->r)*sin(i+(2*3.1416/circle_total)),cir->y+(cir->r)*cos(i+(2*3.1416/circle_total)));
glEnd();
}
}
直接从我以前写的东西里拉出来的
可能看起来麻烦了点 画是可以画的。