本文整理汇总了C++中SurfaceMesh::Num_Cells方法的典型用法代码示例。如果您正苦于以下问题:C++ SurfaceMesh::Num_Cells方法的具体用法?C++ SurfaceMesh::Num_Cells怎么用?C++ SurfaceMesh::Num_Cells使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SurfaceMesh
的用法示例。
在下文中一共展示了SurfaceMesh::Num_Cells方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
// check 'Cell' against reference data
CellSimplexType<2> Cell_REF[7];
HalfFacetType hf;
// Cell #1
Cell_REF[ 0].Set(0,0,hf.Set(1,1));
Cell_REF[ 0].Set(1,1,hf.Set());
Cell_REF[ 0].Set(2,5,hf.Set());
// Cell #2
Cell_REF[ 1].Set(0,5,hf.Set());
Cell_REF[ 1].Set(1,2,hf.Set(2,2));
Cell_REF[ 1].Set(2,1,hf.Set());
// Cell #3
Cell_REF[ 2].Set(0,1,hf.Set());
Cell_REF[ 2].Set(1,5,hf.Set());
Cell_REF[ 2].Set(2,3,hf.Set(3,0));
// Cell #4
Cell_REF[ 3].Set(0,4,hf.Set(0,0));
Cell_REF[ 3].Set(1,5,hf.Set());
Cell_REF[ 3].Set(2,1,hf.Set());
// Cell #5
Cell_REF[ 4].Set(0,9,hf.Set());
Cell_REF[ 4].Set(1,6,hf.Set(5,2));
Cell_REF[ 4].Set(2,5,hf.Set());
// Cell #6
Cell_REF[ 5].Set(0,9,hf.Set());
Cell_REF[ 5].Set(1,5,hf.Set());
Cell_REF[ 5].Set(2,7,hf.Set(6,0));
// Cell #7
Cell_REF[ 6].Set(0,8,hf.Set(4,1));
Cell_REF[ 6].Set(1,9,hf.Set());
Cell_REF[ 6].Set(2,5,hf.Set());
// error check
for (CellIndType cc = 0; cc < TM.Num_Cells(); ++cc)
{
const VtxIndType* C_vtx = NULL;
const HalfFacetType* C_hf = NULL;
TM.Get_Cell(cc, C_vtx, C_hf);
if (!Cell_REF[cc].Equal(C_vtx, C_hf))
{
cout << "Cell connectivity (and sibling half-facets) is incorrect!" << endl;
OUTPUT_CODE = 2;
break;
}
}
// 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);