文件名称:vc实现三维图形的旋转
文件大小:96KB
文件格式:DOC
更新时间:2013-10-16 13:54:06
vc 三维图形 旋转
void CCube1View::cube_def( ) { int i,j; CDC *pDC=GetDC(); CPen pen; pen.CreatePen(PS_SOLID,1,RGB(255,255,255)); CPen *poldpen=pDC->SelectObject(&pen); for(i=0;i<5;i+=4) { pDC->MoveTo(b[i].x,b[i].y); for(j=1;j<4;j++) pDC->LineTo(b[i+j].x,b[i+j].y); pDC->LineTo(b[i].x,b[i].y); } for(i=0;i<4;i++) { pDC->MoveTo(b[i].x,b[i].y); pDC->LineTo(b[i+4].x,b[i+4].y); }