www.pudn.com > final_6.rar > Shape.cpp


 
#include "stdafx.h" 
#include "CG.h" 
#include "math.h" 
//#include "PerView.h" 
//#include "TopView.h" 
#include "Shape.h" 
 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
IMPLEMENT_SERIAL(CShape,CObject,0) 
 
CShape::CShape() 
{ 
   Kd=0.5; 
   Ks=0.3; 
   ns=6; 
   Ka=0.3; 
   cl.r=0;cl.g=0;cl.b=255; 
   trans=1; 
} 
 
 
void CShape::DrawTop(CDC* pDC,CRect* rc){}; 
void CShape::DrawLeft(CDC* pDC,CRect* rc){}; 
void CShape::DrawFront(CDC*pDC,CRect * rc){}; 
void CShape::DrawPer(CDC*pDC, CRect *rc){}; 
void CShape::Serialize(CArchive &ar){ 
	if (ar.IsStoring()){ 
	 ar<>Kd>>Ks>>ns>>Ka>>cl.r>>cl.g>>cl.b>>trans; 
 
	} 
	tempCenter.Serialize(ar); 
}; 
void CShape::SetBodyFace() 
{}