www.pudn.com > 1012.zip > RectangleNode.cpp
// RectangleNode.cpp: implementation of the CRectangleNode class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "SCAD.h"
#include "RectangleNode.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CRectangleNode::CRectangleNode()
{
}
CRectangleNode::~CRectangleNode()
{
}
void CRectangleNode::Draw()
{
glColor4f(m_cColor.red,m_cColor.green,m_cColor.blue,m_cColor.alpha);
glBegin(GL_LINE_LOOP);
glVertex2f(m_ptStart.x, m_ptStart.y);
glVertex2f(m_ptEnd.x, m_ptStart.y);
glVertex2f(m_ptEnd.x, m_ptEnd.y);
glVertex2f(m_ptStart.x, m_ptEnd.y);
glEnd();
}