Lines Matching refs:edge

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