本文整理汇总了C++中triSurface::subsetMesh方法的典型用法代码示例。如果您正苦于以下问题:C++ triSurface::subsetMesh方法的具体用法?C++ triSurface::subsetMesh怎么用?C++ triSurface::subsetMesh使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类triSurface
的用法示例。
在下文中一共展示了triSurface::subsetMesh方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dir
// Dump collapse region to .obj file
static void writeRegionOBJ
(
const triSurface& surf,
const label regionI,
const labelList& collapseRegion,
const labelList& outsideVerts
)
{
fileName dir("regions");
mkDir(dir);
fileName regionName(dir / "region_" + name(regionI) + ".obj");
Pout<< "Dumping region " << regionI << " to file " << regionName << endl;
boolList include(surf.size(), false);
forAll(collapseRegion, faceI)
{
if (collapseRegion[faceI] == regionI)
{
include[faceI] = true;
}
}
labelList pointMap, faceMap;
triSurface regionSurf(surf.subsetMesh(include, pointMap, faceMap));
Pout<< "Region " << regionI << " surface:" << nl;
regionSurf.writeStats(Pout);
regionSurf.write(regionName);
// Dump corresponding outside vertices.
fileName pointsName(dir / "regionPoints_" + name(regionI) + ".obj");
Pout<< "Dumping region " << regionI << " points to file " << pointsName
<< endl;
OFstream str(pointsName);
forAll(outsideVerts, i)
{
meshTools::writeOBJ(str, surf.localPoints()[outsideVerts[i]]);
}