資源簡介
關于三維人臉重建的代碼,已經實現。配置好環境就可以運行了。

代碼片段和文件信息
//?Bloomenthal.cpp:?Bloomenthal?
//
//////////////////////////////////////////////////////////////////////
#include?“stdafx.h“
//#include?“RBF3D.h“
#include?“Bloomenthal.h“
/*
#ifdef?_DEBUG
#undef?THIS_FILE
static?char?THIS_FILE[]=__FILE__;
#define?new?DEBUG_NEW
#endif
*/
using?namespace?BLOOMENTHAL;
//static?INTLISTS?*cubetable[256];
static?struct?Bloomenthal::intlists?*cubetable[256];
/* edge:?LB?LT?LN?LF?RB?RT?RN?RF?BN?BF?TN?TF?*/
static?int?corner1[12] ???=?{LBNLTNLBNLBFRBNRTNRBNRBFLBNLBFLTNLTF};
static?int?corner2[12] ???=?{LBFLTFLTNLTFRBFRTFRTNRTFRBNRBFRTNRTF};
static?int?leftface[12] ???=?{B??L??L??F??R??T??N??R??N??B??T??F};
?????/*?face?on?left?when?going?corner1?to?corner2?*/
static?int?rightface[12]???=?{L??T??N??L??B??R??R??F??B??F??N??T};
?????/*?face?on?right?when?going?corner1?to?corner2?*/
//////////////////////////////////////////////////////////////////////
//?峔抸/徚柵
//////////////////////////////////////////////////////////////////////
Bloomenthal::Bloomenthal()
{
}
Bloomenthal::~Bloomenthal()
{
}
double?Bloomenthal::torus(double?x?double?y?double?z)
{
double?x2?=?x*x?y2?=?y*y?z2?=?z*z;
????double?a?=?x2+y2+z2+(0.5*0.5)-(0.1*0.1);
????return?a*a-4.0*(0.5*0.5)*(y2+z2);
}
double?Bloomenthal::sphere(double?x?double?y?double?z)
{
double?rsq?=?x*x+y*y+z*z;
????return?1.0/(rsq?0.00001??0.00001?:?rsq);
}
double?Bloomenthal::blob(double?x?double?y?double?z)
{
return?4.0-sphere(x+1.0yz)-sphere(xy+1.0z)-sphere(xyz+1.0);
}
int?Bloomenthal::triproc(int?i1?int?i2?int?i3?VERTICES?vertices)
{
gvertices?=?vertices;
gntris++;
if(FILEOUT){
fprintf(tri_file?“%d?%d?%d\n“?i1?i2?i3);
}
else{
TRILIST*?n_tris?=?new?TRILIST;
n_tris->next?=?tris;
n_tris->i1?=?i1;
n_tris->i2?=?i2;
n_tris->i3?=?i3;
tris?=?n_tris;
}
????return?1;
}
/****?An?Implicit?Surface?Polygonizer?****/
/*?polygonize:?polygonize?the?implicit?surface?function
?*???arguments?are:
?* ?double?function?(x?y?z)
?* ?double?x?y?z?(an?arbitrary?3D?point)
?* ?????the?implicit?surface?function
?* ?????return?negative?for?inside?positive?for?outside
?* ?double?size
?* ?????width?of?the?partitioning?cube
?* ?int?bounds
?* ?????max.?range?of?cubes?(+/-?on?the?three?axes)?from?first?cube
?* ?double?x?y?z
?* ?????coordinates?of?a?starting?point?on?or?near?the?surface
?* ?????may?be?defaulted?to?0.?0.?0.
?* ?int?triproc?(i1?i2?i3?vertices)
?* ?int?i1?i2?i3?(indices?into?the?vertex?array)
?* ?VERTICES?vertices?(the?vertex?array?indexed?from?0)
?* ?????called?for?each?triangle
?* ?????the?triangle?coordinates?are?(for?i?=?i1?i2?i3):
?* ?vertices.ptr[i].position.x?.y?and?.z
?* ?????vertices?are?ccw?when?viewed?from?the?out?(positive)?side
?* ?in?a?left-handed?coordinate?system
?* ?????vertex?normals?point?outwards
?* ?????return?1?to?continue?0?t
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????364544??2003-08-19?19:22??multi-csrbf-gui\multi-csrbf-gui.exe
?????文件?????????511??2003-09-18?21:30??multi-csrbf-gui\README.txt
?????文件???????10605??2002-06-12?18:53??multi-csrbf-gui\sphere.pwn
?????文件???????22033??2003-09-18?21:20??multi-csrbf-gui\src\Bloomenthal.cpp
?????文件????????7975??2002-12-27?19:29??multi-csrbf-gui\src\Bloomenthal.h
?????文件????????1258??2002-05-04?15:42??multi-csrbf-gui\src\ChildFrm.cpp
?????文件????????1221??2002-10-23?14:34??multi-csrbf-gui\src\ChildFrm.h
?????文件????????3852??2002-05-04?16:07??multi-csrbf-gui\src\Debug\ell.obj
?????文件?????????496??2002-05-04?16:06??multi-csrbf-gui\src\ell.cpp
?????文件?????????470??2002-05-04?16:06??multi-csrbf-gui\src\ell.h
?????文件????????7840??2003-04-21?08:47??multi-csrbf-gui\src\FileManager.cpp
?????文件????????1162??2002-06-10?17:39??multi-csrbf-gui\src\FileManager.h
?????文件????????1145??2002-05-07?16:46??multi-csrbf-gui\src\FittingDialog.cpp
?????文件????????1289??2002-05-07?16:46??multi-csrbf-gui\src\FittingDialog.h
?????文件????????1437??2003-02-25?09:41??multi-csrbf-gui\src\GridDialog.cpp
?????文件????????1356??2002-05-07?18:25??multi-csrbf-gui\src\GridDialog.h
?????文件?????????905??2002-10-23?21:06??multi-csrbf-gui\src\ImplicitFunction.cpp
?????文件?????????821??2002-10-23?21:06??multi-csrbf-gui\src\ImplicitFunction.h
?????文件????????1119??2002-09-25?20:17??multi-csrbf-gui\src\InfoDialog.cpp
?????文件????????1264??2002-09-25?20:17??multi-csrbf-gui\src\InfoDialog.h
?????文件????????1867??2002-06-29?16:14??multi-csrbf-gui\src\LU.cpp
?????文件????????8931??2002-09-06?11:06??multi-csrbf-gui\src\LU.h
?????文件????????1390??2002-05-04?15:42??multi-csrbf-gui\src\MainFrm.cpp
?????文件????????1314??2002-05-04?15:42??multi-csrbf-gui\src\MainFrm.h
?????文件????????1179??2002-09-19?13:44??multi-csrbf-gui\src\MultiDialog.cpp
?????文件????????1288??2002-09-19?13:44??multi-csrbf-gui\src\MultiDialog.h
?????文件?????????669??2002-07-05?15:40??multi-csrbf-gui\src\MultiRBF.cpp
?????文件?????????734??2002-07-05?15:53??multi-csrbf-gui\src\MultiRBF.h
?????文件????????3445??2001-07-19?16:01??multi-csrbf-gui\src\NRUTIL.H
?????文件???????18483??2003-02-12?19:58??multi-csrbf-gui\src\OctTree.cpp
?????文件????????5286??2003-02-12?19:55??multi-csrbf-gui\src\OctTree.h
............此處省略38個文件信息
- 上一篇:freeglut-3.2.1.rar
- 下一篇:多摩川AU6805
評論
共有 條評論