plane.cpp
来自「C arm 3D traslate 模擬C手臂在三度空間移動」· C++ 代码 · 共 46 行
CPP
46 行
// Plane.cpp: implementation of the CPlane class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "OpenGLtest.h"
#include "Plane.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CPlane::CPlane()
{
for(int i=0;i<3;i++)
{
m_p1[i]=0;
m_p2[i]=0;
m_p3[i]=0;
m_p4[i]=0;
}
}
CPlane::~CPlane()
{
}
void CPlane::Draw(CDC *pCDC,HGLRC hRC)
{
glBegin(GL_QUADS);
glColor3f(1.f,1.f,1.f);
glVertex3fv(m_p1);
glVertex3fv(m_p2);
glVertex3fv(m_p3);
glVertex3fv(m_p4);
glEnd();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?