GTS Library Reference Manual |
---|
#include <gts.h> #define GTS_FACE_CLASS (klass) #define GTS_FACE (obj) #define GTS_IS_FACE (obj) struct GtsFaceClass; struct GtsFace; GtsFaceClass* gts_face_class (void); GtsFace* gts_face_new (GtsFaceClass *klass, GtsEdge *e1, GtsEdge *e2, GtsEdge *e3);gboolean gts_face_has_parent_surface (GtsFace *f, GtsSurface *s);guint gts_face_neighbor_number (GtsFace *f, GtsSurface *s);GSList * gts_face_neighbors (GtsFace *f, GtsSurface *s); void gts_face_foreach_neighbor (GtsFace *f, GtsSurface *s, GtsFunc func,gpointer data);GSList * gts_faces_from_edges (GSList *edges, GtsSurface *s);
#define GTS_FACE_CLASS(klass)
Casts klass to GtsFaceClass.
klass : | a descendant of GtsFaceClass. |
#define GTS_IS_FACE(obj)
Evaluates to TRUE if obj is a GtsFace, FALSE otherwise.
obj : | a pointer to test. |
struct GtsFaceClass { GtsTriangleClass parent_class; };
The face class derived from GtsTriangleClass.
struct GtsFace { GtsTriangle triangle; GSList * surfaces; };
The face object.
GtsTriangle triangle | The parent object. |
surfaces | A list of GtsSurface using this face. |
GtsFace* gts_face_new (GtsFaceClass *klass, GtsEdge *e1, GtsEdge *e2, GtsEdge *e3);
klass : | a GtsFaceClass. |
e1 : | a GtsEdge. |
e2 : | a GtsEdge. |
e3 : | a GtsEdge. |
Returns : | a new GtsFace using e1, e2 and e3 as edges. |
gboolean gts_face_has_parent_surface (GtsFace *f, GtsSurface *s);
f : | a GtsFace. |
s : | a GtsSurface. |
Returns : | TRUE if f belongs to s, FALSE otherwise. |
guint gts_face_neighbor_number (GtsFace *f, GtsSurface *s);
f : | a GtsFace. |
s : | a GtsSurface or NULL. |
Returns : | the number of faces neighbors of f and belonging to s. |
GSList * gts_face_neighbors (GtsFace *f, GtsSurface *s);
f : | a GtsFace. |
s : | a GtsSurface or NULL. |
Returns : | a list of unique GtsFace neighbors of f and belonging to s. |
void gts_face_foreach_neighbor (GtsFace *f, GtsSurface *s, GtsFunc func,gpointer data);
Calls func for each neighbor of f belonging to s (if not NULL).
f : | a GtsFace. |
s : | a GtsSurface or NULL. |
func : | a GtsFunc. |
data : | user data to pass to func. |
GSList * gts_faces_from_edges (GSList *edges, GtsSurface *s);
Builds a list of unique faces which belong to s and have one of their edges in edges.
edges : | a list of GtsEdge. |
s : | a GtsSurface or NULL. |
Returns : | the list of faces. |
<<< Triangles | Surfaces >>> |