struct he {
struct he* sym;
struct he* next;
struct he* prev;
struct vert* v;
struct face* f;
void* data;
}
struct vert {
struct he* rep;
void* data;
}
struct face {
struct he* rep;
void* data;
}
(picture)
struct face* f;
struct he* e;
struct he* s;
struct he* fl[LOTS];
int i;
s = e = f->rep;
i = 0;
do {
fl[i++] = e->sym->f;
e = e->next;
} while (e != s);
RemoveEdge(struct he* e) {
/* fix edge->edge pointers */
e->prev->next = e->sym->next;
e->next->prev = e->sym->prev;
e->sym->next->prev = e->prev;
e->sym->prev->next = e->next;
/* fix edge->face pointers */
ee = e->sym->next;
while (ee != e->sym) {
ee->f = e->f;
ee = ee->next;
}
/* fix face->edge pointers */
e->f->rep = e->prev;
/* fix vertex->edge pointers */
e->v->rep = e->sym->prev;
e->sym->v->rep = e->prev;
DeleteFace(e->sym->f);
DeleteEdge(e);
}
Set sym pointer to NULL
(picture)
where B is number of boundaries
Representations and rolls are identical
(picture)
Vertices with arbitrary number of neighbors
ForeachMeshFace(m,f) {
p = SplitFace3to1(f);
SetPosition(P,x,y,z);
}