Lines Matching full:edge
46 int Subdiv2D::nextEdge(int edge) const
48 CV_DbgAssert((size_t)(edge >> 2) < qedges.size());
49 return qedges[edge >> 2].next[edge & 3];
52 int Subdiv2D::rotateEdge(int edge, int rotate) const
54 return (edge & ~3) + ((edge + rotate) & 3);
57 int Subdiv2D::symEdge(int edge) const
59 return edge ^ 2;
62 int Subdiv2D::getEdge(int edge, int nextEdgeType) const
64 CV_DbgAssert((size_t)(edge >> 2) < qedges.size());
65 edge = qedges[edge >> 2].next[(edge + nextEdgeType) & 3];
66 return (edge & ~3) + ((edge + (nextEdgeType >> 4)) & 3);
69 int Subdiv2D::edgeOrg(int edge, CV_OUT Point2f* orgpt) const
71 CV_DbgAssert((size_t)(edge >> 2) < qedges.size());
72 int vidx = qedges[edge >> 2].pt[edge & 3];
81 int Subdiv2D::edgeDst(int edge, CV_OUT Point2f* dstpt) const
83 CV_DbgAssert((size_t)(edge >> 2) < qedges.size());
84 int vidx = qedges[edge >> 2].pt[(edge + 2) & 3];
179 void Subdiv2D::setEdgePoints(int edge, int orgPt, int dstPt)
181 qedges[edge >> 2].pt[edge & 3] = orgPt;
182 qedges[edge >> 2].pt[(edge + 2) & 3] = dstPt;
183 vtx[orgPt].firstEdge = edge;
184 vtx[dstPt].firstEdge = edge ^ 2;
189 int edge = newEdge();
191 splice(edge, getEdge(edgeA, NEXT_AROUND_LEFT));
192 splice(symEdge(edge), edgeB);
194 setEdgePoints(edge, edgeDst(edgeA), edgeOrg(edgeB));
195 return edge;
198 void Subdiv2D::swapEdges( int edge )
200 int sedge = symEdge(edge);
201 int a = getEdge(edge, PREV_AROUND_ORG);
204 splice(edge, a);
207 setEdgePoints(edge, edgeDst(a), edgeDst(b));
209 splice(edge, getEdge(a, NEXT_AROUND_LEFT));
218 int Subdiv2D::isRightOf(Point2f pt, int edge) const
221 edgeOrg(edge, &org);
222 edgeDst(edge, &dst);
235 int edge = freeQEdge*4;
236 freeQEdge = qedges[edge >> 2].next[1];
237 qedges[edge >> 2] = QuadEdge(edge);
238 return edge;
241 void Subdiv2D::deleteEdge(int edge)
243 CV_DbgAssert((size_t)(edge >> 2) < (size_t)qedges.size());
244 splice( edge, getEdge(edge, PREV_AROUND_ORG) );
245 int sedge = symEdge(edge);
248 edge >>= 2;
249 qedges[edge].next[0] = 0;
250 qedges[edge].next[1] = freeQEdge;
251 freeQEdge = edge;
288 int edge = recentEdge;
289 CV_Assert(edge > 0);
293 int right_of_curr = isRightOf(pt, edge);
296 edge = symEdge(edge);
302 int onext_edge = nextEdge( edge );
303 int dprev_edge = getEdge( edge, PREV_AROUND_DST );
318 edge = onext_edge;
333 edge = dprev_edge;
337 isRightOf( vtx[edgeDst(onext_edge)].pt, edge ) >= 0 )
339 edge = symEdge( edge );
344 edge = onext_edge;
349 recentEdge = edge;
354 edgeOrg(edge, &org_pt);
355 edgeDst(edge, &dst_pt);
367 vertex = edgeOrg( edge );
368 edge = 0;
373 vertex = edgeDst( edge );
374 edge = 0;
386 edge = 0;
390 _edge = edge;
650 int vertex = 0, edge = 0;
651 int loc = locate( pt, edge, vertex );
659 edgeOrg(edge, &start);
662 edge = rotateEdge(edge, 1);
672 CV_Assert( edgeDst(edge, &t) > 0 );
676 edge = getEdge( edge, NEXT_AROUND_LEFT );
681 CV_Assert( edgeOrg( edge, &t ) > 0 );
686 edge = getEdge( edge, PREV_AROUND_LEFT );
690 edgeDst(edge, &tempDiff);
691 edgeOrg(edge, &t);
696 vertex = edgeOrg(rotateEdge( edge, 3 ));
700 edge = symEdge( edge );
737 int edge = i;
738 edgeOrg(edge, &a);
739 edgemask[edge] = true;
740 edge = getEdge(edge, NEXT_AROUND_LEFT);
741 edgeOrg(edge, &b);
742 edgemask[edge] = true;
743 edge = getEdge(edge, NEXT_AROUND_LEFT);
744 edgeOrg(edge, &c);
745 edgemask[edge] = true;
772 int edge = rotateEdge(vtx[k].firstEdge, 1), t = edge;
781 while( t != edge );