Create HouseTextureMapping

This commit is contained in:
xixu-me committed 2024-11-26 10:51:13 +08:00
1 parent 9f322bccba
commit de8a8e8d2b
80 files changed
+4942

No files matched your search

+52
View File
@@ -0,0 +1,52 @@
// Face.cpp: implementation of the CFace class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Test.h"
#include "Face.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CFace::CFace()
{
vI=NULL;
t=NULL;
fNormal=CVector(CP3(0.0,0.0,1.0));
}
CFace::~CFace()
{
if(vI!=NULL)
{
delete []vI;
vI=NULL;
}
if(t!=NULL)
{
delete[] t;
t=NULL;
}
}
void CFace::SetNum(int n)
{
vN=n;
vI=new int[n];
t=new CT2[n];
}
void CFace::SetFaceNormal(CP3 pt0,CP3 pt1,CP3 pt2)//¼ÆËãÐ¡Ãæ·¨Ê¸Á¿
{
CVector V01(pt0,pt1);
CVector V02(pt0,pt2);
fNormal=Cross(V01,V02);
}