The library takes care of maintaining mesh manifoldness providing a simple interface to modificate. The user must provide the topology and geometry of an initial base triangular polyhedron.
The library API, related to mesh construction:
/*handle operators*/ Face* Surf::create(Point *p0, Point *p1, Point *p2); void Surf::destroy(Face *f); Edge* Surf::glue(Hedge *e1, Hedge *e2); Edge* Surf::unglue(Hedge *e1, Hedge *e2);
For adaptations purposes, Tops library supplies more four functions:
/*stellar operators*/
Vertex* split(Face *f);
Vertex* split(Hedge* e);
Hedge* weld(Vertex* w);
Hedge* flip(Hedge *h);
The above API's turns transparent to the user all topological changes of the surface and data structures updates.
In addition to these API's, the library also provides the standard operators for querying and navigating topological data structures.
The library data structure include a geometric data. This is supplied by algebra3 library so that Tops library deals with topological and geometic issues. Therefore, the application has full control of geometry aspects through the face, edge and vertex attribute classes.