Lines Matching defs:eOrg
305 /* __gl_meshSplice( eOrg, eDst ) is the basic operation for changing the
307 * eOrg->Onext <- OLD( eDst->Onext )
308 * eDst->Onext <- OLD( eOrg->Onext )
312 * - if eOrg->Org != eDst->Org, the two vertices are merged together
313 * - if eOrg->Org == eDst->Org, the origin is split into two vertices
314 * In both cases, eDst->Org is changed and eOrg->Org is untouched.
317 * - if eOrg->Lface == eDst->Lface, one loop is split into two
318 * - if eOrg->Lface != eDst->Lface, two distinct loops are joined into one
319 * In both cases, eDst->Lface is changed and eOrg->Lface is unaffected.
322 * If eDst == eOrg, the operation has no effect.
323 * If eDst == eOrg->Lnext, the new face will have a single edge.
324 * If eDst == eOrg->Lprev, the old face will have a single edge.
325 * If eDst == eOrg->Onext, the new vertex will have a single edge.
326 * If eDst == eOrg->Oprev, the old vertex will have a single edge.
328 int __gl_meshSplice( GLUhalfEdge *eOrg, GLUhalfEdge *eDst )
333 if( eOrg == eDst ) return 1;
335 if( eDst->Org != eOrg->Org ) {
338 KillVertex( eDst->Org, eOrg->Org );
340 if( eDst->Lface != eOrg->Lface ) {
343 KillFace( eDst->Lface, eOrg->Lface );
347 Splice( eDst, eOrg );
356 MakeVertex( newVertex, eDst, eOrg->Org );
357 eOrg->Org->anEdge = eOrg;
366 MakeFace( newFace, eDst, eOrg->Lface );
367 eOrg->Lface->anEdge = eOrg;
442 /* __gl_meshAddEdgeVertex( eOrg ) creates a new edge eNew such that
443 * eNew == eOrg->Lnext, and eNew->Dst is a newly created vertex.
444 * eOrg and eNew will have the same left face.
446 GLUhalfEdge *__gl_meshAddEdgeVertex( GLUhalfEdge *eOrg )
449 GLUhalfEdge *eNew = MakeEdge( eOrg );
455 Splice( eNew, eOrg->Lnext );
458 eNew->Org = eOrg->Dst;
465 eNew->Lface = eNewSym->Lface = eOrg->Lface;
471 /* __gl_meshSplitEdge( eOrg ) splits eOrg into two edges eOrg and eNew,
472 * such that eNew == eOrg->Lnext. The new vertex is eOrg->Dst == eNew->Org.
473 * eOrg and eNew will have the same left face.
475 GLUhalfEdge *__gl_meshSplitEdge( GLUhalfEdge *eOrg )
478 GLUhalfEdge *tempHalfEdge= __gl_meshAddEdgeVertex( eOrg );
483 /* Disconnect eOrg from eOrg->Dst and connect it to eNew->Org */
484 Splice( eOrg->Sym, eOrg->Sym->Oprev );
485 Splice( eOrg->Sym, eNew );
488 eOrg->Dst = eNew->Org;
489 eNew->Dst->anEdge = eNew->Sym; /* may have pointed to eOrg->Sym */
490 eNew->Rface = eOrg->Rface;
491 eNew->winding = eOrg->winding; /* copy old winding information */
492 eNew->Sym->winding = eOrg->Sym->winding;
498 /* __gl_meshConnect( eOrg, eDst ) creates a new edge from eOrg->Dst
500 * If eOrg->Lface == eDst->Lface, this splits one loop into two,
504 * If (eOrg == eDst), the new face will have only two edges.
505 * If (eOrg->Lnext == eDst), the old face is reduced to a single edge.
506 * If (eOrg->Lnext->Lnext == eDst), the old face is reduced to two edges.
508 GLUhalfEdge *__gl_meshConnect( GLUhalfEdge *eOrg, GLUhalfEdge *eDst )
512 GLUhalfEdge *eNew = MakeEdge( eOrg );
517 if( eDst->Lface != eOrg->Lface ) {
520 KillFace( eDst->Lface, eOrg->Lface );
524 Splice( eNew, eOrg->Lnext );
528 eNew->Org = eOrg->Dst;
530 eNew->Lface = eNewSym->Lface = eOrg->Lface;
533 eOrg->Lface->anEdge = eNewSym;
540 MakeFace( newFace, eNew, eOrg->Lface );