本文整理汇总了C++中SurfaceMesh::Display_Unique_Vertices方法的典型用法代码示例。如果您正苦于以下问题:C++ SurfaceMesh::Display_Unique_Vertices方法的具体用法?C++ SurfaceMesh::Display_Unique_Vertices怎么用?C++ SurfaceMesh::Display_Unique_Vertices使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SurfaceMesh
的用法示例。
在下文中一共展示了SurfaceMesh::Display_Unique_Vertices方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
TM.Display_Nonmanifold_HalfFacets();
cout << endl;
// check non-manifold facets (edges) against reference data
HalfFacetType non_manifold_hf_REF[2];
non_manifold_hf_REF[0].Set(3,0);
non_manifold_hf_REF[1].Set(6,0);
std::vector<HalfFacetType> non_manifold_hf;
TM.Get_Nonmanifold_HalfFacets(non_manifold_hf);
for (unsigned int jj = 0; jj < non_manifold_hf.size(); ++jj)
if (!non_manifold_hf[jj].Equal(non_manifold_hf_REF[jj]))
{
cout << "Non-manifold facet data is incorrect!" << endl;
OUTPUT_CODE = 10;
break;
}
// display non-manifold vertices
TM.Display_Nonmanifold_Vertices();
cout << endl;
// check non-manifold vertices against reference data
const VtxIndType non_manifold_vtx_REF[1] = {5};
std::vector<VtxIndType> non_manifold_vtx;
TM.Get_Nonmanifold_Vertices(non_manifold_vtx);
for (unsigned int jj = 0; jj < non_manifold_vtx.size(); ++jj)
if (non_manifold_vtx[jj]!=non_manifold_vtx_REF[jj])
{
cout << "Non-manifold vertex data is incorrect!" << endl;
OUTPUT_CODE = 11;
break;
}
TM.Display_Unique_Vertices();
cout << endl;
// check unique vertices against reference data
std::vector<VtxIndType> uv;
TM.Get_Unique_Vertices(uv);
const VtxIndType uv_REF[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
for (unsigned int jj = 0; jj < uv.size(); ++jj)
if (uv[jj]!=uv_REF[jj])
{
cout << "Unique vertex data is incorrect!" << endl;
OUTPUT_CODE = 12;
break;
}
// display all edges in the mesh
std::vector<MeshEdgeType> edges;
TM.Get_Edges(edges);
cout << "A unique list of edges in the mesh:" << endl;
std::vector<MeshEdgeType>::const_iterator it;
for (it = edges.begin(); it!=edges.end(); ++it)
{
cout << "[" << (*it).vtx[0] << ", " << (*it).vtx[1] << "]" << endl;
}
cout << endl;
// test if a pair of vertices is connected by an edge
cout << "Vtx #5 and Vtx #9 are connected." << endl;
if (!TM.Is_Connected(5, 9))
{
cout << "Incorrect! They are NOT connected!" << endl;
OUTPUT_CODE = 13;
}