GTS Library Reference Manual |
---|
#include <gts.h> #define GTS_FACE_CLASS (klass) #define GTS_FACE (obj) #define GTS_IS_FACE (obj) GtsFaceClass; 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);gboolean gts_face_is_compatible (GtsFace *f, GtsSurface *s);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. |
typedef struct { GtsTriangleClass parent_class; } GtsFaceClass;
The face class derived from GtsTriangleClass.
typedef struct { GtsTriangle triangle; GSList * surfaces; } GtsFace;
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 |
gboolean gts_face_has_parent_surface (GtsFace *f, GtsSurface *s);
f : | a GtsFace. |
s : | a GtsSurface. |
Returns : | TRUE if |
guint gts_face_neighbor_number (GtsFace *f, GtsSurface *s);
f : | a GtsFace. |
s : | a GtsSurface or NULL. |
Returns : | the number of faces neighbors of |
GSList * gts_face_neighbors (GtsFace *f, GtsSurface *s);
f : | a GtsFace. |
s : | a GtsSurface or NULL. |
Returns : | a list of unique GtsFace neighbors of |
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 |
gboolean gts_face_is_compatible (GtsFace *f, GtsSurface *s);
f : | a GtsFace. |
s : | a GtsSurface. |
Returns : | TRUE if |
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 >>> |