本文整理汇总了C++中ON_SimpleArray::Zero方法的典型用法代码示例。如果您正苦于以下问题:C++ ON_SimpleArray::Zero方法的具体用法?C++ ON_SimpleArray::Zero怎么用?C++ ON_SimpleArray::Zero使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ON_SimpleArray
的用法示例。
在下文中一共展示了ON_SimpleArray::Zero方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FindAdjacentFaces
static void FindAdjacentFaces(const ON_MeshTopology& Top,
ON_SimpleArray<int>& FacesToCheck,
const ON_SimpleArray<int>& SortedFaceArray,
ON_SimpleArray<int>& DupFaceArray,
bool bUseVertexConnections,
bool bTopologicalConnections)
{
int fi, vi, ei, facecount = FacesToCheck.Count(), totalcount = SortedFaceArray.Count();
DupFaceArray.Zero();
ON_SimpleArray<int> OldFacesToCheck = FacesToCheck;
FacesToCheck.Empty();
for (fi=0;fi<facecount;fi++)
{
if (totalcount > OldFacesToCheck[fi])
{
if (0 == SortedFaceArray[OldFacesToCheck[fi]])
{
FacesToCheck.Append(OldFacesToCheck[fi]);
DupFaceArray[OldFacesToCheck[fi]] = 1;
}
if (false == bUseVertexConnections)
{
int j;
const ON_MeshTopologyFace& face = Top.m_topf[OldFacesToCheck[fi]];
for(ei=0;ei<(face.IsQuad()?4:3);ei++)
{
const ON_MeshTopologyEdge& edge = Top.m_tope[face.m_topei[ei]];
if (1 == edge.m_topf_count || (false == bTopologicalConnections && true == IsUnweldedEdge(face.m_topei[ei], Top)))
continue;
for(j=0;j<edge.m_topf_count;j++)
{
if (0 == SortedFaceArray[edge.m_topfi[j]] && 1 != DupFaceArray[edge.m_topfi[j]])
{
FacesToCheck.Append(edge.m_topfi[j]);
DupFaceArray[edge.m_topfi[j]] = 1;
}
}
}
}
else
{
int j, k, m;
ON_3fPoint Pt;
const ON_MeshFace& face = Top.m_mesh->m_F[OldFacesToCheck[fi]];
for(vi=0;vi<(face.IsQuad()?4:3);vi++)
{
const ON_MeshTopologyVertex& vertex = Top.m_topv[Top.m_topv_map[face.vi[vi]]];
for (j=0; vertex.m_tope_count>j; j++)
{
const ON_MeshTopologyEdge& edge = Top.m_tope[vertex.m_topei[j]];
for (k=0; edge.m_topf_count>k; k++)
{
if (true == bTopologicalConnections)
{
if (0 == SortedFaceArray[edge.m_topfi[k]] && 1 != DupFaceArray[edge.m_topfi[k]])
{
FacesToCheck.Append(edge.m_topfi[k]);
DupFaceArray[edge.m_topfi[k]] = 1;
}
}
else
{
Pt = Top.m_mesh->m_V[vertex.m_vi[0]];
const ON_MeshFace& thisface = Top.m_mesh->m_F[edge.m_topfi[k]];
for (m=0; m<(thisface.IsQuad()?4:3);m++)
{
if (Pt != Top.m_mesh->m_V[thisface.vi[m]])
continue;
if (face.vi[vi] == thisface.vi[m] && 0 == SortedFaceArray[edge.m_topfi[k]] && 1 != DupFaceArray[edge.m_topfi[k]])
{
//Faces share vertex
FacesToCheck.Append(edge.m_topfi[k]);
DupFaceArray[edge.m_topfi[k]] = 1;
break;
}
}
}
}
}
}
}
}
}
}