Name
Edges -- edge object and related functions.
Synopsis
#include <gts.h>
#define GTS_EDGE_CLASS (klass)
#define GTS_EDGE (obj)
#define GTS_IS_EDGE (obj)
struct GtsEdgeClass;
struct GtsEdge;
GtsEdgeClass* gts_edge_class (void);
GtsEdge* gts_edge_new (GtsEdgeClass *klass,
GtsVertex *v1,
GtsVertex *v2);
void gts_edge_replace (GtsEdge *e,
GtsEdge *with);
#define gts_edge_is_unattached (s)
GtsEdge* gts_edge_is_duplicate (GtsEdge *e);
GtsFace* gts_edge_has_parent_surface (GtsEdge *e,
GtsSurface *surface);
GtsFace* gts_edge_has_any_parent_surface (GtsEdge *e);
GtsFace* gts_edge_is_boundary (GtsEdge *e,
GtsSurface *surface);
guint gts_edge_is_contact (GtsEdge *e);
gboolean gts_edge_belongs_to_tetrahedron (GtsEdge *e);
guint gts_edge_face_number (GtsEdge *e,
GtsSurface *s);
gboolean (*GtsEncroachFunc) (GtsVertex *v,
GtsEdge *e,
GtsSurface *s,
gpointer data);
GtsVertex* gts_edge_is_encroached (GtsEdge *e,
GtsSurface *s,
GtsEncroachFunc encroaches,
gpointer data);
GList* gts_edges_merge (GList *edges);
GSList* gts_edges_from_vertices (GSList *vertices,
GtsSurface *parent);
void gts_edge_swap (GtsEdge *e,
GtsSurface *s); |
Details
GTS_EDGE_CLASS()
#define GTS_EDGE_CLASS(klass) |
Casts klass to GtsEdgeClass.
GTS_IS_EDGE()
Evaluates to TRUE if obj is a GtsEdge, FALSE otherwise.
struct GtsEdgeClass
The edge class. No virtual function associated.
struct GtsEdge
struct GtsEdge {
GtsSegment segment;
GSList * triangles;
}; |
The edge object.
gts_edge_replace ()
Replaces e with with. For each triangle which uses e as an
edge, e is replaced with with. The with->triangles list is
updated appropriately and the e->triangles list is freed and set
to NULL.
gts_edge_is_unattached()
#define gts_edge_is_unattached(s) ((s)->triangles == NULL ? TRUE : FALSE) |
Evaluates to TRUE if no triangles uses s as an edge, FALSE otherwise.
gts_edge_has_parent_surface ()
gts_edge_has_any_parent_surface ()
gts_edge_is_contact ()
guint gts_edge_is_contact (GtsEdge *e); |
gts_edge_belongs_to_tetrahedron ()
gboolean gts_edge_belongs_to_tetrahedron (GtsEdge *e); |
gts_edge_is_encroached ()
gts_edges_merge ()
GList* gts_edges_merge (GList *edges); |
For each edge in edges check if it is duplicated (as
returned by gts_edge_is_duplicate()). If it is replace it by its
duplicate, destroy it and remove it from the list.
gts_edges_from_vertices ()
GSList* gts_edges_from_vertices (GSList *vertices,
GtsSurface *parent); |
gts_edge_swap ()
Performs an "edge swap" on the two triangles sharing e and
belonging to s.