本文整理汇总了C++中YsShellExt::GetConnectedVertex方法的典型用法代码示例。如果您正苦于以下问题:C++ YsShellExt::GetConnectedVertex方法的具体用法?C++ YsShellExt::GetConnectedVertex怎么用?C++ YsShellExt::GetConnectedVertex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类YsShellExt
的用法示例。
在下文中一共展示了YsShellExt::GetConnectedVertex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: boundaryEdge
YSRESULT YsShellExt_RoundUtil3d::SetUpForVertexSequenceAndPolygonArray(
const YsShellExt &shl,
const YsArray <YsArray <YsShellVertexHandle> > &allBoundary,
const YsArray <YsShellPolygonHandle> &sideAPolygonArray,
const YsArray <YsShellPolygonHandle> &sideBPolygonArray)
{
YsHashTable <YSSIZE_T> vtKeyToBoundaryIdx;
YsShellEdgeStore boundaryEdge((const YsShell &)shl);
for(auto idx : allBoundary.AllIndex())
{
YsArray <YsShellVertexHandle> contourVtHd=allBoundary[idx];
for(YSSIZE_T vtIdx=0; vtIdx<contourVtHd.GetN()-1; ++vtIdx)
{
if(YSTRUE!=boundaryEdge.IsIncluded(contourVtHd[vtIdx],contourVtHd[vtIdx+1]))
{
boundaryEdge.AddEdge(contourVtHd[vtIdx],contourVtHd[vtIdx+1]);
roundEdgeArray.Increment();
roundEdgeArray.Last().Initialize();
roundEdgeArray.Last().edVtHd[0]=contourVtHd[vtIdx];
roundEdgeArray.Last().edVtHd[1]=contourVtHd[vtIdx+1];
}
}
for(auto vtHd : contourVtHd)
{
vtKeyToBoundaryIdx.AddElement(shl.GetSearchKey(vtHd),idx);
}
}
// Boundary edge hash and sideBPolygon store have been constructed.
YsShellExt_OffsetUtil2d &sideAOffset=offsetUtil[0],&sideBOffset=offsetUtil[1];
YsShellPolygonStore sideAPolygon((const YsShell &)shl),sideBPolygon((const YsShell &)shl);
sideAPolygon.AddPolygon(sideAPolygonArray);
sideBPolygon.AddPolygon(sideBPolygonArray);
YSBOOL sideAOffsetNecessary=YSFALSE,sideBOffsetNecessary=YSFALSE;
if(YSTRUE==alwaysUseOffset)
{
sideAOffsetNecessary=YSTRUE;
sideBOffsetNecessary=YSTRUE;
}
else
{
for(auto boundary : allBoundary)
{
YsArray <YsShellVertexHandle> contourVtHd=boundary;
for(auto vtHd : contourVtHd)
{
YsArray <YsShellVertexHandle,16> connVtHdArray;
shl.GetConnectedVertex(connVtHdArray,vtHd);
YSBOOL sideAEdgePresent=YSFALSE,sideBEdgePresent=YSFALSE;
for(auto connVtHd : connVtHdArray)
{
if(YSTRUE==boundaryEdge.IsIncluded(vtHd,connVtHd))
{
continue;
}
if(YSTRUE==IsEdgeUsing(vtHd,connVtHd,shl.Conv(),sideAPolygon))
{
sideAEdgePresent=YSTRUE;
}
else if(YSTRUE==IsEdgeUsing(vtHd,connVtHd,shl.Conv(),sideBPolygon))
{
sideBEdgePresent=YSTRUE;
}
}
if(YSTRUE!=sideAEdgePresent)
{
sideAOffsetNecessary=YSTRUE;
}
if(YSTRUE!=sideBEdgePresent)
{
sideBOffsetNecessary=YSTRUE;
}
}
}
}
printf("%s %d\n",__FUNCTION__,__LINE__);
printf("%d %d\n",sideAOffsetNecessary,sideBOffsetNecessary);
if(YSTRUE==sideAOffsetNecessary)
{
if(YSOK!=sideAOffset.SetUpForOneSideOfVertexSequence(shl,allBoundary,sideAPolygonArray))
{
return YSERR;
}
for(YSSIZE_T idx=0; idx<sideAOffset.newVtxArray.GetN(); ++idx)
{
auto newVtx=sideAOffset.newVtxArray[idx];
cornerArray.Increment();
cornerArray.Last().Initialize();
cornerArray.Last().fromVtHd=newVtx.fromVtHd;
cornerArray.Last().toVtHd=NULL;
//.........这里部分代码省略.........