1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| void ExampleApp::Delaunay_it(Ogre::SceneNode*parent,std::string name,Mask3d* mask){
Mesh* mesh=new Mesh(mask);
//calcul de Delaunay
tetgenio in, out;
//int i;
MiTimer* t2=new MiTimer();
t2->start();
// All indices start from 1.
in.firstnumber = 1;
in.numberofpoints = mesh->getNbVertice();
int sizeTabVertice=mesh->getNbVertice()*3;
in.pointlist = new REAL[sizeTabVertice];
for(int i=0;i<sizeTabVertice;++i)
{
// creation d'un noeud.
in.pointlist[i] = mesh->getVerticeValue(i);
}
tetgenbehavior b;
char *switches="w";
if (!b.parse_commandline(switches)) {
terminatetetgen(1);
}
tetrahedralize(&b, &in, &out);
for(int i = 0; i < out.numberoftrifaces; i++) {
} |
Partager