本文整理汇总了C++中SurfaceMesh::Get_HalfFacets_Attached_To_HalfFacet方法的典型用法代码示例。如果您正苦于以下问题:C++ SurfaceMesh::Get_HalfFacets_Attached_To_HalfFacet方法的具体用法?C++ SurfaceMesh::Get_HalfFacets_Attached_To_HalfFacet怎么用?C++ SurfaceMesh::Get_HalfFacets_Attached_To_HalfFacet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SurfaceMesh
的用法示例。
在下文中一共展示了SurfaceMesh::Get_HalfFacets_Attached_To_HalfFacet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
OUTPUT_CODE = 5;
break;
}
// display if two cells are facet connected
const VtxIndType V1 = 5;
const CellIndType C1 = 0;
const CellIndType C2 = 4;
TM.Display_Two_Cells_Are_Facet_Connected(V1, C1, C2);
cout << endl;
// check facet connected cells against reference data
const bool CHK_Facet_Connected = TM.Two_Cells_Are_Facet_Connected(V1, C1, C2);
const bool CHK_Facet_Connected_REF = false;
if (CHK_Facet_Connected!=CHK_Facet_Connected_REF)
{
cout << "Facet connected cell data is incorrect!" << endl;
OUTPUT_CODE = 6;
}
// display half-facets attached to given half-facet
HalfFacetType TEST_attached;
TEST_attached.Set(1,1);
TM.Display_HalfFacets_Attached_To_HalfFacet(TEST_attached);
cout << endl;
// check attached half-facets against reference data
HalfFacetType attached_REF[4];
attached_REF[0].Set(1,1);
attached_REF[1].Set(2,2);
attached_REF[2].Set(3,0);
attached_REF[3].Set(0,0);
std::vector<HalfFacetType> attached;
TM.Get_HalfFacets_Attached_To_HalfFacet(TEST_attached, attached);
for (unsigned int jj = 0; jj < attached.size(); ++jj)
if (!attached[jj].Equal(attached_REF[jj]))
{
cout << "HalfFacet attachment data is incorrect!" << endl;
OUTPUT_CODE = 7;
break;
}
// check that half-facet has no neighbor
TEST_attached.Set(4,2);
TM.Get_HalfFacets_Attached_To_HalfFacet(TEST_attached, attached);
if (attached.size()!=1)
{
cout << "HalfFacet attachment data is incorrect!" << endl;
OUTPUT_CODE = 8;
}
else if (!TEST_attached.Equal(attached[0]))
{
cout << "HalfFacet attachment should only include the initial given half-facet..." << endl;
cout << " but it does not!" << endl;
OUTPUT_CODE = 9;
}
// display non-manifold facets (edges)
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;