本文整理汇总了C++中PolyhedronPtr::set_index_vertices方法的典型用法代码示例。如果您正苦于以下问题:C++ PolyhedronPtr::set_index_vertices方法的具体用法?C++ PolyhedronPtr::set_index_vertices怎么用?C++ PolyhedronPtr::set_index_vertices使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PolyhedronPtr
的用法示例。
在下文中一共展示了PolyhedronPtr::set_index_vertices方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
double MSDM2_Component::ProcessMSDM2_Multires(PolyhedronPtr m_PolyOriginal, PolyhedronPtr m_PolyDegrad,int NbLevel, double maxdim,double & FastMSDM, Curvature_ComponentPtr component_ptr_curvature)
{
double somme_MSDM2=0;
int NbVertex=0;
Facet * TabMatchedFacet=new Facet[m_PolyDegrad->size_of_vertices()];
Matching_Multires_Init(m_PolyDegrad, m_PolyOriginal,TabMatchedFacet);
double RadiusCurvature=0.002;
for (int i=0;i<NbLevel;i++)
{
m_PolyDegrad->set_index_vertices();
component_ptr_curvature->principal_curvature(m_PolyOriginal,true,RadiusCurvature*maxdim);
component_ptr_curvature->principal_curvature(m_PolyDegrad,true,RadiusCurvature*maxdim);
KmaxKmean(m_PolyOriginal,maxdim);
KmaxKmean(m_PolyDegrad,maxdim);
Matching_Multires_Update(m_PolyDegrad,TabMatchedFacet);
for(Vertex_iterator pVertex = m_PolyDegrad->vertices_begin();
pVertex != m_PolyDegrad->vertices_end();
pVertex++)
{
std::vector<double> TabDistance1;std::vector<double> TabDistance2;
TabPoint1.clear();
TabPoint2.clear();
ProcessMSDM2_per_vertex(pVertex,RadiusCurvature*5*maxdim,TabDistance1,TabDistance2,TabPoint1,TabPoint2);
ComputeStatistics((&(*pVertex)), 0.5,TabDistance1,TabDistance2,TabPoint1,TabPoint2,RadiusCurvature*5*maxdim,maxdim);
}
RadiusCurvature+=0.001;
}
for(Vertex_iterator pVertex = m_PolyDegrad->vertices_begin();
pVertex != m_PolyDegrad->vertices_end();
pVertex++)
{
somme_MSDM2+=pow(pVertex->MSDM2_Local/NbLevel,3);
NbVertex++;
}
FastMSDM=pow(somme_MSDM2/(double)NbVertex,0.33333);
delete [] TabMatchedFacet;
m_PolyDegrad->IsDistanceComputed=true;
return 0;
}