本文整理汇总了C++中Face_handle::faceIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ Face_handle::faceIndex方法的具体用法?C++ Face_handle::faceIndex怎么用?C++ Face_handle::faceIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Face_handle
的用法示例。
在下文中一共展示了Face_handle::faceIndex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: e
void Foam::CV2D::extractPatches
(
wordList& patchNames,
labelList& patchSizes,
EdgeMap<label>& mapEdgesRegion,
EdgeMap<label>& indirectPatchEdge
) const
{
label nPatches = qSurf_.patchNames().size() + 1;
label defaultPatchIndex = qSurf_.patchNames().size();
patchNames.setSize(nPatches);
patchSizes.setSize(nPatches, 0);
mapEdgesRegion.clear();
const wordList& existingPatches = qSurf_.patchNames();
forAll(existingPatches, sP)
{
patchNames[sP] = existingPatches[sP];
}
patchNames[defaultPatchIndex] = "CV2D_default_patch";
for
(
Triangulation::Finite_edges_iterator eit = finite_edges_begin();
eit != finite_edges_end();
++eit
)
{
Face_handle fOwner = eit->first;
Face_handle fNeighbor = fOwner->neighbor(eit->second);
Vertex_handle vA = fOwner->vertex(cw(eit->second));
Vertex_handle vB = fOwner->vertex(ccw(eit->second));
if
(
(vA->internalOrBoundaryPoint() && !vB->internalOrBoundaryPoint())
|| (vB->internalOrBoundaryPoint() && !vA->internalOrBoundaryPoint())
)
{
point ptA = toPoint3D(vA->point());
point ptB = toPoint3D(vB->point());
label patchIndex = qSurf_.findPatch(ptA, ptB);
if (patchIndex == -1)
{
patchIndex = defaultPatchIndex;
WarningInFunction
<< "Dual face found that is not on a surface "
<< "patch. Adding to CV2D_default_patch."
<< endl;
}
edge e(fOwner->faceIndex(), fNeighbor->faceIndex());
patchSizes[patchIndex]++;
mapEdgesRegion.insert(e, patchIndex);
if (!pointPair(*vA, *vB))
{
indirectPatchEdge.insert(e, 1);
}
}
}
}