本文整理汇总了C++中SurfaceMesh::Display_Cells_Attached_To_Vertex方法的典型用法代码示例。如果您正苦于以下问题:C++ SurfaceMesh::Display_Cells_Attached_To_Vertex方法的具体用法?C++ SurfaceMesh::Display_Cells_Attached_To_Vertex怎么用?C++ SurfaceMesh::Display_Cells_Attached_To_Vertex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SurfaceMesh
的用法示例。
在下文中一共展示了SurfaceMesh::Display_Cells_Attached_To_Vertex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
// generate the Vtx2HalfFacets data struct
TM.Build_Vtx2HalfFacets_DEBUG();
TM.Close(); // we can close it now, i.e. no more modifications
// now display half-facets attached to vertices for final data structure
TM.Display_Vtx2HalfFacets();
cout << endl;
// check 'Vtx2HalfFacets' against reference data
VtxHalfFacetType Vtx2HalfFacets_REF[11];
Vtx2HalfFacets_REF[ 0].Set(0,0,2);
Vtx2HalfFacets_REF[ 1].Set(1,3,1);
Vtx2HalfFacets_REF[ 2].Set(2,1,2);
Vtx2HalfFacets_REF[ 3].Set(3,2,1);
Vtx2HalfFacets_REF[ 4].Set(4,3,2);
Vtx2HalfFacets_REF[ 5].Set(5,3,2);
Vtx2HalfFacets_REF[ 6].Set(5,6,1);
Vtx2HalfFacets_REF[ 7].Set(6,4,2);
Vtx2HalfFacets_REF[ 8].Set(7,5,1);
Vtx2HalfFacets_REF[ 9].Set(8,6,2);
Vtx2HalfFacets_REF[10].Set(9,6,2);
// error check
const std::vector<VtxHalfFacetType>& c_Vtx2HF = TM.Get_Vtx2HalfFacets().Get_VtxMap();
for (VtxIndType jj = 0; jj < c_Vtx2HF.size(); ++jj)
if (!c_Vtx2HF[jj].Equal(Vtx2HalfFacets_REF[jj]))
{
cout << "'Vtx2HalfFacets' data is incorrect!" << endl;
OUTPUT_CODE = 3;
break;
}
// display cells attached to a vertex
VtxIndType V_IN = 5;
TM.Display_Cells_Attached_To_Vertex(V_IN);
cout << endl;
// check attached cells against reference data
std::vector<CellIndType> cell_ind_1, cell_ind_2;
TM.Get_Cells_Attached_To_Vertex(V_IN, 0, cell_ind_1);
TM.Get_Cells_Attached_To_Vertex(V_IN, 4, cell_ind_2);
const CellIndType cell_ind_1_REF[4] = {0, 1, 2, 3};
const CellIndType cell_ind_2_REF[3] = {4, 5, 6};
for (unsigned int jj = 0; jj < cell_ind_1.size(); ++jj)
if (cell_ind_1[jj]!=cell_ind_1_REF[jj])
{
cout << "Cell attachment data is incorrect!" << endl;
OUTPUT_CODE = 4;
break;
}
for (unsigned int jj = 0; jj < cell_ind_2.size(); ++jj)
if (cell_ind_2[jj]!=cell_ind_2_REF[jj])
{
cout << "Cell attachment data is incorrect!" << endl;
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);