本文整理汇总了C++中Triangle::TV方法的典型用法代码示例。如果您正苦于以下问题:C++ Triangle::TV方法的具体用法?C++ Triangle::TV怎么用?C++ Triangle::TV使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Triangle
的用法示例。
在下文中一共展示了Triangle::TV方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadMesh
void VertexBasedSegmenter::loadMesh(){
openMeshFile(this->filename);
cout<<"Loading "<<this->filename<<endl;
this->centerMesh = centerCoordinate();
faceAreas = new float[mesh.getTopSimplexesNum()];
clusterIndex = new int[mesh.getNumVertex()];
cout<<"found center"<<endl;
for(unsigned int ii=0; ii<mesh.getTopSimplexesNum(); ii++){
Triangle T = mesh.getTopSimplex(ii);
Normals n = Normals(mesh.getVertex(T.TV(0)), mesh.getVertex(T.TV(1)), mesh.getVertex(T.TV(2)));
norms.push_back(n);
}
cout<<"set normals"<<endl;
setAreas();
getBBDiagonal();
cout<<"Diag "<<this->BBDiagonal<<endl;
double auxRad = sqrt(mesh.MArea()/(NCluster*M_PI));
this->maxD = auxRad/BBDiagonal;
openCurvatureFile(fieldfilename);
cout<<"Loaded function"<<endl;
for(int ii=0; ii<mesh.getNumVertex(); ii++)
clusterIndex[ii]=-1;
cout<<"Before vertices"<<endl;
vertexDistances = buildVertexDistances();
cout<<"Vrtices built"<<endl;
functionVDistances = buildFunctionVDistances();
cout<<"function built"<<endl;
buildGlobalDistances();
cout<<"global built"<<endl;
vertexDistances.erase(vertexDistances.begin(), vertexDistances.end());
functionVDistances.erase(functionVDistances.begin(), functionVDistances.end());
cout<<"All built, "<<mesh.getNumVertex()<<" vertices and "<<mesh.getTopSimplexesNum()<<" triangles"<<endl;
//startSeg();
}