pcb 4.1.1
An interactive printed circuit board layout editor.

gts.h File Reference

#include <stdio.h>
#include <glib.h>
Include dependency graph for gts.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _GtsColor
struct  _GtsFile
struct  _GtsFileVariable
struct  _GtsObjectClassInfo
struct  _GtsObject
struct  _GtsObjectClass
struct  _GtsRange
struct  _GtsPoint
struct  _GtsPointClass
struct  _GtsVertex
struct  _GtsVertexClass
struct  _GtsVertexNormal
struct  _GtsColorVertex
struct  _GtsSegment
struct  _GtsSegmentClass
struct  _GtsEdge
struct  _GtsEdgeClass
struct  _GtsTriangle
struct  _GtsTriangleClass
struct  _GtsFace
struct  _GtsFaceClass
struct  _GtsBBox
struct  _GtsBBoxClass
struct  _GtsSurfaceStats
struct  _GtsSurfaceQualityStats
struct  _GtsSurface
struct  _GtsSurfaceClass
struct  _GtsVolumeOptimizedParams
struct  _GtsSurfaceInter
struct  _GtsSurfaceInterClass
struct  _GtsEHeap
struct  _GtsEHeapPair
struct  _GtsSplit
struct  _GtsSplitClass
struct  _GtsPSurface
struct  _GtsPSurfaceClass
struct  _GtsHSplit
struct  _GtsHSplitClass
struct  _GtsHSurface
struct  _GtsHSurfaceClass
struct  _GtsConstraint
struct  _GtsConstraintClass
struct  _GtsListFace
struct  _GtsGridPlane
struct  _GtsCartesianGrid
struct  _GtsNVertex
struct  _GtsNVertexClass
struct  _GtsNEdge
struct  _GtsNEdgeClass
struct  _GtsNFace
struct  _GtsNFaceClass
struct  _GtsClusterId
struct  _GtsCluster
struct  _GtsClusterClass
struct  _GtsClusterGrid
struct  _GtsClusterGridClass
struct  _GtsContainee
struct  _GtsContaineeClass
struct  _GtsSListContainee
struct  _GtsSListContaineeClass
struct  _GtsContainer
struct  _GtsContainerClass
struct  _GtsHashContainer
struct  _GtsHashContainerClass
struct  _GtsSListContainer
struct  _GtsSListContainerClass
struct  _GtsGNode
struct  _GtsGNodeClass
struct  _GtsNGNode
struct  _GtsNGNodeClass
struct  _GtsWGNode
struct  _GtsWGNodeClass
struct  _GtsPNode
struct  _GtsPNodeClass
struct  _GtsFNode
struct  _GtsFNodeClass
struct  _GtsGEdge
struct  _GtsGEdgeClass
struct  _GtsPGEdge
struct  _GtsPGEdgeClass
struct  _GtsWGEdge
struct  _GtsWGEdgeClass
struct  _GtsGraph
struct  _GtsGraphClass
struct  _GtsWGraph
struct  _GtsWGraphClass
struct  _GtsGNodeSplit
struct  _GtsGNodeSplitClass
struct  _GtsPGraph
struct  _GtsPGraphClass
struct  _GtsGraphBisection

Defines

#define GTS_MAJOR_VERSION   0
#define GTS_MINOR_VERSION   7
#define GTS_MICRO_VERSION   6
#define GTS_C_VAR   extern
#define GTS_CHECK_VERSION(major, minor, micro)
#define GTS_COMMENTS   "#!"
#define GTS_MAINTAINER   "popinet@users.sourceforge.net"
#define GTS_OBJECT_CAST(obj, type, klass)   ((type *) (obj))
#define GTS_OBJECT_CLASS_CAST(objklass, type, klass)   ((type *) (objklass))
#define GTS_CLASS_NAME_LENGTH   40
#define GTS_OBJECT(obj)
#define GTS_OBJECT_CLASS(klass)
#define GTS_IS_OBJECT(obj)
#define GTS_OBJECT_FLAGS(obj)   (GTS_OBJECT (obj)->flags)
#define GTS_OBJECT_DESTROYED(obj)   ((GTS_OBJECT_FLAGS (obj) & GTS_DESTROYED) != 0)
#define GTS_OBJECT_SET_FLAGS(obj, flag)   G_STMT_START{ (GTS_OBJECT_FLAGS (obj) |= (flag)); }G_STMT_END
#define GTS_OBJECT_UNSET_FLAGS(obj, flag)   G_STMT_START{ (GTS_OBJECT_FLAGS (obj) &= ~(flag)); }G_STMT_END
#define GTS_IS_POINT(obj)
#define GTS_POINT(obj)
#define GTS_POINT_CLASS(klass)
#define gts_point_is_in_rectangle(p, p1, p2)
#define GTS_IS_VERTEX(obj)
#define GTS_VERTEX(obj)
#define GTS_VERTEX_CLASS(klass)
#define GTS_VERTEX_NORMAL(obj)
#define GTS_IS_VERTEX_NORMAL(obj)
#define GTS_COLOR_VERTEX(obj)
#define GTS_IS_COLOR_VERTEX(obj)
#define GTS_IS_SEGMENT(obj)
#define GTS_SEGMENT(obj)
#define GTS_SEGMENT_CLASS(klass)
#define gts_segment_connect(s, e1, e2)
#define gts_segments_are_identical(s1, s2)
#define gts_segments_touch(s1, s2)
#define GTS_IS_EDGE(obj)
#define GTS_EDGE(obj)
#define GTS_EDGE_CLASS(klass)
#define gts_edge_is_unattached(s)   ((s)->triangles == NULL ? TRUE : FALSE)
#define GTS_IS_TRIANGLE(obj)
#define GTS_TRIANGLE(obj)
#define GTS_TRIANGLE_CLASS(klass)
#define gts_triangle_vertex(t)
#define GTS_IS_FACE(obj)
#define GTS_FACE(obj)
#define GTS_FACE_CLASS(klass)
#define gts_vector_cross(C, A, B)
#define gts_vector_init(v, p1, p2)
#define gts_vector_scalar(v1, v2)
#define gts_vector_norm(v)
#define gts_vector_normalize(v)
#define gts_kdtree_destroy(tree)   g_node_destroy(tree)
#define GTS_IS_BBOX(obj)
#define GTS_BBOX(obj)
#define GTS_BBOX_CLASS(klass)
#define gts_bbox_point_is_inside(bbox, p)
#define GTS_IS_SURFACE(obj)
#define GTS_SURFACE(obj)
#define GTS_SURFACE_CLASS(klass)
#define GTS_IS_SURFACE_INTER(obj)
#define GTS_SURFACE_INTER(obj)
#define GTS_SURFACE_INTER_CLASS(klass)
#define GTS_IS_SPLIT(obj)
#define GTS_SPLIT(obj)
#define GTS_SPLIT_CLASS(klass)
#define GTS_SPLIT_V1(vs)
#define GTS_SPLIT_V2(vs)
#define GTS_IS_PSURFACE(obj)
#define GTS_PSURFACE(obj)
#define GTS_PSURFACE_CLASS(klass)
#define GTS_PSURFACE_IS_CLOSED(ps)   (!(ps)->vertices)
#define GTS_IS_HSPLIT(obj)
#define GTS_HSPLIT(obj)
#define GTS_HSPLIT_CLASS(klass)
#define GTS_IS_HSURFACE(obj)
#define GTS_HSURFACE(obj)
#define GTS_HSURFACE_CLASS(klass)
#define GTS_IS_CONSTRAINT(obj)
#define GTS_CONSTRAINT(obj)
#define GTS_CONSTRAINT_CLASS(klass)
#define GTS_LIST_FACE(obj)
#define GTS_IS_LIST_FACE(obj)
#define GTS_NAME_LENGTH   40
#define GTS_NVERTEX(obj)
#define GTS_NVERTEX_CLASS(klass)
#define GTS_IS_NVERTEX(obj)
#define GTS_NEDGE(obj)
#define GTS_NEDGE_CLASS(klass)
#define GTS_IS_NEDGE(obj)
#define GTS_NFACE(obj)
#define GTS_NFACE_CLASS(klass)
#define GTS_IS_NFACE(obj)
#define GTS_CLUSTER(obj)
#define GTS_CLUSTER_CLASS(klass)
#define GTS_IS_CLUSTER(obj)
#define GTS_CLUSTER_GRID(obj)
#define GTS_CLUSTER_GRID_CLASS(klass)
#define GTS_IS_CLUSTER_GRID(obj)
#define GTS_CONTAINEE(obj)
#define GTS_CONTAINEE_CLASS(klass)
#define GTS_IS_CONTAINEE(obj)
#define GTS_SLIST_CONTAINEE(obj)
#define GTS_SLIST_CONTAINEE_CLASS(klass)
#define GTS_IS_SLIST_CONTAINEE(obj)
#define GTS_CONTAINER(obj)
#define GTS_CONTAINER_CLASS(klass)
#define GTS_IS_CONTAINER(obj)
#define GTS_HASH_CONTAINER(obj)
#define GTS_HASH_CONTAINER_CLASS(klass)
#define GTS_IS_HASH_CONTAINER(obj)
#define GTS_SLIST_CONTAINER(obj)
#define GTS_SLIST_CONTAINER_CLASS(klass)
#define GTS_IS_SLIST_CONTAINER(obj)
#define GTS_GNODE(obj)
#define GTS_GNODE_CLASS(klass)
#define GTS_IS_GNODE(obj)
#define GTS_GNODE_NEIGHBOR(n, e)   (GTS_GEDGE (e)->n1 == n ? GTS_GEDGE (e)->n2 : GTS_GEDGE (e)->n2 == n ? GTS_GEDGE (e)->n1 : NULL)
#define GTS_NGNODE(obj)
#define GTS_NGNODE_CLASS(klass)
#define GTS_IS_NGNODE(obj)
#define GTS_WGNODE(obj)
#define GTS_WGNODE_CLASS(klass)
#define GTS_IS_WGNODE(obj)
#define GTS_PNODE(obj)
#define GTS_PNODE_CLASS(klass)
#define GTS_IS_PNODE(obj)
#define GTS_FNODE(obj)
#define GTS_FNODE_CLASS(klass)
#define GTS_IS_FNODE(obj)
#define GTS_GEDGE(obj)
#define GTS_GEDGE_CLASS(klass)
#define GTS_IS_GEDGE(obj)
#define gts_gedge_connects(e, a1, a2)   (((e)->n1 == a1 && (e)->n2 == a2) || ((e)->n1 == a2 && (e)->n2 == a1))
#define GTS_PGEDGE(obj)
#define GTS_PGEDGE_CLASS(klass)
#define GTS_IS_PGEDGE(obj)
#define GTS_WGEDGE(obj)
#define GTS_WGEDGE_CLASS(klass)
#define GTS_IS_WGEDGE(obj)
#define GTS_GRAPH(obj)
#define GTS_GRAPH_CLASS(klass)
#define GTS_IS_GRAPH(obj)
#define GTS_WGRAPH(obj)
#define GTS_WGRAPH_CLASS(klass)
#define GTS_IS_WGRAPH(obj)
#define GTS_GNODE_SPLIT(obj)
#define GTS_GNODE_SPLIT_CLASS(klass)
#define GTS_IS_GNODE_SPLIT(obj)
#define GTS_GNODE_SPLIT_N1(ns)   (GTS_IS_GNODE_SPLIT ((ns)->n1) ? GTS_GNODE_SPLIT ((ns)->n1)->n : GTS_GNODE ((ns)->n1))
#define GTS_GNODE_SPLIT_N2(ns)   (GTS_IS_GNODE_SPLIT ((ns)->n2) ? GTS_GNODE_SPLIT ((ns)->n2)->n : GTS_GNODE ((ns)->n2))
#define GTS_PGRAPH(obj)
#define GTS_PGRAPH_CLASS(klass)
#define GTS_IS_PGRAPH(obj)

Typedefs

typedef struct _GtsObjectClassInfo GtsObjectClassInfo
typedef struct _GtsObject GtsObject
typedef struct _GtsObjectClass GtsObjectClass
typedef struct _GtsPoint GtsPoint
typedef struct _GtsPointClass GtsPointClass
typedef struct _GtsVertex GtsVertex
typedef struct _GtsVertexClass GtsVertexClass
typedef struct _GtsSegment GtsSegment
typedef struct _GtsSegmentClass GtsSegmentClass
typedef struct _GtsEdge GtsEdge
typedef struct _GtsEdgeClass GtsEdgeClass
typedef struct _GtsTriangle GtsTriangle
typedef struct _GtsTriangleClass GtsTriangleClass
typedef struct _GtsFace GtsFace
typedef struct _GtsFaceClass GtsFaceClass
typedef struct _GtsBBox GtsBBox
typedef struct _GtsBBoxClass GtsBBoxClass
typedef struct _GtsSurface GtsSurface
typedef struct _GtsSurfaceClass GtsSurfaceClass
typedef void(* GtsObjectClassInitFunc )(GtsObjectClass *objclass)
typedef void(* GtsObjectInitFunc )(GtsObject *obj)
typedef void(* GtsArgSetFunc )(GtsObject *obj)
typedef void(* GtsArgGetFunc )(GtsObject *obj)
typedef gdouble GtsVector [3]
typedef gdouble GtsVector4 [4]
typedef GtsVector4 GtsMatrix
typedef gdouble(* GtsKeyFunc )(gpointer item, gpointer data)
typedef struct _GtsColor GtsColor
typedef gint(* GtsFunc )(gpointer item, gpointer data)
typedef struct _GtsFile GtsFile
typedef struct _GtsFileVariable GtsFileVariable
typedef struct _GtsRange GtsRange
typedef struct _GtsVertexNormal GtsVertexNormal
typedef struct _GtsColorVertex GtsColorVertex
typedef void(* GtsBBTreeTraverseFunc )(GtsBBox *bb1, GtsBBox *bb2, gpointer data)
typedef gdouble(* GtsBBoxDistFunc )(GtsPoint *p, gpointer bounded)
typedef GtsPoint *(* GtsBBoxClosestFunc )(GtsPoint *p, gpointer bounded)
typedef struct _GtsSurfaceStats GtsSurfaceStats
typedef struct
_GtsSurfaceQualityStats 
GtsSurfaceQualityStats
typedef GtsVertex *(* GtsRefineFunc )(GtsEdge *e, GtsVertexClass *klass, gpointer data)
typedef GtsVertex *(* GtsCoarsenFunc )(GtsEdge *e, GtsVertexClass *klass, gpointer data)
typedef gboolean(* GtsStopFunc )(gdouble cost, guint nedge, gpointer data)
typedef struct _GtsSurfaceTraverse GtsSurfaceTraverse
typedef struct
_GtsVolumeOptimizedParams 
GtsVolumeOptimizedParams
typedef struct _GtsSurfaceInter GtsSurfaceInter
typedef struct
_GtsSurfaceInterClass 
GtsSurfaceInterClass
typedef struct _GtsHeap GtsHeap
typedef struct _GtsEHeap GtsEHeap
typedef struct _GtsEHeapPair GtsEHeapPair
typedef struct _GtsFifo GtsFifo
typedef struct _GtsSplit GtsSplit
typedef struct _GtsSplitClass GtsSplitClass
typedef struct _GtsSplitCFace GtsSplitCFace
typedef gboolean(* GtsSplitTraverseFunc )(GtsSplit *vs, gpointer data)
typedef struct _GtsPSurface GtsPSurface
typedef struct _GtsPSurfaceClass GtsPSurfaceClass
typedef struct _GtsHSplit GtsHSplit
typedef struct _GtsHSplitClass GtsHSplitClass
typedef struct _GtsHSurface GtsHSurface
typedef struct _GtsHSurfaceClass GtsHSurfaceClass
typedef struct _GtsConstraint GtsConstraint
typedef struct _GtsConstraintClass GtsConstraintClass
typedef struct _GtsListFace GtsListFace
typedef gboolean(* GtsEncroachFunc )(GtsVertex *v, GtsEdge *e, GtsSurface *s, gpointer data)
typedef struct _GtsGridPlane GtsGridPlane
typedef struct _GtsIsoSlice GtsIsoSlice
typedef struct _GtsCartesianGrid GtsCartesianGrid
typedef void(* GtsIsoCartesianFunc )(gdouble **a, GtsCartesianGrid g, guint i, gpointer data)
typedef struct _GtsNVertex GtsNVertex
typedef struct _GtsNVertexClass GtsNVertexClass
typedef struct _GtsNEdge GtsNEdge
typedef struct _GtsNEdgeClass GtsNEdgeClass
typedef struct _GtsNFace GtsNFace
typedef struct _GtsNFaceClass GtsNFaceClass
typedef struct _GtsCluster GtsCluster
typedef struct _GtsClusterClass GtsClusterClass
typedef struct _GtsClusterId GtsClusterId
typedef struct _GtsClusterGrid GtsClusterGrid
typedef struct _GtsClusterGridClass GtsClusterGridClass
typedef struct _GtsContainee GtsContainee
typedef struct _GtsContaineeClass GtsContaineeClass
typedef struct _GtsContainer GtsContainer
typedef struct _GtsContainerClass GtsContainerClass
typedef struct _GtsSListContainee GtsSListContainee
typedef struct
_GtsSListContaineeClass 
GtsSListContaineeClass
typedef struct _GtsHashContainer GtsHashContainer
typedef struct
_GtsHashContainerClass 
GtsHashContainerClass
typedef struct _GtsSListContainer GtsSListContainer
typedef struct
_GtsSListContainerClass 
GtsSListContainerClass
typedef struct _GtsGNode GtsGNode
typedef struct _GtsGNodeClass GtsGNodeClass
typedef struct _GtsGraph GtsGraph
typedef struct _GtsGraphClass GtsGraphClass
typedef struct _GtsNGNode GtsNGNode
typedef struct _GtsNGNodeClass GtsNGNodeClass
typedef struct _GtsWGNode GtsWGNode
typedef struct _GtsWGNodeClass GtsWGNodeClass
typedef struct _GtsPNode GtsPNode
typedef struct _GtsPNodeClass GtsPNodeClass
typedef struct _GtsFNode GtsFNode
typedef struct _GtsFNodeClass GtsFNodeClass
typedef struct _GtsGEdge GtsGEdge
typedef struct _GtsGEdgeClass GtsGEdgeClass
typedef struct _GtsPGEdge GtsPGEdge
typedef struct _GtsPGEdgeClass GtsPGEdgeClass
typedef struct _GtsWGEdge GtsWGEdge
typedef struct _GtsWGEdgeClass GtsWGEdgeClass
typedef struct _GtsGraphTraverse GtsGraphTraverse
typedef struct _GtsWGraph GtsWGraph
typedef struct _GtsWGraphClass GtsWGraphClass
typedef struct _GtsGNodeSplit GtsGNodeSplit
typedef struct _GtsGNodeSplitClass GtsGNodeSplitClass
typedef struct _GtsPGraph GtsPGraph
typedef struct _GtsPGraphClass GtsPGraphClass
typedef struct _GtsGraphBisection GtsGraphBisection

Enumerations

enum  GtsIntersect { GTS_OUT = -1, GTS_ON = 0, GTS_IN = 1 }
enum  GtsTokenType {
  GTS_NONE = 1 << 8, GTS_INT = 1 << 9, GTS_UINT = 1 << 10, GTS_FLOAT = 1 << 11,
  GTS_DOUBLE = 1 << 12, GTS_STRING = 1 << 13, GTS_FILE = 1 << 14, GTS_ERROR = 1 << 15
}
enum  GtsObjectFlags { GTS_DESTROYED = 1 << 0, GTS_USER_FLAG = 1 }
enum  GtsBooleanOperation { GTS_1_OUT_2, GTS_1_IN_2, GTS_2_OUT_1, GTS_2_IN_1 }
enum  GtsTraverseType { GTS_BREADTH_FIRST }

Functions

void gts_predicates_init ()
GtsFilegts_file_new (FILE *fp)
GtsFilegts_file_new_from_string (const gchar *s)
void gts_file_verror (GtsFile *f, const gchar *format, va_list args)
void gts_file_error (GtsFile *f, const gchar *format,...)
gint gts_file_getc (GtsFile *f)
guint gts_file_read (GtsFile *f, gpointer ptr, guint size, guint nmemb)
gint gts_file_getc_scope (GtsFile *f)
void gts_file_next_token (GtsFile *f)
void gts_file_first_token_after (GtsFile *f, GtsTokenType type)
void gts_file_assign_start (GtsFile *f, GtsFileVariable *vars)
GtsFileVariablegts_file_assign_next (GtsFile *f, GtsFileVariable *vars)
void gts_file_assign_variables (GtsFile *f, GtsFileVariable *vars)
void gts_file_variable_error (GtsFile *f, GtsFileVariable *vars, const gchar *name, const gchar *format,...)
void gts_file_destroy (GtsFile *f)
gpointer gts_object_class_new (GtsObjectClass *parent_class, GtsObjectClassInfo *info)
GtsObjectClassgts_object_class (void)
gpointer gts_object_check_cast (gpointer object, gpointer klass)
gpointer gts_object_class_check_cast (gpointer klass, gpointer from)
static gpointer gts_object_is_from_class (gpointer object, gpointer klass)
static gpointer gts_object_class_is_from_class (gpointer klass, gpointer from)
GtsObjectClassgts_object_class_from_name (const gchar *name)
GtsObjectgts_object_new (GtsObjectClass *klass)
GtsObjectgts_object_clone (GtsObject *object)
void gts_object_attributes (GtsObject *object, GtsObject *from)
void gts_object_init (GtsObject *object, GtsObjectClass *klass)
void gts_object_reset_reserved (GtsObject *object)
void gts_object_destroy (GtsObject *object)
void gts_finalize (void)
void gts_range_init (GtsRange *r)
void gts_range_reset (GtsRange *r)
void gts_range_add_value (GtsRange *r, gdouble val)
void gts_range_update (GtsRange *r)
void gts_range_print (GtsRange *r, FILE *fptr)
GtsPointClassgts_point_class (void)
GtsPointgts_point_new (GtsPointClass *klass, gdouble x, gdouble y, gdouble z)
void gts_point_set (GtsPoint *p, gdouble x, gdouble y, gdouble z)
GtsPointgts_segment_triangle_intersection (GtsSegment *s, GtsTriangle *t, gboolean boundary, GtsPointClass *klass)
void gts_point_transform (GtsPoint *p, GtsMatrix *m)
gdouble gts_point_distance (GtsPoint *p1, GtsPoint *p2)
gdouble gts_point_distance2 (GtsPoint *p1, GtsPoint *p2)
gdouble gts_point_orientation_3d (GtsPoint *p1, GtsPoint *p2, GtsPoint *p3, GtsPoint *p4)
gint gts_point_orientation_3d_sos (GtsPoint *p1, GtsPoint *p2, GtsPoint *p3, GtsPoint *p4)
GtsIntersect gts_point_is_in_triangle (GtsPoint *p, GtsTriangle *t)
gdouble gts_point_in_circle (GtsPoint *p, GtsPoint *p1, GtsPoint *p2, GtsPoint *p3)
gdouble gts_point_in_sphere (GtsPoint *p, GtsPoint *p1, GtsPoint *p2, GtsPoint *p3, GtsPoint *p4)
gdouble gts_point_in_triangle_circle (GtsPoint *p, GtsTriangle *t)
gdouble gts_point_orientation (GtsPoint *p1, GtsPoint *p2, GtsPoint *p3)
gint gts_point_orientation_sos (GtsPoint *p1, GtsPoint *p2, GtsPoint *p3)
gdouble gts_point_segment_distance2 (GtsPoint *p, GtsSegment *s)
gdouble gts_point_segment_distance (GtsPoint *p, GtsSegment *s)
void gts_point_segment_closest (GtsPoint *p, GtsSegment *s, GtsPoint *closest)
gdouble gts_point_triangle_distance2 (GtsPoint *p, GtsTriangle *t)
gdouble gts_point_triangle_distance (GtsPoint *p, GtsTriangle *t)
void gts_point_triangle_closest (GtsPoint *p, GtsTriangle *t, GtsPoint *closest)
gboolean gts_point_is_inside_surface (GtsPoint *p, GNode *tree, gboolean is_open)
GtsVertexClassgts_vertex_class (void)
GtsVertexgts_vertex_new (GtsVertexClass *klass, gdouble x, gdouble y, gdouble z)
void gts_vertex_replace (GtsVertex *v, GtsVertex *with)
gboolean gts_vertex_is_unattached (GtsVertex *v)
GtsSegmentgts_vertices_are_connected (GtsVertex *v1, GtsVertex *v2)
GSList * gts_vertex_triangles (GtsVertex *v, GSList *list)
GSList * gts_vertex_faces (GtsVertex *v, GtsSurface *surface, GSList *list)
GSList * gts_vertex_neighbors (GtsVertex *v, GSList *list, GtsSurface *surface)
GSList * gts_vertices_from_segments (GSList *segments)
gboolean gts_vertex_is_boundary (GtsVertex *v, GtsSurface *surface)
GList * gts_vertices_merge (GList *vertices, gdouble epsilon, gboolean(*check)(GtsVertex *, GtsVertex *))
GSList * gts_vertex_fan_oriented (GtsVertex *v, GtsSurface *surface)
guint gts_vertex_is_contact (GtsVertex *v, gboolean sever)
GtsVertexClassgts_vertex_normal_class (void)
GtsVertexClassgts_color_vertex_class (void)
GtsSegmentClassgts_segment_class (void)
GtsSegmentgts_segment_new (GtsSegmentClass *klass, GtsVertex *v1, GtsVertex *v2)
GtsIntersect gts_segments_are_intersecting (GtsSegment *s1, GtsSegment *s2)
GtsSegmentgts_segment_is_duplicate (GtsSegment *s)
GtsVertexgts_segment_midvertex (GtsSegment *s, GtsVertexClass *klass)
GSList * gts_segments_from_vertices (GSList *vertices)
gboolean gts_segment_is_ok (GtsSegment *s)
GtsEdgeClassgts_edge_class (void)
GtsEdgegts_edge_new (GtsEdgeClass *klass, GtsVertex *v1, GtsVertex *v2)
GtsFacegts_edge_has_parent_surface (GtsEdge *e, GtsSurface *surface)
GtsFacegts_edge_has_any_parent_surface (GtsEdge *e)
GtsFacegts_edge_is_boundary (GtsEdge *e, GtsSurface *surface)
void gts_edge_replace (GtsEdge *e, GtsEdge *with)
GSList * gts_edges_from_vertices (GSList *vertices, GtsSurface *parent)
guint gts_edge_face_number (GtsEdge *e, GtsSurface *s)
gboolean gts_edge_collapse_is_valid (GtsEdge *e)
gboolean gts_edge_collapse_creates_fold (GtsEdge *e, GtsVertex *v, gdouble max)
GtsEdgegts_edge_is_duplicate (GtsEdge *e)
GList * gts_edges_merge (GList *edges)
gboolean gts_edge_belongs_to_tetrahedron (GtsEdge *e)
guint gts_edge_is_contact (GtsEdge *e)
void gts_edge_swap (GtsEdge *e, GtsSurface *s)
gboolean gts_edge_manifold_faces (GtsEdge *e, GtsSurface *s, GtsFace **f1, GtsFace **f2)
GtsTriangleClassgts_triangle_class (void)
void gts_triangle_set (GtsTriangle *triangle, GtsEdge *e1, GtsEdge *e2, GtsEdge *e3)
GtsTrianglegts_triangle_new (GtsTriangleClass *klass, GtsEdge *e1, GtsEdge *e2, GtsEdge *e3)
GtsVertexgts_triangle_vertex_opposite (GtsTriangle *t, GtsEdge *e)
GtsEdgegts_triangle_edge_opposite (GtsTriangle *t, GtsVertex *v)
gdouble gts_triangles_angle (GtsTriangle *t1, GtsTriangle *t2)
gboolean gts_triangles_are_compatible (GtsTriangle *t1, GtsTriangle *t2, GtsEdge *e)
gdouble gts_triangle_area (GtsTriangle *t)
gdouble gts_triangle_perimeter (GtsTriangle *t)
gdouble gts_triangle_quality (GtsTriangle *t)
void gts_triangle_normal (GtsTriangle *t, gdouble *x, gdouble *y, gdouble *z)
gdouble gts_triangle_orientation (GtsTriangle *t)
void gts_triangle_revert (GtsTriangle *t)
GSList * gts_triangles_from_edges (GSList *edges)
void gts_triangle_vertices_edges (GtsTriangle *t, GtsEdge *e, GtsVertex **v1, GtsVertex **v2, GtsVertex **v3, GtsEdge **e1, GtsEdge **e2, GtsEdge **e3)
GtsTrianglegts_triangle_enclosing (GtsTriangleClass *klass, GSList *points, gdouble scale)
guint gts_triangle_neighbor_number (GtsTriangle *t)
GSList * gts_triangle_neighbors (GtsTriangle *t)
GtsEdgegts_triangles_common_edge (GtsTriangle *t1, GtsTriangle *t2)
GtsTrianglegts_triangle_is_duplicate (GtsTriangle *t)
GtsTrianglegts_triangle_use_edges (GtsEdge *e1, GtsEdge *e2, GtsEdge *e3)
gboolean gts_triangle_is_ok (GtsTriangle *t)
void gts_triangle_vertices (GtsTriangle *t, GtsVertex **v1, GtsVertex **v2, GtsVertex **v3)
GtsPointgts_triangle_circumcircle_center (GtsTriangle *t, GtsPointClass *point_class)
gboolean gts_triangles_are_folded (GSList *triangles, GtsVertex *A, GtsVertex *B, gdouble max)
GtsObjectgts_triangle_is_stabbed (GtsTriangle *t, GtsPoint *p, gdouble *orientation)
void gts_triangle_interpolate_height (GtsTriangle *t, GtsPoint *p)
GtsFaceClassgts_face_class (void)
GtsFacegts_face_new (GtsFaceClass *klass, GtsEdge *e1, GtsEdge *e2, GtsEdge *e3)
gboolean gts_face_has_parent_surface (GtsFace *f, GtsSurface *s)
GSList * gts_faces_from_edges (GSList *edges, 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)
GtsMatrixgts_matrix_new (gdouble a00, gdouble a01, gdouble a02, gdouble a03, gdouble a10, gdouble a11, gdouble a12, gdouble a13, gdouble a20, gdouble a21, gdouble a22, gdouble a23, gdouble a30, gdouble a31, gdouble a32, gdouble a33)
void gts_matrix_assign (GtsMatrix *m, gdouble a00, gdouble a01, gdouble a02, gdouble a03, gdouble a10, gdouble a11, gdouble a12, gdouble a13, gdouble a20, gdouble a21, gdouble a22, gdouble a23, gdouble a30, gdouble a31, gdouble a32, gdouble a33)
GtsMatrixgts_matrix_projection (GtsTriangle *t)
GtsMatrixgts_matrix_transpose (GtsMatrix *m)
gdouble gts_matrix_determinant (GtsMatrix *m)
GtsMatrixgts_matrix_inverse (GtsMatrix *m)
GtsMatrixgts_matrix3_inverse (GtsMatrix *m)
void gts_matrix_print (GtsMatrix *m, FILE *fptr)
guint gts_matrix_compatible_row (GtsMatrix *A, GtsVector b, guint n, GtsVector A1, gdouble b1)
guint gts_matrix_quadratic_optimization (GtsMatrix *A, GtsVector b, guint n, GtsMatrix *H, GtsVector c)
GtsMatrixgts_matrix_product (GtsMatrix *m1, GtsMatrix *m2)
GtsMatrixgts_matrix_zero (GtsMatrix *m)
GtsMatrixgts_matrix_identity (GtsMatrix *m)
GtsMatrixgts_matrix_scale (GtsMatrix *m, GtsVector s)
GtsMatrixgts_matrix_translate (GtsMatrix *m, GtsVector t)
GtsMatrixgts_matrix_rotate (GtsMatrix *m, GtsVector r, gdouble angle)
void gts_matrix_destroy (GtsMatrix *m)
void gts_vector_print (GtsVector v, FILE *fptr)
void gts_vector4_print (GtsVector4 v, FILE *fptr)
GNode * gts_kdtree_new (GPtrArray *points, int(*compare)(const void *, const void *))
GSList * gts_kdtree_range (GNode *tree, GtsBBox *bbox, int(*compare)(const void *, const void *))
GtsBBoxClassgts_bbox_class (void)
GtsBBoxgts_bbox_new (GtsBBoxClass *klass, gpointer bounded, gdouble x1, gdouble y1, gdouble z1, gdouble x2, gdouble y2, gdouble z2)
void gts_bbox_set (GtsBBox *bbox, gpointer bounded, gdouble x1, gdouble y1, gdouble z1, gdouble x2, gdouble y2, gdouble z2)
GtsBBoxgts_bbox_segment (GtsBBoxClass *klass, GtsSegment *s)
GtsBBoxgts_bbox_triangle (GtsBBoxClass *klass, GtsTriangle *t)
GtsBBoxgts_bbox_surface (GtsBBoxClass *klass, GtsSurface *surface)
GtsBBoxgts_bbox_bboxes (GtsBBoxClass *klass, GSList *bboxes)
GtsBBoxgts_bbox_points (GtsBBoxClass *klass, GSList *points)
gboolean gts_bboxes_are_overlapping (GtsBBox *bb1, GtsBBox *bb2)
void gts_bbox_draw (GtsBBox *bb, FILE *fptr)
gdouble gts_bbox_diagonal2 (GtsBBox *bb)
void gts_bbox_point_distance2 (GtsBBox *bb, GtsPoint *p, gdouble *min, gdouble *max)
gboolean gts_bbox_is_stabbed (GtsBBox *bb, GtsPoint *p)
gboolean gts_bbox_overlaps_triangle (GtsBBox *bb, GtsTriangle *t)
gboolean gts_bbox_overlaps_segment (GtsBBox *bb, GtsSegment *s)
GNode * gts_bb_tree_new (GSList *bboxes)
GNode * gts_bb_tree_surface (GtsSurface *s)
GSList * gts_bb_tree_stabbed (GNode *tree, GtsPoint *p)
GSList * gts_bb_tree_overlap (GNode *tree, GtsBBox *bbox)
gboolean gts_bb_tree_is_overlapping (GNode *tree, GtsBBox *bbox)
void gts_bb_tree_traverse_overlapping (GNode *tree1, GNode *tree2, GtsBBTreeTraverseFunc func, gpointer data)
void gts_bb_tree_draw (GNode *tree, guint depth, FILE *fptr)
GSList * gts_bb_tree_point_closest_bboxes (GNode *tree, GtsPoint *p)
gdouble gts_bb_tree_point_distance (GNode *tree, GtsPoint *p, GtsBBoxDistFunc distance, GtsBBox **bbox)
GtsPointgts_bb_tree_point_closest (GNode *tree, GtsPoint *p, GtsBBoxClosestFunc closest, gdouble *distance)
void gts_bb_tree_segment_distance (GNode *tree, GtsSegment *s, GtsBBoxDistFunc distance, gdouble delta, GtsRange *range)
void gts_bb_tree_triangle_distance (GNode *tree, GtsTriangle *t, GtsBBoxDistFunc distance, gdouble delta, GtsRange *range)
void gts_bb_tree_surface_distance (GNode *tree, GtsSurface *s, GtsBBoxDistFunc distance, gdouble delta, GtsRange *range)
void gts_bb_tree_surface_boundary_distance (GNode *tree, GtsSurface *s, GtsBBoxDistFunc distance, gdouble delta, GtsRange *range)
void gts_bb_tree_destroy (GNode *tree, gboolean free_leaves)
GtsSurfaceClassgts_surface_class (void)
GtsSurfacegts_surface_new (GtsSurfaceClass *klass, GtsFaceClass *face_class, GtsEdgeClass *edge_class, GtsVertexClass *vertex_class)
void gts_surface_add_face (GtsSurface *s, GtsFace *f)
void gts_surface_remove_face (GtsSurface *s, GtsFace *f)
guint gts_surface_read (GtsSurface *surface, GtsFile *f)
gdouble gts_surface_area (GtsSurface *s)
void gts_surface_stats (GtsSurface *s, GtsSurfaceStats *stats)
void gts_surface_quality_stats (GtsSurface *s, GtsSurfaceQualityStats *stats)
void gts_surface_print_stats (GtsSurface *s, FILE *fptr)
void gts_surface_write (GtsSurface *s, FILE *fptr)
void gts_surface_write_oogl (GtsSurface *s, FILE *fptr)
void gts_surface_write_vtk (GtsSurface *s, FILE *fptr)
void gts_surface_write_oogl_boundary (GtsSurface *s, FILE *fptr)
void gts_surface_foreach_vertex (GtsSurface *s, GtsFunc func, gpointer data)
void gts_surface_foreach_edge (GtsSurface *s, GtsFunc func, gpointer data)
void gts_surface_foreach_face (GtsSurface *s, GtsFunc func, gpointer data)
guint gts_surface_foreach_face_remove (GtsSurface *s, GtsFunc func, gpointer data)
GtsSurfaceTraversegts_surface_traverse_new (GtsSurface *s, GtsFace *f)
GtsFacegts_surface_traverse_next (GtsSurfaceTraverse *t, guint *level)
void gts_surface_traverse_destroy (GtsSurfaceTraverse *t)
void gts_surface_refine (GtsSurface *surface, GtsKeyFunc cost_func, gpointer cost_data, GtsRefineFunc refine_func, gpointer refine_data, GtsStopFunc stop_func, gpointer stop_data)
void gts_surface_coarsen (GtsSurface *surface, GtsKeyFunc cost_func, gpointer cost_data, GtsCoarsenFunc coarsen_func, gpointer coarsen_data, GtsStopFunc stop_func, gpointer stop_data, gdouble minangle)
gboolean gts_coarsen_stop_number (gdouble cost, guint nedge, guint *min_number)
gboolean gts_coarsen_stop_cost (gdouble cost, guint nedge, gdouble *max_cost)
void gts_surface_tessellate (GtsSurface *s, GtsRefineFunc refine_func, gpointer refine_data)
GtsSurfacegts_surface_generate_sphere (GtsSurface *s, guint geodesation_order)
GtsSurfacegts_surface_copy (GtsSurface *s1, GtsSurface *s2)
void gts_surface_merge (GtsSurface *s, GtsSurface *with)
gboolean gts_surface_is_manifold (GtsSurface *s)
gboolean gts_surface_is_closed (GtsSurface *s)
gboolean gts_surface_is_orientable (GtsSurface *s)
gdouble gts_surface_volume (GtsSurface *s)
gdouble gts_surface_center_of_mass (GtsSurface *s, GtsVector cm)
gdouble gts_surface_center_of_area (GtsSurface *s, GtsVector cm)
guint gts_surface_vertex_number (GtsSurface *s)
guint gts_surface_edge_number (GtsSurface *s)
guint gts_surface_face_number (GtsSurface *s)
void gts_surface_distance (GtsSurface *s1, GtsSurface *s2, gdouble delta, GtsRange *face_range, GtsRange *boundary_range)
GSList * gts_surface_boundary (GtsSurface *surface)
GSList * gts_surface_split (GtsSurface *s)
gboolean gts_vertex_mean_curvature_normal (GtsVertex *v, GtsSurface *s, GtsVector Kh)
gboolean gts_vertex_gaussian_curvature (GtsVertex *v, GtsSurface *s, gdouble *Kg)
void gts_vertex_principal_curvatures (gdouble Kh, gdouble Kg, gdouble *K1, gdouble *K2)
void gts_vertex_principal_directions (GtsVertex *v, GtsSurface *s, GtsVector Kh, gdouble Kg, GtsVector e1, GtsVector e2)
GtsVertexgts_volume_optimized_vertex (GtsEdge *edge, GtsVertexClass *klass, GtsVolumeOptimizedParams *params)
gdouble gts_volume_optimized_cost (GtsEdge *e, GtsVolumeOptimizedParams *params)
GSList * gts_surface_intersection (GtsSurface *s1, GtsSurface *s2, GNode *faces_tree1, GNode *faces_tree2)
GtsSurfaceInterClassgts_surface_inter_class (void)
GtsSurfaceIntergts_surface_inter_new (GtsSurfaceInterClass *klass, GtsSurface *s1, GtsSurface *s2, GNode *faces_tree1, GNode *faces_tree2, gboolean is_open1, gboolean is_open2)
gboolean gts_surface_inter_check (GtsSurfaceInter *si, gboolean *closed)
void gts_surface_inter_boolean (GtsSurfaceInter *si, GtsSurface *surface, GtsBooleanOperation op)
gboolean gts_surface_foreach_intersecting_face (GtsSurface *s, GtsBBTreeTraverseFunc func, gpointer data)
GtsSurfacegts_surface_is_self_intersecting (GtsSurface *s)
GtsHeapgts_heap_new (GCompareFunc compare_func)
void gts_heap_insert (GtsHeap *heap, gpointer p)
gpointer gts_heap_remove_top (GtsHeap *heap)
gpointer gts_heap_top (GtsHeap *heap)
void gts_heap_thaw (GtsHeap *heap)
void gts_heap_foreach (GtsHeap *heap, GFunc func, gpointer user_data)
void gts_heap_freeze (GtsHeap *heap)
guint gts_heap_size (GtsHeap *heap)
void gts_heap_destroy (GtsHeap *heap)
GtsEHeapgts_eheap_new (GtsKeyFunc key_func, gpointer data)
GtsEHeapPairgts_eheap_insert (GtsEHeap *heap, gpointer p)
GtsEHeapPairgts_eheap_insert_with_key (GtsEHeap *heap, gpointer p, gdouble key)
gpointer gts_eheap_remove_top (GtsEHeap *heap, gdouble *key)
gpointer gts_eheap_top (GtsEHeap *heap, gdouble *key)
void gts_eheap_thaw (GtsEHeap *heap)
void gts_eheap_foreach (GtsEHeap *heap, GFunc func, gpointer data)
gpointer gts_eheap_remove (GtsEHeap *heap, GtsEHeapPair *p)
void gts_eheap_decrease_key (GtsEHeap *heap, GtsEHeapPair *p, gdouble new_key)
void gts_eheap_freeze (GtsEHeap *heap)
guint gts_eheap_size (GtsEHeap *heap)
void gts_eheap_update (GtsEHeap *heap)
gdouble gts_eheap_key (GtsEHeap *heap, gpointer p)
void gts_eheap_randomized (GtsEHeap *heap, gboolean randomized)
void gts_eheap_destroy (GtsEHeap *heap)
GtsFifogts_fifo_new (void)
void gts_fifo_write (GtsFifo *fifo, FILE *fp)
void gts_fifo_push (GtsFifo *fifo, gpointer data)
gpointer gts_fifo_pop (GtsFifo *fifo)
gpointer gts_fifo_top (GtsFifo *fifo)
guint gts_fifo_size (GtsFifo *fifo)
gboolean gts_fifo_is_empty (GtsFifo *fifo)
void gts_fifo_foreach (GtsFifo *fifo, GtsFunc func, gpointer data)
void gts_fifo_reverse (GtsFifo *fifo)
void gts_fifo_destroy (GtsFifo *fifo)
GtsSplitClassgts_split_class (void)
GtsSplitgts_split_new (GtsSplitClass *klass, GtsVertex *v, GtsObject *o1, GtsObject *o2)
void gts_split_collapse (GtsSplit *vs, GtsEdgeClass *klass, GtsEHeap *heap)
void gts_split_expand (GtsSplit *vs, GtsSurface *s, GtsEdgeClass *klass)
void gts_split_traverse (GtsSplit *root, GTraverseType order, gint depth, GtsSplitTraverseFunc func, gpointer data)
guint gts_split_height (GtsSplit *root)
GtsPSurfaceClassgts_psurface_class (void)
GtsPSurfacegts_psurface_new (GtsPSurfaceClass *klass, GtsSurface *surface, GtsSplitClass *split_class, GtsKeyFunc cost_func, gpointer cost_data, GtsCoarsenFunc coarsen_func, gpointer coarsen_data, GtsStopFunc stop_func, gpointer stop_data, gdouble minangle)
GtsSplitgts_psurface_add_vertex (GtsPSurface *ps)
GtsSplitgts_psurface_remove_vertex (GtsPSurface *ps)
guint gts_psurface_max_vertex_number (GtsPSurface *ps)
guint gts_psurface_min_vertex_number (GtsPSurface *ps)
void gts_psurface_set_vertex_number (GtsPSurface *ps, guint n)
guint gts_psurface_get_vertex_number (GtsPSurface *ps)
void gts_psurface_write (GtsPSurface *ps, FILE *fptr)
GtsPSurfacegts_psurface_open (GtsPSurfaceClass *klass, GtsSurface *s, GtsSplitClass *split_class, GtsFile *f)
GtsSplitgts_psurface_read_vertex (GtsPSurface *ps, GtsFile *fp)
void gts_psurface_close (GtsPSurface *ps)
void gts_psurface_foreach_vertex (GtsPSurface *ps, GtsFunc func, gpointer data)
GtsHSplitClassgts_hsplit_class (void)
GtsHSplitgts_hsplit_new (GtsHSplitClass *klass, GtsSplit *vs)
void gts_hsplit_collapse (GtsHSplit *hs, GtsHSurface *hsurface)
void gts_hsplit_expand (GtsHSplit *hs, GtsHSurface *hsurface)
void gts_hsplit_force_expand (GtsHSplit *hs, GtsHSurface *hsurface)
GtsHSurfaceClassgts_hsurface_class (void)
GtsHSurfacegts_hsurface_new (GtsHSurfaceClass *klass, GtsHSplitClass *hsplit_class, GtsPSurface *psurface, GtsKeyFunc expand_key, gpointer expand_data, GtsKeyFunc collapse_key, gpointer collapse_data)
void gts_hsurface_traverse (GtsHSurface *hsurface, GTraverseType order, gint depth, GtsSplitTraverseFunc func, gpointer data)
void gts_hsurface_foreach (GtsHSurface *hsurface, GTraverseType order, GtsFunc func, gpointer data)
guint gts_hsurface_height (GtsHSurface *hsurface)
GtsConstraintClassgts_constraint_class (void)
GtsFacegts_point_locate (GtsPoint *p, GtsSurface *surface, GtsFace *guess)
GtsVertexgts_delaunay_add_vertex_to_face (GtsSurface *surface, GtsVertex *v, GtsFace *f)
GtsVertexgts_delaunay_add_vertex (GtsSurface *surface, GtsVertex *v, GtsFace *guess)
void gts_delaunay_remove_vertex (GtsSurface *surface, GtsVertex *v)
GtsFacegts_delaunay_check (GtsSurface *surface)
GSList * gts_delaunay_add_constraint (GtsSurface *surface, GtsConstraint *c)
void gts_delaunay_remove_hull (GtsSurface *surface)
GtsFaceClassgts_list_face_class (void)
gboolean gts_vertex_encroaches_edge (GtsVertex *v, GtsEdge *e)
GtsVertexgts_edge_is_encroached (GtsEdge *e, GtsSurface *s, GtsEncroachFunc encroaches, gpointer data)
guint gts_delaunay_conform (GtsSurface *surface, gint steiner_max, GtsEncroachFunc encroaches, gpointer data)
guint gts_delaunay_refine (GtsSurface *surface, gint steiner_max, GtsEncroachFunc encroaches, gpointer encroach_data, GtsKeyFunc cost, gpointer cost_data)
GtsGridPlanegts_grid_plane_new (guint nx, guint ny)
void gts_grid_plane_destroy (GtsGridPlane *g)
GtsIsoSlicegts_iso_slice_new (guint nx, guint ny)
void gts_iso_slice_fill (GtsIsoSlice *slice, GtsGridPlane *plane1, GtsGridPlane *plane2, gdouble **f1, gdouble **f2, gdouble iso, GtsVertexClass *klass)
void gts_iso_slice_fill_cartesian (GtsIsoSlice *slice, GtsCartesianGrid g, gdouble **f1, gdouble **f2, gdouble iso, GtsVertexClass *klass)
void gts_iso_slice_destroy (GtsIsoSlice *slice)
void gts_isosurface_slice (GtsIsoSlice *slice1, GtsIsoSlice *slice2, GtsSurface *surface)
void gts_isosurface_cartesian (GtsSurface *surface, GtsCartesianGrid g, GtsIsoCartesianFunc f, gpointer data, gdouble iso)
void gts_isosurface_tetra (GtsSurface *surface, GtsCartesianGrid g, GtsIsoCartesianFunc f, gpointer data, gdouble iso)
void gts_isosurface_tetra_bcl (GtsSurface *surface, GtsCartesianGrid g, GtsIsoCartesianFunc f, gpointer data, gdouble iso)
void gts_isosurface_tetra_bounded (GtsSurface *surface, GtsCartesianGrid g, GtsIsoCartesianFunc f, gpointer data, gdouble iso)
GtsNVertexClassgts_nvertex_class (void)
GtsNEdgeClassgts_nedge_class (void)
GtsNFaceClassgts_nface_class (void)
GtsClusterClassgts_cluster_class (void)
GtsClustergts_cluster_new (GtsClusterClass *klass, GtsClusterId id, GtsVertexClass *vklass)
void gts_cluster_add (GtsCluster *c, GtsPoint *p, gpointer data)
void gts_cluster_update (GtsCluster *c)
GtsClusterGridClassgts_cluster_grid_class (void)
GtsClusterGridgts_cluster_grid_new (GtsClusterGridClass *klass, GtsClusterClass *cluster_class, GtsSurface *s, GtsBBox *bbox, gdouble delta)
void gts_cluster_grid_add_triangle (GtsClusterGrid *cluster_grid, GtsPoint *p1, GtsPoint *p2, GtsPoint *p3, gpointer data)
GtsRange gts_cluster_grid_update (GtsClusterGrid *cluster_grid)
GSList * gts_surface_strip (GtsSurface *s)
GtsContaineeClassgts_containee_class (void)
GtsContaineegts_containee_new (GtsContaineeClass *klass)
gboolean gts_containee_is_contained (GtsContainee *item, GtsContainer *c)
void gts_containee_replace (GtsContainee *item, GtsContainee *with)
GtsSListContaineeClassgts_slist_containee_class (void)
GtsContainerClassgts_container_class (void)
GtsContainergts_container_new (GtsContainerClass *klass)
void gts_container_add (GtsContainer *c, GtsContainee *item)
void gts_container_remove (GtsContainer *c, GtsContainee *item)
void gts_container_foreach (GtsContainer *c, GtsFunc func, gpointer data)
guint gts_container_size (GtsContainer *c)
GtsHashContainerClassgts_hash_container_class (void)
GtsSListContainerClassgts_slist_container_class (void)
GtsGNodeClassgts_gnode_class (void)
GtsGNodegts_gnode_new (GtsGNodeClass *klass)
void gts_gnode_foreach_neighbor (GtsGNode *n, GtsGraph *g, GtsFunc func, gpointer data)
void gts_gnode_foreach_edge (GtsGNode *n, GtsGraph *g, GtsFunc func, gpointer data)
guint gts_gnode_degree (GtsGNode *n, GtsGraph *g)
gfloat gts_gnode_move_cost (GtsGNode *n, GtsGraph *src, GtsGraph *dst)
gfloat gts_gnode_weight (GtsGNode *n)
GtsNGNodeClassgts_ngnode_class (void)
GtsNGNodegts_ngnode_new (GtsNGNodeClass *klass, guint id)
GtsWGNodeClassgts_wgnode_class (void)
GtsWGNodegts_wgnode_new (GtsWGNodeClass *klass, gfloat weight)
GtsPNodeClassgts_pnode_class (void)
GtsPNodegts_pnode_new (GtsPNodeClass *klass, gpointer data)
GtsFNodeClassgts_fnode_class (void)
GtsFNodegts_fnode_new (GtsFNodeClass *klass, GtsFace *f)
GtsGEdgeClassgts_gedge_class (void)
GtsGEdgegts_gedge_new (GtsGEdgeClass *klass, GtsGNode *n1, GtsGNode *n2)
gfloat gts_gedge_weight (GtsGEdge *e)
GtsPGEdgeClassgts_pgedge_class (void)
GtsPGEdgegts_pgedge_new (GtsPGEdgeClass *klass, GtsGNode *n1, GtsGNode *n2, gpointer data)
GtsWGEdgeClassgts_wgedge_class (void)
GtsWGEdgegts_wgedge_new (GtsWGEdgeClass *klass, GtsGNode *n1, GtsGNode *n2, gfloat weight)
GtsGraphClassgts_graph_class (void)
GtsGraphgts_graph_new (GtsGraphClass *klass, GtsGNodeClass *node_class, GtsGEdgeClass *edge_class)
void gts_graph_print_stats (GtsGraph *g, FILE *fp)
GtsGraphTraversegts_graph_traverse_new (GtsGraph *g, GtsGNode *n, GtsTraverseType type, gboolean reinit)
GtsGNodegts_graph_traverse_next (GtsGraphTraverse *t)
GtsGNodegts_graph_traverse_what_next (GtsGraphTraverse *t)
void gts_graph_traverse_destroy (GtsGraphTraverse *t)
void gts_graph_foreach_edge (GtsGraph *g, GtsFunc func, gpointer data)
gfloat gts_graph_weight (GtsGraph *g)
guint gts_graph_distance_sum (GtsGraph *g, GtsGNode *center)
GtsGNodegts_graph_farthest (GtsGraph *g, GSList *gnodes)
guint gts_graph_edges_cut (GtsGraph *g)
gfloat gts_graph_edges_cut_weight (GtsGraph *g)
void gts_graph_write (GtsGraph *g, FILE *fp)
void gts_graph_write_dot (GtsGraph *g, FILE *fp)
GtsGraphgts_graph_read (GtsFile *fp)
guint gts_graph_read_jostle (GtsGraph *g, GtsFile *fp)
GtsWGraphClassgts_wgraph_class (void)
gfloat gts_wgraph_weight_max (GtsWGraph *wg)
GtsGraphgts_surface_graph_new (GtsGraphClass *klass, GtsSurface *s)
GtsSurfacegts_surface_graph_surface (GtsGraph *surface_graph, GtsSurface *s)
GtsGraphgts_segments_graph_new (GtsGraphClass *klass, GSList *segments)
GtsGNodeSplitClassgts_gnode_split_class (void)
GtsGNodeSplitgts_gnode_split_new (GtsGNodeSplitClass *klass, GtsGNode *n, GtsObject *n1, GtsObject *n2)
void gts_gnode_split_collapse (GtsGNodeSplit *ns, GtsGraph *g, GtsWGEdgeClass *klass)
void gts_gnode_split_expand (GtsGNodeSplit *ns, GtsGraph *g)
GtsPGraphClassgts_pgraph_class (void)
GtsPGraphgts_pgraph_new (GtsPGraphClass *klass, GtsGraph *g, GtsGNodeSplitClass *split_class, GtsWGNodeClass *node_class, GtsWGEdgeClass *edge_class, guint min)
GtsGNodeSplitgts_pgraph_add_node (GtsPGraph *pg)
GtsGNodeSplitgts_pgraph_remove_node (GtsPGraph *pg)
void gts_pgraph_set_node_number (GtsPGraph *pg, guint n)
guint gts_pgraph_get_node_number (GtsPGraph *pg)
guint gts_pgraph_min_node_number (GtsPGraph *pg)
guint gts_pgraph_max_node_number (GtsPGraph *pg)
void gts_pgraph_foreach_node (GtsPGraph *pg, GtsFunc func, gpointer data)
gboolean gts_pgraph_down (GtsPGraph *pg, GtsFunc func, gpointer data)
GSList * gts_graph_bubble_partition (GtsGraph *g, guint np, guint niter, GtsFunc step_info, gpointer data)
guint gts_graph_partition_edges_cut (GSList *partition)
gfloat gts_graph_partition_edges_cut_weight (GSList *partition)
void gts_graph_partition_print_stats (GSList *partition, FILE *fp)
gfloat gts_graph_partition_balance (GSList *partition)
GSList * gts_graph_partition_clone (GSList *partition)
GSList * gts_graph_recursive_bisection (GtsWGraph *wg, guint n, guint ntry, guint mmax, guint nmin, gfloat imbalance)
void gts_graph_partition_destroy (GSList *partition)
gboolean gts_graph_bisection_check (GtsGraphBisection *bg)
GtsGraphBisectiongts_graph_ggg_bisection (GtsGraph *g, guint ntry)
GtsGraphBisectiongts_graph_bfgg_bisection (GtsGraph *g, guint ntry)
gdouble gts_graph_bisection_kl_refine (GtsGraphBisection *bg, guint mmax)
gdouble gts_graph_bisection_bkl_refine (GtsGraphBisection *bg, guint mmax, gfloat imbalance)
GtsGraphBisectiongts_graph_bisection_new (GtsWGraph *wg, guint ntry, guint mmax, guint nmin, gfloat imbalance)
void gts_graph_bisection_destroy (GtsGraphBisection *bg, gboolean destroy_graphs)

Variables

GTS_C_VAR const guint gts_major_version
GTS_C_VAR const guint gts_minor_version
GTS_C_VAR const guint gts_micro_version
GTS_C_VAR const guint gts_interface_age
GTS_C_VAR const guint gts_binary_age
GTS_C_VAR gboolean gts_allow_floating_vertices
GTS_C_VAR gboolean gts_allow_floating_edges
GTS_C_VAR gboolean gts_allow_floating_faces
GTS_C_VAR gboolean gts_allow_floating_gnodes

Define Documentation

#define GTS_BBOX (   obj)
Value:

GTS_BBOX: : a GtsObject.

Casts to GtsBBox.

Definition at line 901 of file gts.h.

Referenced by gts_bb_tree_point_closest(), gts_bb_tree_point_distance(), gts_bbox_new(), and gts_point_is_inside_surface().

#define GTS_BBOX_CLASS (   klass)
Value:

GTS_BBOX_CLASS: : a descendant of GtsBBoxClass.

Casts to GtsBBoxClass.

Definition at line 910 of file gts.h.

Referenced by toporouter_bbox_create(), and toporouter_bbox_create_from_points().

#define gts_bbox_point_is_inside (   bbox,
 
)
Value:
((p)->x >= (bbox)->x1 &&\
                                             (p)->y >= (bbox)->y1 &&\
                                             (p)->z >= (bbox)->z1 &&\
                                             (p)->x <= (bbox)->x2 &&\
                                             (p)->y <= (bbox)->y2 &&\
                                             (p)->z <= (bbox)->z2)

gts_bbox_point_is_inside: : a GtsBBox. : a GtsPoint.

Evaluates to TRUE if is inside (or on the boundary) of , FALSE otherwise.

Definition at line 959 of file gts.h.

Referenced by gts_kdtree_range().

#define GTS_C_VAR   extern

Definition at line 46 of file gts.h.

#define GTS_CHECK_VERSION (   major,
  minor,
  micro 
)
Value:
(gts_major_version > (major) || \
    (gts_major_version == (major) && gts_minor_version > (minor)) || \
    (gts_major_version == (major) && gts_minor_version == (minor) && \
     gts_micro_version >= (micro)))

Definition at line 55 of file gts.h.

#define GTS_CLASS_NAME_LENGTH   40

Definition at line 208 of file gts.h.

#define GTS_CLUSTER (   obj)
Value:

Definition at line 1839 of file gts.h.

Referenced by cluster_destroy(), and gts_cluster_new().

#define GTS_CLUSTER_CLASS (   klass)
Value:

Definition at line 1842 of file gts.h.

Referenced by gts_cluster_add(), and gts_cluster_update().

#define GTS_CLUSTER_GRID (   obj)
Value:

Definition at line 1882 of file gts.h.

Referenced by cluster_grid_destroy(), and gts_cluster_grid_new().

#define GTS_CLUSTER_GRID_CLASS (   klass)
Value:

Definition at line 1885 of file gts.h.

#define GTS_COLOR_VERTEX (   obj)
Value:

Definition at line 516 of file gts.h.

#define GTS_COMMENTS   "#!"

Definition at line 61 of file gts.h.

Referenced by file_new().

#define GTS_CONSTRAINT (   obj)
Value:

GTS_CONSTRAINT: : a descendant of GtsConstraint.

Casts to GtsConstraint.

Definition at line 1612 of file gts.h.

#define GTS_CONSTRAINT_CLASS (   klass)
Value:

GTS_CONSTRAINT_CLASS: : a desscendant of GtsConstraintClass.

Casts to GtsConstraintClass.

Definition at line 1621 of file gts.h.

#define GTS_EDGE_CLASS (   klass)
#define gts_edge_is_unattached (   s)    ((s)->triangles == NULL ? TRUE : FALSE)

gts_edge_is_unattached: : a GtsEdge.

Evaluates to TRUE if no triangles uses as an edge, FALSE otherwise.

Definition at line 605 of file gts.h.

#define GTS_FACE_CLASS (   klass)
Value:

Definition at line 731 of file gts.h.

#define GTS_FNODE (   obj)
Value:

Definition at line 2226 of file gts.h.

Referenced by add_to_surface(), fnode_write(), and gts_fnode_new().

#define GTS_FNODE_CLASS (   klass)
Value:

Definition at line 2229 of file gts.h.

#define GTS_GEDGE (   obj)
#define GTS_GEDGE_CLASS (   klass)
#define gts_gedge_connects (   e,
  a1,
  a2 
)    (((e)->n1 == a1 && (e)->n2 == a2) || ((e)->n1 == a2 && (e)->n2 == a1))

Definition at line 2273 of file gts.h.

Referenced by connect_edge(), and restore_edge().

#define GTS_GNODE (   obj)
#define GTS_GNODE_CLASS (   klass)
#define GTS_GNODE_NEIGHBOR (   n,
 
)    (GTS_GEDGE (e)->n1 == n ? GTS_GEDGE (e)->n2 : GTS_GEDGE (e)->n2 == n ? GTS_GEDGE (e)->n1 : NULL)
#define GTS_GNODE_SPLIT (   obj)
Value:

Definition at line 2451 of file gts.h.

Referenced by gnode_split_destroy(), and gts_gnode_split_new().

#define GTS_GNODE_SPLIT_CLASS (   klass)
Value:

Definition at line 2454 of file gts.h.

#define GTS_GNODE_SPLIT_N1 (   ns)    (GTS_IS_GNODE_SPLIT ((ns)->n1) ? GTS_GNODE_SPLIT ((ns)->n1)->n : GTS_GNODE ((ns)->n1))

Definition at line 2459 of file gts.h.

Referenced by bisection_children(), gts_gnode_split_collapse(), and gts_gnode_split_expand().

#define GTS_GNODE_SPLIT_N2 (   ns)    (GTS_IS_GNODE_SPLIT ((ns)->n2) ? GTS_GNODE_SPLIT ((ns)->n2)->n : GTS_GNODE ((ns)->n2))

Definition at line 2460 of file gts.h.

Referenced by bisection_children(), gts_gnode_split_collapse(), and gts_gnode_split_expand().

#define GTS_GRAPH_CLASS (   klass)
#define GTS_HASH_CONTAINER (   obj)
#define GTS_HASH_CONTAINER_CLASS (   klass)
Value:

Definition at line 2042 of file gts.h.

#define GTS_HSPLIT (   obj)
#define GTS_HSPLIT_CLASS (   klass)
Value:

Definition at line 1539 of file gts.h.

#define GTS_HSURFACE (   obj)
Value:

Definition at line 1570 of file gts.h.

Referenced by gts_hsurface_new(), and hsurface_destroy().

#define GTS_HSURFACE_CLASS (   klass)
Value:

Definition at line 1573 of file gts.h.

#define GTS_IS_BBOX (   obj)
Value:

GTS_IS_BBOX: : a GtsObject.

Evaluates to TRUE if is a GtsBBox, FALSE otherwise.

Definition at line 893 of file gts.h.

#define GTS_IS_CLUSTER (   obj)
Value:

Definition at line 1845 of file gts.h.

#define GTS_IS_CLUSTER_GRID (   obj)
Value:

Definition at line 1888 of file gts.h.

#define GTS_IS_COLOR_VERTEX (   obj)
Value:

Definition at line 519 of file gts.h.

#define GTS_IS_CONSTRAINT (   obj)
Value:

GTS_IS_CONSTRAINT: : a GtsObject.

Evaluates to TRUE if is a GtsConstraint, FALSE otherwise.

Definition at line 1604 of file gts.h.

Referenced by gts_delaunay_add_constraint(), gts_delaunay_remove_hull(), make_encroached_fifo(), remove_intersected_edge(), split_edge(), swap_if_in_circle(), and vertex_encroaches().

#define GTS_IS_CONTAINEE (   obj)
Value:

Definition at line 1952 of file gts.h.

#define GTS_IS_CONTAINER (   obj)
Value:

Definition at line 2009 of file gts.h.

#define GTS_IS_FNODE (   obj)
Value:

Definition at line 2232 of file gts.h.

Referenced by add_to_surface().

#define GTS_IS_GEDGE (   obj)
Value:

Definition at line 2265 of file gts.h.

#define GTS_IS_GNODE (   obj)
Value:

Definition at line 2103 of file gts.h.

Referenced by gts_gnode_split_new().

#define GTS_IS_GNODE_SPLIT (   obj)
Value:

Definition at line 2457 of file gts.h.

Referenced by gts_gnode_split_new().

#define GTS_IS_GRAPH (   obj)
Value:

Definition at line 2358 of file gts.h.

#define GTS_IS_HASH_CONTAINER (   obj)
Value:

Definition at line 2045 of file gts.h.

#define GTS_IS_HSPLIT (   obj)
Value:

Definition at line 1534 of file gts.h.

Referenced by gts_hsplit_collapse(), and gts_hsplit_expand().

#define GTS_IS_HSURFACE (   obj)
Value:

Definition at line 1568 of file gts.h.

#define GTS_IS_LIST_FACE (   obj)
Value:

Definition at line 1669 of file gts.h.

Referenced by gts_delaunay_add_vertex_to_face(), and swap_if_in_circle().

#define GTS_IS_NEDGE (   obj)
Value:

Definition at line 1797 of file gts.h.

Referenced by intersects(), and pgedge_write().

#define GTS_IS_NFACE (   obj)
Value:

Definition at line 1820 of file gts.h.

Referenced by intersects().

#define GTS_IS_NGNODE (   obj)
Value:

Definition at line 2148 of file gts.h.

#define GTS_IS_NVERTEX (   obj)
Value:

Definition at line 1774 of file gts.h.

Referenced by intersects(), and pnode_write().

#define GTS_IS_OBJECT (   obj)
Value:

Definition at line 215 of file gts.h.

#define GTS_IS_PGEDGE (   obj)
Value:

Definition at line 2297 of file gts.h.

#define GTS_IS_PGRAPH (   obj)
Value:

Definition at line 2499 of file gts.h.

#define GTS_IS_PNODE (   obj)
Value:

Definition at line 2204 of file gts.h.

#define GTS_IS_POINT (   obj)
Value:

Definition at line 339 of file gts.h.

#define GTS_IS_PSURFACE (   obj)
Value:

Definition at line 1474 of file gts.h.

#define GTS_IS_SEGMENT (   obj)
Value:

Definition at line 526 of file gts.h.

#define GTS_IS_SLIST_CONTAINEE (   obj)
Value:

Definition at line 1983 of file gts.h.

#define GTS_IS_SLIST_CONTAINER (   obj)
Value:

Definition at line 2072 of file gts.h.

#define GTS_IS_SURFACE (   obj)
Value:

Definition at line 1084 of file gts.h.

#define GTS_IS_SURFACE_INTER (   obj)
Value:

GTS_IS_SURFACE_INTER: : a GtsObject.

Evaluates to TRUE if is a GtsSurfaceInter, FALSE otherwise.

Definition at line 1252 of file gts.h.

#define GTS_IS_TRIANGLE (   obj)
Value:

Definition at line 634 of file gts.h.

Referenced by vertex_normal_attributes().

#define GTS_IS_VERTEX (   obj)
Value:

Definition at line 431 of file gts.h.

Referenced by gts_split_new().

#define GTS_IS_VERTEX_NORMAL (   obj)
Value:

Definition at line 499 of file gts.h.

Referenced by vertex_normal_attributes().

#define GTS_IS_WGEDGE (   obj)
Value:

Definition at line 2327 of file gts.h.

#define GTS_IS_WGNODE (   obj)
Value:

Definition at line 2176 of file gts.h.

#define GTS_IS_WGRAPH (   obj)
Value:

Definition at line 2416 of file gts.h.

#define gts_kdtree_destroy (   tree)    g_node_destroy(tree)

Definition at line 836 of file gts.h.

Referenced by gts_vertices_merge().

#define GTS_LIST_FACE (   obj)
#define GTS_MAINTAINER   "popinet@users.sourceforge.net"

Definition at line 62 of file gts.h.

#define GTS_MAJOR_VERSION   0

Definition at line 26 of file gts.h.

#define GTS_MICRO_VERSION   6

Definition at line 28 of file gts.h.

#define GTS_MINOR_VERSION   7

Definition at line 27 of file gts.h.

#define GTS_NAME_LENGTH   40

Definition at line 1766 of file gts.h.

Referenced by intersects(), nedge_read(), nface_read(), and nvertex_read().

#define GTS_NEDGE (   obj)
#define GTS_NEDGE_CLASS (   klass)
Value:

Definition at line 1794 of file gts.h.

#define GTS_NFACE (   obj)
Value:

Definition at line 1814 of file gts.h.

Referenced by intersects(), nface_read(), nface_write(), and segment_triangle_intersection().

#define GTS_NFACE_CLASS (   klass)
Value:

Definition at line 1817 of file gts.h.

#define GTS_NGNODE (   obj)
Value:

Definition at line 2142 of file gts.h.

Referenced by gts_ngnode_new().

#define GTS_NGNODE_CLASS (   klass)
Value:

Definition at line 2145 of file gts.h.

#define GTS_NVERTEX (   obj)
Value:

Definition at line 1768 of file gts.h.

Referenced by intersects(), nvertex_read(), nvertex_write(), and pnode_write().

#define GTS_NVERTEX_CLASS (   klass)
Value:

Definition at line 1771 of file gts.h.

#define GTS_OBJECT (   obj)
Value:

Definition at line 209 of file gts.h.

Referenced by add_boundary(), add_edge_inter(), add_neighbor(), add_unused(), build_bheap(), build_cdt(), build_heap(), cface_expand(), cface_new(), check_edge(), check_surface_edge(), cluster_destroy(), cluster_find(), connect_edge(), container_add(), container_remove(), create_edge(), create_edges(), create_node(), create_segment_edge(), delaunay_create_from_vertices(), delete_route(), delete_vertex(), destroy_foreach_face(), edge_collapse(), foreach_edge_copy(), foreach_face_copy(), foreach_face_remove(), foreach_vertex_copy(), gedge_remove_container(), gnode_remove_container(), gnode_split_destroy(), gts_bb_tree_point_closest(), gts_bb_tree_segment_distance(), gts_bb_tree_triangle_distance(), gts_cluster_add(), gts_cluster_update(), gts_containee_is_contained(), gts_containee_replace(), gts_container_add(), gts_container_foreach(), gts_container_remove(), gts_container_size(), gts_delaunay_add_constraint(), gts_delaunay_add_vertex_to_face(), gts_delaunay_refine(), gts_delaunay_remove_hull(), gts_edge_is_contact(), gts_edge_remove(), gts_edge_swap(), gts_edges_merge(), gts_gedge_weight(), gts_gnode_split_collapse(), gts_gnode_weight(), gts_graph_bfgg_bisection(), gts_graph_bisection_bkl_refine(), gts_graph_bisection_destroy(), gts_graph_bisection_kl_refine(), gts_graph_bisection_new(), gts_graph_bubble_partition(), gts_graph_farthest(), gts_graph_ggg_bisection(), gts_graph_partition_clone(), gts_graph_partition_destroy(), gts_graph_read(), gts_graph_weight(), gts_graph_write(), gts_hsplit_new(), gts_hsurface_new(), gts_isosurface_slice(), gts_pgraph_new(), gts_point_is_inside_surface(), gts_point_locate(), gts_point_triangle_closest(), gts_psurface_new(), gts_psurface_open(), gts_psurface_read_vertex(), gts_psurface_write(), gts_segment_is_ok(), gts_split_collapse(), gts_split_expand(), gts_surface_add_face(), gts_surface_coarsen(), gts_surface_graph_surface(), gts_surface_inter_boolean(), gts_surface_inter_new(), gts_surface_intersection(), gts_surface_is_self_intersecting(), gts_surface_read(), gts_surface_remove_face(), gts_surface_traverse_new(), gts_surface_traverse_next(), gts_surface_write(), gts_triangle_is_ok(), gts_triangle_is_stabbed(), gts_vertex_is_contact(), gts_vertices_merge(), gts_volume_optimized_cost(), heap_surface_add_face(), heap_surface_remove_face(), intersect_edges(), intersects(), match_neighbor(), merge_duplicate(), midvertex_insertion(), oproute_free(), partition_update(), pgraph_destroy(), psurface_destroy(), push_neighbor(), recursive_bisection(), remove_container(), remove_intersected_edge(), replace_edge_collapse(), replace_edge_expand(), reset_reserved(), restore_edge(), segment_destroy(), self_intersecting(), split_destroy(), split_encroached(), surface_inter_destroy(), surface_inter_new(), surface_read(), swap_if_in_circle(), temp_point_clean(), tessellate_face(), toporouter_bbox_locate(), traverse_boundary(), traverse_remaining(), triangle_destroy(), triangle_next(), triangulate_face(), triangulate_polygon(), unconstrain(), update_2nd_closest_neighbors(), update_neighbors(), walk_faces(), write_dot_edge(), write_dot_node(), write_edge(), write_edge_oogl_boundary(), write_face(), write_face_oogl(), write_face_vtk(), write_vertex(), write_vertex_oogl(), and write_vertex_vtk().

#define GTS_OBJECT_CAST (   obj,
  type,
  klass 
)    ((type *) (obj))

Definition at line 204 of file gts.h.

#define GTS_OBJECT_CLASS (   klass)
Value:

Definition at line 212 of file gts.h.

Referenced by cface_expand(), cluster_class_init(), cluster_destroy(), cluster_grid_class_init(), cluster_grid_destroy(), container_class_init(), container_destroy(), edge_clone(), edge_destroy(), edge_inter_class(), face_class_init(), face_clone(), face_destroy(), gedge_class_init(), gedge_destroy(), gedge_remove_container(), gnode_remove_container(), gnode_split_class_init(), gnode_split_destroy(), graph_class_init(), graph_write(), gts_bb_tree_segment_distance(), gts_bb_tree_triangle_distance(), gts_bbox_new(), gts_cluster_grid_new(), gts_cluster_new(), gts_color_vertex_class(), gts_constraint_class(), gts_containee_new(), gts_container_class(), gts_container_new(), gts_edge_class(), gts_face_class(), gts_face_new(), gts_fnode_class(), gts_fnode_new(), gts_gedge_class(), gts_gedge_new(), gts_gnode_class(), gts_gnode_new(), gts_gnode_split_new(), gts_graph_class(), gts_graph_new(), gts_graph_read(), gts_hash_container_class(), gts_hsplit_class(), gts_hsplit_new(), gts_hsurface_new(), gts_list_face_class(), gts_list_face_class_init(), gts_list_face_destroy(), gts_nedge_class(), gts_nface_class(), gts_ngnode_class(), gts_nvertex_class(), gts_object_check_cast(), gts_object_class_check_cast(), gts_pgedge_class(), gts_pgraph_new(), gts_pnode_class(), gts_pnode_new(), gts_point_locate(), gts_point_new(), gts_point_triangle_closest(), gts_psurface_new(), gts_psurface_open(), gts_psurface_read_vertex(), gts_psurface_write(), gts_segment_new(), gts_segment_triangle_intersection(), gts_segments_graph_new(), gts_slist_containee_class(), gts_slist_container_class(), gts_split_collapse(), gts_split_new(), gts_surface_graph_new(), gts_surface_new(), gts_surface_read(), gts_surface_write_oogl(), gts_triangle_new(), gts_vertex_class(), gts_vertex_new(), gts_vertex_normal_class(), gts_wgedge_class(), gts_wgnode_class(), gts_wgraph_class(), hash_container_add(), hash_container_class_init(), hash_container_destroy(), hash_container_remove(), hsurface_destroy(), nedge_class_init(), nface_class_init(), nvertex_class_init(), pgraph_class_init(), pgraph_destroy(), psurface_destroy(), segment_destroy(), slist_containee_class_init(), slist_containee_destroy(), slist_container_add(), slist_container_class_init(), slist_container_destroy(), slist_container_remove(), split_destroy(), split_encroached(), surface_class_init(), surface_destroy(), surface_inter_destroy(), surface_inter_new(), surface_read(), surface_write(), toporouter_arc_class(), toporouter_arc_new(), toporouter_bbox_class(), toporouter_constraint_class(), toporouter_edge_class(), toporouter_vertex_class(), triangle_destroy(), vertex_class_init(), vertex_clone(), vertex_destroy(), wgraph_add(), and wgraph_remove().

#define GTS_OBJECT_CLASS_CAST (   objklass,
  type,
  klass 
)    ((type *) (objklass))

Definition at line 205 of file gts.h.

#define GTS_OBJECT_DESTROYED (   obj)    ((GTS_OBJECT_FLAGS (obj) & GTS_DESTROYED) != 0)
#define GTS_OBJECT_FLAGS (   obj)    (GTS_OBJECT (obj)->flags)

Definition at line 224 of file gts.h.

#define GTS_OBJECT_SET_FLAGS (   obj,
  flag 
)    G_STMT_START{ (GTS_OBJECT_FLAGS (obj) |= (flag)); }G_STMT_END

Definition at line 226 of file gts.h.

Referenced by cface_new(), gts_object_destroy(), and vertex_destroy().

#define GTS_OBJECT_UNSET_FLAGS (   obj,
  flag 
)    G_STMT_START{ (GTS_OBJECT_FLAGS (obj) &= ~(flag)); }G_STMT_END

Definition at line 227 of file gts.h.

#define GTS_PGEDGE (   obj)
Value:

Definition at line 2291 of file gts.h.

Referenced by gts_pgedge_new(), and pgedge_write().

#define GTS_PGEDGE_CLASS (   klass)
Value:

Definition at line 2294 of file gts.h.

#define GTS_PGRAPH (   obj)
Value:

Definition at line 2493 of file gts.h.

Referenced by gts_pgraph_new(), and pgraph_destroy().

#define GTS_PGRAPH_CLASS (   klass)
Value:

Definition at line 2496 of file gts.h.

#define GTS_PNODE (   obj)
Value:

Definition at line 2198 of file gts.h.

Referenced by gts_pnode_new(), and pnode_write().

#define GTS_PNODE_CLASS (   klass)
Value:

Definition at line 2201 of file gts.h.

#define GTS_POINT (   obj)
Value:

Definition at line 341 of file gts.h.

Referenced by add_edge_inter(), angle_from_cotan(), angle_obtuse(), boundary_cost(), boundary_preservation(), build_cdt(), calculate_arc_to_arc(), calculate_term_to_arc(), candidate_vertices(), center_of_area_foreach_face(), center_of_mass_foreach_face(), cluster_add(), cluster_update(), compare_points(), connect_interior_loop(), connection(), cotan(), delaunay_check(), edge_capacity(), edge_closest_vertex(), edge_length2(), edge_length2_inverse(), edge_min_spacing(), edge_shape_cost(), edge_volume_cost(), find_closest(), gts_bb_tree_segment_distance(), gts_bb_tree_triangle_distance(), gts_bbox_overlaps_segment(), gts_bbox_overlaps_triangle(), gts_bbox_segment(), gts_bbox_triangle(), gts_delaunay_add_constraint(), gts_delaunay_add_vertex(), gts_delaunay_add_vertex_to_face(), gts_matrix_projection(), gts_point_is_in_triangle(), gts_point_locate(), gts_point_new(), gts_point_segment_closest(), gts_point_segment_distance2(), gts_point_triangle_closest(), gts_psurface_new(), gts_segment_midvertex(), gts_segment_triangle_intersection(), gts_segments_are_intersecting(), gts_split_collapse(), gts_triangle_circumcircle_center(), gts_triangle_enclosing(), gts_triangle_interpolate_height(), gts_triangle_is_stabbed(), gts_triangle_normal(), gts_triangle_orientation(), gts_triangle_perimeter(), gts_triangles_are_folded(), gts_vertex_encroaches_edge(), gts_vertex_mean_curvature_normal(), gts_vertex_new(), gts_vertex_principal_directions(), gts_vertices_merge(), gts_volume_optimized_cost(), gts_volume_optimized_vertex(), insert_centre_point(), intersection_orientation(), is_inside_wedge(), loop_orientation(), new_ear(), oproute_calculate_tof(), path_score(), pathvertex_arcing_through_constraint(), point_locate(), point_read(), point_write(), polygon_in_circle(), quality_foreach_edge(), read_pads(), read_points(), region_area(), remove_intersected_edge(), remove_intersected_vertex(), routing_edge_insert(), segment_gradient(), segment_intersects(), segment_triangle_intersection(), simple_h_cost(), space_edge(), speccut_edge_routing_from_edge(), split_edge(), split_path(), spread_edge(), surface_distance_foreach_boundary(), swap_if_in_circle(), toporouter_draw_surface(), triangle_barycenter(), triangle_candidate_points_from_edge(), triangle_candidate_points_from_vertex(), triangle_interior_capacity(), triangle_intersects_segments(), triangle_next_edge(), triangle_normal(), triangle_point_orientation(), triangulate_face(), triangulate_polygon(), tvertex_wind(), unit_sphere_arc_midvertex(), vertex_between(), vertex_intersect_prop(), vertex_move_towards_vertex(), vertex_move_towards_vertex_values(), vertex_normal_attributes(), vertex_wind(), volume_foreach_face(), and write_edge_oogl_boundary().

#define gts_point_is_in_rectangle (   p,
  p1,
  p2 
)
Value:
((p)->x >= (p1)->x &&\
                                                      (p)->x <= (p2)->x &&\
                                                      (p)->y >= (p1)->y &&\
                                                      (p)->y <= (p2)->y &&\
                                                      (p)->z >= (p1)->z &&\
                                                      (p)->z <= (p2)->z)

Definition at line 368 of file gts.h.

#define GTS_PSURFACE (   obj)
Value:

Definition at line 1476 of file gts.h.

Referenced by gts_psurface_new(), gts_psurface_open(), and psurface_destroy().

#define GTS_PSURFACE_CLASS (   klass)
Value:

Definition at line 1479 of file gts.h.

#define GTS_SEGMENT (   obj)
Value:

Definition at line 528 of file gts.h.

Referenced by add_edge_inter(), angle_obtuse(), boundary_cost(), boundary_preservation(), build_cdt(), build_list_boundary(), cface_new(), check_speccut(), compute_candidate_points(), connect_interior_loop(), edge_boundary_cost(), edge_clone(), edge_collapse(), edge_fan_list(), edge_length2(), edge_shape_cost(), edge_volume_cost(), find_closest(), find_vvs(), flow_from_edge_to_edge(), gts_bbox_overlaps_triangle(), gts_bbox_triangle(), gts_delaunay_add_constraint(), gts_edge_collapse_creates_fold(), gts_edge_collapse_is_valid(), gts_edge_is_contact(), gts_edge_is_duplicate(), gts_edge_swap(), gts_point_triangle_closest(), gts_point_triangle_distance2(), gts_segment_new(), gts_segment_triangle_intersection(), gts_split_collapse(), gts_split_expand(), gts_triangle_edge_opposite(), gts_triangle_interpolate_height(), gts_triangle_is_ok(), gts_triangle_normal(), gts_triangle_orientation(), gts_triangle_perimeter(), gts_triangle_set(), gts_triangle_vertex_opposite(), gts_triangle_vertices(), gts_triangle_vertices_edges(), gts_triangles_are_compatible(), gts_vertex_encroaches_edge(), gts_vertex_gaussian_curvature(), gts_vertex_mean_curvature_normal(), gts_vertex_principal_directions(), gts_volume_optimized_cost(), gts_volume_optimized_vertex(), intersects(), midvertex_insertion(), next_edge(), oproute_path_speccut(), point_locate(), region_area(), replace_vertex(), reverse(), route_vertices_common_vertex(), segment_destroy(), self_intersecting(), split_edge(), split_encroached(), stats_foreach_edge(), surface_distance_foreach_boundary(), swap_if_in_circle(), tessellate_face(), triangle_barycenter(), triangle_candidate_points_from_edge(), triangle_normal(), triangle_obtuse(), triangle_orientation(), triangle_point_orientation(), triangle_use_vertices(), triangle_vertices_edges(), triangulate_face(), triangulate_loop(), unconstrain(), vertex_foreach_face(), and vertex_normal_attributes().

#define GTS_SEGMENT_CLASS (   klass)
Value:

Definition at line 531 of file gts.h.

Referenced by gts_edge_new().

#define gts_segment_connect (   s,
  e1,
  e2 
)
Value:
(((s)->v1 == e1 &&\
                                                       (s)->v2 == e2) || \
                                                      ((s)->v1 == e2 &&\
                                                       (s)->v2 == e1))

Definition at line 550 of file gts.h.

Referenced by gts_triangle_set(), and new_ear().

#define gts_segments_are_identical (   s1,
  s2 
)
Value:
(((s1)->v1 == (s2)->v1 &&\
                                                       (s1)->v2 == (s2)->v2)\
                                                      ||\
                                                      ((s1)->v1 == (s2)->v2 &&\
                                                       (s1)->v2 == (s2)->v1))

Definition at line 554 of file gts.h.

#define gts_segments_touch (   s1,
  s2 
)
Value:
((s1)->v1 == (s2)->v1 ||\
                                                      (s1)->v1 == (s2)->v2 ||\
                                                      (s1)->v2 == (s2)->v1 ||\
                                                      (s1)->v2 == (s2)->v2)

Definition at line 559 of file gts.h.

Referenced by find_vvs(), gts_triangle_is_ok(), and self_intersecting().

#define GTS_SLIST_CONTAINEE_CLASS (   klass)
Value:

Definition at line 1980 of file gts.h.

#define GTS_SLIST_CONTAINER_CLASS (   klass)
Value:

Definition at line 2069 of file gts.h.

#define GTS_SPLIT_CLASS (   klass)
Value:

Definition at line 1423 of file gts.h.

#define GTS_SPLIT_V1 (   vs)
Value:
(GTS_IS_SPLIT ((vs)->v1) ?\
                                     GTS_SPLIT ((vs)->v1)->v :\
                                     GTS_VERTEX ((vs)->v1))

Definition at line 1426 of file gts.h.

Referenced by gts_split_collapse(), gts_split_expand(), and gts_split_new().

#define GTS_SPLIT_V2 (   vs)
Value:
(GTS_IS_SPLIT ((vs)->v2) ?\
                                     GTS_SPLIT ((vs)->v2)->v :\
                                     GTS_VERTEX ((vs)->v2))

Definition at line 1429 of file gts.h.

Referenced by gts_split_collapse(), gts_split_expand(), and gts_split_new().

#define GTS_SURFACE (   obj)
Value:

Definition at line 1086 of file gts.h.

Referenced by gts_surface_new(), surface_destroy(), and surface_write().

#define GTS_SURFACE_INTER (   obj)
Value:

GTS_SURFACE_INTER: : a descendant of GtsSurfaceInter.

Casts to GtsSurfaceInter.

Definition at line 1260 of file gts.h.

Referenced by surface_inter_destroy(), and surface_inter_new().

#define GTS_SURFACE_INTER_CLASS (   klass)
Value:

GTS_SURFACE_INTER_CLASS: : a descendant of GtsSurfaceInterClass.

Casts to GtsSurfaceInterClass.

Definition at line 1269 of file gts.h.

#define GTS_TRIANGLE_CLASS (   klass)
Value:

Definition at line 639 of file gts.h.

#define gts_vector_cross (   C,
  A,
 
)
Value:
((C)[0] = (A)[1]*(B)[2] - (A)[2]*(B)[1],\
                                       (C)[1] = (A)[2]*(B)[0] - (A)[0]*(B)[2],\
                                       (C)[2] = (A)[0]*(B)[1] - (A)[1]*(B)[0])

Definition at line 770 of file gts.h.

Referenced by gts_matrix_compatible_row(), gts_matrix_quadratic_optimization(), gts_vertex_principal_directions(), points_are_folded(), and vertex_normal_attributes().

#define gts_vector_init (   v,
  p1,
  p2 
)
#define gts_vector_norm (   v)
Value:
(sqrt ((v)[0]*(v)[0] +\
                                          (v)[1]*(v)[1] +\
                                          (v)[2]*(v)[2]))

Definition at line 780 of file gts.h.

Referenced by gts_vertex_principal_directions().

#define gts_vector_normalize (   v)
Value:
{\
  gdouble __gts_n = gts_vector_norm (v);\
  if (__gts_n > 0.) {\
    (v)[0] /= __gts_n;\
    (v)[1] /= __gts_n;\
    (v)[2] /= __gts_n;\
  }\
}

Definition at line 783 of file gts.h.

Referenced by gts_matrix_rotate(), and gts_vertex_principal_directions().

#define GTS_VERTEX_NORMAL (   obj)
Value:

Definition at line 496 of file gts.h.

Referenced by vertex_normal_attributes().

#define GTS_WGEDGE (   obj)
Value:

Definition at line 2321 of file gts.h.

Referenced by gts_wgedge_new(), and wgedge_weight().

#define GTS_WGEDGE_CLASS (   klass)
Value:

Definition at line 2324 of file gts.h.

#define GTS_WGNODE (   obj)
Value:

Definition at line 2170 of file gts.h.

Referenced by gts_wgnode_new(), and wgnode_weight().

#define GTS_WGNODE_CLASS (   klass)
Value:

Definition at line 2173 of file gts.h.

#define GTS_WGRAPH (   obj)
#define GTS_WGRAPH_CLASS (   klass)
Value:

Definition at line 2413 of file gts.h.


Typedef Documentation

typedef void(* GtsArgGetFunc)(GtsObject *obj)

Definition at line 95 of file gts.h.

typedef void(* GtsArgSetFunc)(GtsObject *obj)

Definition at line 94 of file gts.h.

typedef struct _GtsBBox GtsBBox

Definition at line 87 of file gts.h.

typedef struct _GtsBBoxClass GtsBBoxClass

Definition at line 88 of file gts.h.

typedef GtsPoint*(* GtsBBoxClosestFunc)(GtsPoint *p, gpointer bounded)

GtsBBoxClosestFunc: : a GtsPoint. : an object bounded by a GtsBBox.

User function returning a GtsPoint belonging to the object defined by and closest to .

Returns: a GtsPoint.

Definition at line 884 of file gts.h.

typedef gdouble(* GtsBBoxDistFunc)(GtsPoint *p, gpointer bounded)

GtsBBoxDistFunc: : a GtsPoint. : an object bounded by a GtsBBox.

User function returning the (minimum) distance between the object defined by and point .

Returns: the distance between and .

Definition at line 872 of file gts.h.

typedef void(* GtsBBTreeTraverseFunc)(GtsBBox *bb1, GtsBBox *bb2, gpointer data)

GtsBBTreeTraverseFunc: : a GtsBBox. : another GtsBBox. : user data passed to the function.

User function called for each pair of overlapping bounding boxes. See gts_bb_tree_traverse_overlapping().

Definition at line 859 of file gts.h.

Definition at line 1702 of file gts.h.

typedef struct _GtsCluster GtsCluster

Definition at line 1848 of file gts.h.

Definition at line 1849 of file gts.h.

Definition at line 1891 of file gts.h.

Definition at line 1892 of file gts.h.

typedef struct _GtsClusterId GtsClusterId

Definition at line 1850 of file gts.h.

typedef GtsVertex*(* GtsCoarsenFunc)(GtsEdge *e, GtsVertexClass *klass, gpointer data)

Definition at line 1037 of file gts.h.

typedef struct _GtsColor GtsColor

Definition at line 116 of file gts.h.

Definition at line 506 of file gts.h.

typedef struct _GtsConstraint GtsConstraint

Definition at line 1633 of file gts.h.

Definition at line 1634 of file gts.h.

typedef struct _GtsContainee GtsContainee

Definition at line 1927 of file gts.h.

Definition at line 1928 of file gts.h.

typedef struct _GtsContainer GtsContainer

Definition at line 1929 of file gts.h.

Definition at line 1930 of file gts.h.

typedef struct _GtsEdge GtsEdge

Definition at line 81 of file gts.h.

typedef struct _GtsEdgeClass GtsEdgeClass

Definition at line 82 of file gts.h.

typedef struct _GtsEHeap GtsEHeap

Definition at line 1326 of file gts.h.

typedef struct _GtsEHeapPair GtsEHeapPair

Definition at line 1327 of file gts.h.

typedef gboolean(* GtsEncroachFunc)(GtsVertex *v, GtsEdge *e, GtsSurface *s, gpointer data)

Definition at line 1676 of file gts.h.

typedef struct _GtsFace GtsFace

Definition at line 85 of file gts.h.

typedef struct _GtsFaceClass GtsFaceClass

Definition at line 86 of file gts.h.

typedef struct _GtsFifo GtsFifo

Definition at line 1379 of file gts.h.

typedef struct _GtsFile GtsFile

Definition at line 127 of file gts.h.

Definition at line 156 of file gts.h.

typedef struct _GtsFNode GtsFNode

Definition at line 2213 of file gts.h.

typedef struct _GtsFNodeClass GtsFNodeClass

Definition at line 2214 of file gts.h.

typedef gint(* GtsFunc)(gpointer item, gpointer data)

Definition at line 122 of file gts.h.

typedef struct _GtsGEdge GtsGEdge

Definition at line 2241 of file gts.h.

typedef struct _GtsGEdgeClass GtsGEdgeClass

Definition at line 2242 of file gts.h.

typedef struct _GtsGNode GtsGNode

Definition at line 2079 of file gts.h.

typedef struct _GtsGNodeClass GtsGNodeClass

Definition at line 2080 of file gts.h.

typedef struct _GtsGNodeSplit GtsGNodeSplit

Definition at line 2436 of file gts.h.

Definition at line 2437 of file gts.h.

typedef struct _GtsGraph GtsGraph

Definition at line 2081 of file gts.h.

Definition at line 2545 of file gts.h.

typedef struct _GtsGraphClass GtsGraphClass

Definition at line 2082 of file gts.h.

Definition at line 2367 of file gts.h.

typedef struct _GtsGridPlane GtsGridPlane

Definition at line 1700 of file gts.h.

Definition at line 2025 of file gts.h.

Definition at line 2026 of file gts.h.

typedef struct _GtsHeap GtsHeap

Definition at line 1310 of file gts.h.

typedef struct _GtsHSplit GtsHSplit

Definition at line 1517 of file gts.h.

Definition at line 1518 of file gts.h.

typedef struct _GtsHSurface GtsHSurface

Definition at line 1519 of file gts.h.

Definition at line 1520 of file gts.h.

typedef void(* GtsIsoCartesianFunc)(gdouble **a, GtsCartesianGrid g, guint i, gpointer data)

Definition at line 1714 of file gts.h.

typedef struct _GtsIsoSlice GtsIsoSlice

Definition at line 1701 of file gts.h.

typedef gdouble(* GtsKeyFunc)(gpointer item, gpointer data)

GtsKeyFunc: : A pointer to an item to be stored in the heap. : User data passed to gts_eheap_new().

Returns: the value of the key for the given item.

Definition at line 107 of file gts.h.

typedef struct _GtsListFace GtsListFace

Definition at line 1656 of file gts.h.

Definition at line 99 of file gts.h.

typedef struct _GtsNEdge GtsNEdge

Definition at line 1800 of file gts.h.

typedef struct _GtsNEdgeClass GtsNEdgeClass

Definition at line 1801 of file gts.h.

typedef struct _GtsNFace GtsNFace

Definition at line 1823 of file gts.h.

typedef struct _GtsNFaceClass GtsNFaceClass

Definition at line 1824 of file gts.h.

typedef struct _GtsNGNode GtsNGNode

Definition at line 2129 of file gts.h.

Definition at line 2130 of file gts.h.

typedef struct _GtsNVertex GtsNVertex

Definition at line 1777 of file gts.h.

Definition at line 1778 of file gts.h.

typedef struct _GtsObject GtsObject

Definition at line 73 of file gts.h.

Definition at line 74 of file gts.h.

Definition at line 72 of file gts.h.

typedef void(* GtsObjectClassInitFunc)(GtsObjectClass *objclass)

Definition at line 92 of file gts.h.

typedef void(* GtsObjectInitFunc)(GtsObject *obj)

Definition at line 93 of file gts.h.

typedef struct _GtsPGEdge GtsPGEdge

Definition at line 2278 of file gts.h.

Definition at line 2279 of file gts.h.

typedef struct _GtsPGraph GtsPGraph

Definition at line 2475 of file gts.h.

Definition at line 2476 of file gts.h.

typedef struct _GtsPNode GtsPNode

Definition at line 2185 of file gts.h.

typedef struct _GtsPNodeClass GtsPNodeClass

Definition at line 2186 of file gts.h.

typedef struct _GtsPoint GtsPoint

Definition at line 75 of file gts.h.

typedef struct _GtsPointClass GtsPointClass

Definition at line 76 of file gts.h.

typedef struct _GtsPSurface GtsPSurface

Definition at line 1455 of file gts.h.

Definition at line 1456 of file gts.h.

typedef struct _GtsRange GtsRange

Definition at line 322 of file gts.h.

typedef GtsVertex*(* GtsRefineFunc)(GtsEdge *e, GtsVertexClass *klass, gpointer data)

Definition at line 1034 of file gts.h.

typedef struct _GtsSegment GtsSegment

Definition at line 79 of file gts.h.

Definition at line 80 of file gts.h.

Definition at line 1964 of file gts.h.

Definition at line 1965 of file gts.h.

Definition at line 2052 of file gts.h.

Definition at line 2053 of file gts.h.

typedef struct _GtsSplit GtsSplit

Definition at line 1400 of file gts.h.

typedef struct _GtsSplitCFace GtsSplitCFace

Definition at line 1402 of file gts.h.

typedef struct _GtsSplitClass GtsSplitClass

Definition at line 1401 of file gts.h.

typedef gboolean(* GtsSplitTraverseFunc)(GtsSplit *vs, gpointer data)

Definition at line 1444 of file gts.h.

typedef gboolean(* GtsStopFunc)(gdouble cost, guint nedge, gpointer data)

Definition at line 1040 of file gts.h.

typedef struct _GtsSurface GtsSurface

Definition at line 89 of file gts.h.

Definition at line 90 of file gts.h.

Definition at line 1228 of file gts.h.

Definition at line 1229 of file gts.h.

Definition at line 1033 of file gts.h.

Definition at line 1032 of file gts.h.

Definition at line 1131 of file gts.h.

typedef struct _GtsTriangle GtsTriangle

Definition at line 83 of file gts.h.

Definition at line 84 of file gts.h.

typedef gdouble GtsVector[3]

Definition at line 97 of file gts.h.

typedef gdouble GtsVector4[4]

Definition at line 98 of file gts.h.

typedef struct _GtsVertex GtsVertex

Definition at line 77 of file gts.h.

Definition at line 78 of file gts.h.

Definition at line 486 of file gts.h.

Definition at line 1207 of file gts.h.

typedef struct _GtsWGEdge GtsWGEdge

Definition at line 2308 of file gts.h.

Definition at line 2309 of file gts.h.

typedef struct _GtsWGNode GtsWGNode

Definition at line 2157 of file gts.h.

Definition at line 2158 of file gts.h.

typedef struct _GtsWGraph GtsWGraph

Definition at line 2397 of file gts.h.

Definition at line 2398 of file gts.h.


Enumeration Type Documentation

GtsBooleanOperation: : identifies the part of the first surface which lies outside the second surface. : identifies the part of the first surface which lies inside the second surface. : identifies the part of the second surface which lies outside the first surface. : identifies the part of the second surface which lies inside the first surface.

Enumerator:
GTS_1_OUT_2 
GTS_1_IN_2 
GTS_2_OUT_1 
GTS_2_IN_1 

Definition at line 1241 of file gts.h.

Enumerator:
GTS_OUT 
GTS_ON 
GTS_IN 

Definition at line 109 of file gts.h.

Enumerator:
GTS_DESTROYED 
GTS_USER_FLAG 

Definition at line 218 of file gts.h.

Enumerator:
GTS_NONE 
GTS_INT 
GTS_UINT 
GTS_FLOAT 
GTS_DOUBLE 
GTS_STRING 
GTS_FILE 
GTS_ERROR 

Definition at line 129 of file gts.h.

Enumerator:
GTS_BREADTH_FIRST 

Definition at line 2368 of file gts.h.


Function Documentation

void gts_bb_tree_destroy ( GNode *  tree,
gboolean  free_leaves 
)

gts_bb_tree_destroy: : a bounding box tree. : if TRUE the bounding boxes given by the user are freed.

Destroys all the bounding boxes created by and destroys the tree itself. If is set to TRUE, destroys boxes given by the user when creating the tree (i.e. leaves of the tree).

Definition at line 824 of file bbtree.c.

References bb_tree_free().

Referenced by gts_surface_distance(), and gts_surface_foreach_intersecting_face().

Here is the call graph for this function:

void gts_bb_tree_draw ( GNode *  tree,
guint  depth,
FILE *  fptr 
)

gts_bb_tree_draw: : a bounding box tree. : a specified depth. : a file pointer.

Write in an OOGL (Geomview) description of for the depth specified by .

Definition at line 771 of file bbtree.c.

References gts_bb_tree_draw(), and gts_bbox_draw().

Referenced by gts_bb_tree_draw().

Here is the call graph for this function:

gboolean gts_bb_tree_is_overlapping ( GNode *  tree,
GtsBBox bbox 
)

gts_bb_tree_is_overlapping: : a bounding box tree. : a GtsBBox.

Returns: TRUE if any leaf of overlaps , FALSE otherwise.

Definition at line 699 of file bbtree.c.

References FALSE, gts_bb_tree_is_overlapping(), gts_bboxes_are_overlapping(), and TRUE.

Referenced by gts_bb_tree_is_overlapping().

Here is the call graph for this function:

GNode* gts_bb_tree_new ( GSList *  bboxes)

gts_bb_tree_new: : a list of GtsBBox.

Builds a new hierarchy of bounding boxes for . At each level, the GNode->data field contains a GtsBBox bounding box of all the children. The tree is binary and is built by repeatedly cutting in two approximately equal halves the bounding boxes at each level until a leaf node (i.e. a bounding box given in ) is reached. In order to minimize the depth of the tree, the cutting direction is always chosen as perpendicular to the longest dimension of the bounding box.

Returns: a new hierarchy of bounding boxes.

Definition at line 543 of file bbtree.c.

References gts_bb_tree_new(), gts_bbox_bboxes(), gts_bbox_class(), node, _GtsBBox::x1, _GtsBBox::x2, _GtsBBox::y1, _GtsBBox::y2, _GtsBBox::z1, and _GtsBBox::z2.

Referenced by gts_bb_tree_new(), gts_bb_tree_surface(), gts_surface_distance(), and import_geometry().

Here is the call graph for this function:

GSList* gts_bb_tree_overlap ( GNode *  tree,
GtsBBox bbox 
)

gts_bb_tree_overlap: : a bounding box tree. : a GtsBBox.

Returns: a list of bounding boxes, leaves of which overlap .

Definition at line 670 of file bbtree.c.

References gts_bb_tree_overlap(), and gts_bboxes_are_overlapping().

Referenced by gts_bb_tree_overlap().

Here is the call graph for this function:

GtsPoint* gts_bb_tree_point_closest ( GNode *  tree,
GtsPoint p,
GtsBBoxClosestFunc  closest,
gdouble *  distance 
)

gts_bb_tree_point_closest: : a bounding box tree. : a GtsPoint. : a GtsBBoxClosestFunc. : if not NULL is set to the distance between and the new GtsPoint.

Returns: a new GtsPoint, closest point to and belonging to an object of .

Definition at line 964 of file bbtree.c.

References gts_bb_tree_point_closest_bboxes(), GTS_BBOX, GTS_OBJECT, gts_object_destroy(), and gts_point_distance2().

Here is the call graph for this function:

GSList* gts_bb_tree_point_closest_bboxes ( GNode *  tree,
GtsPoint p 
)

gts_bb_tree_point_closest_bboxes: : a bounding box tree. : a GtsPoint.

Returns: a list of GtsBBox. One of the bounding boxes is assured to contain the object of closest to .

Definition at line 880 of file bbtree.c.

References bb_tree_min_max(), gts_bbox_point_distance2(), max, and min.

Referenced by gts_bb_tree_point_closest(), and gts_bb_tree_point_distance().

Here is the call graph for this function:

gdouble gts_bb_tree_point_distance ( GNode *  tree,
GtsPoint p,
GtsBBoxDistFunc  distance,
GtsBBox **  bbox 
)

gts_bb_tree_point_distance: : a bounding box tree. : a GtsPoint. : a GtsBBoxDistFunc. : if not NULL is set to the bounding box containing the closest object.

Returns: the distance as evaluated by between and the closest object in .

Definition at line 925 of file bbtree.c.

References gts_bb_tree_point_closest_bboxes(), and GTS_BBOX.

Referenced by gts_bb_tree_segment_distance(), and gts_bb_tree_triangle_distance().

Here is the call graph for this function:

void gts_bb_tree_segment_distance ( GNode *  tree,
GtsSegment s,
GtsBBoxDistFunc  distance,
gdouble  delta,
GtsRange range 
)
GSList* gts_bb_tree_stabbed ( GNode *  tree,
GtsPoint p 
)

gts_bb_tree_stabbed: : a bounding box tree. : a GtsPoint.

Returns: a list of bounding boxes, leaves of which are stabbed by the ray defined by (see gts_bbox_is_stabbed()).

Definition at line 641 of file bbtree.c.

References gts_bb_tree_stabbed(), and gts_bbox_is_stabbed().

Referenced by cluster_find(), gts_bb_tree_stabbed(), gts_point_is_inside_surface(), and toporouter_bbox_locate().

Here is the call graph for this function:

GNode* gts_bb_tree_surface ( GtsSurface s)

gts_bb_tree_surface: : a GtsSurface.

Returns: a new hierarchy of bounding boxes bounding the faces of .

Definition at line 619 of file bbtree.c.

References gts_bb_tree_new(), gts_surface_foreach_face(), and prepend_triangle_bbox().

Referenced by gts_surface_foreach_intersecting_face().

Here is the call graph for this function:

void gts_bb_tree_surface_boundary_distance ( GNode *  tree,
GtsSurface s,
GtsBBoxDistFunc  distance,
gdouble  delta,
GtsRange range 
)
void gts_bb_tree_surface_distance ( GNode *  tree,
GtsSurface s,
GtsBBoxDistFunc  distance,
gdouble  delta,
GtsRange range 
)

gts_bb_tree_surface_distance: : a bounding box tree. : a GtsSurface. : a GtsBBoxDistFunc. : a sampling increment defined as the percentage of the diagonal of the root bounding box of . : a GtsRange to be filled with the results.

Calls gts_bb_tree_triangle_distance() for each face of . The fields of are filled with the minimum, maximum and average distance. The average distance is defined as the sum of the average distances for each triangle weighthed by their area and divided by the total area of the surface. The standard deviation is defined accordingly. The
field of is filled with the number of sampled points used.

Definition at line 1170 of file bbtree.c.

References gts_bbox_diagonal2(), gts_range_init(), gts_surface_foreach_face(), _GtsRange::max, _GtsRange::mean, _GtsRange::min, _GtsRange::stddev, _GtsRange::sum, _GtsRange::sum2, and surface_distance_foreach_triangle().

Referenced by gts_surface_distance().

Here is the call graph for this function:

void gts_bb_tree_traverse_overlapping ( GNode *  tree1,
GNode *  tree2,
GtsBBTreeTraverseFunc  func,
gpointer  data 
)

gts_bb_tree_traverse_overlapping: : a bounding box tree. : a bounding box tree. : a GtsBBTreeTraverseFunc. : user data to be passed to .

Calls for each overlapping pair of leaves of and .

Definition at line 730 of file bbtree.c.

References bbox_volume, gts_bb_tree_traverse_overlapping(), and gts_bboxes_are_overlapping().

Referenced by gts_bb_tree_traverse_overlapping(), gts_surface_foreach_intersecting_face(), and surface_inter_new().

Here is the call graph for this function:

void gts_bb_tree_triangle_distance ( GNode *  tree,
GtsTriangle t,
GtsBBoxDistFunc  distance,
gdouble  delta,
GtsRange range 
)

gts_bb_tree_triangle_distance: : a bounding box tree. : a GtsTriangle. : a GtsBBoxDistFunc. : spatial scale of the sampling to be used. : a GtsRange to be filled with the results.

Given a triangle , points are sampled regularly on its surface using as increment. The distance from each of these points to the closest object of is computed using and the gts_bb_tree_point_distance() function. The fields of are filled with the number of points sampled, the minimum, average and maximum value and the standard deviation.

Definition at line 1015 of file bbtree.c.

References gts_bb_tree_point_distance(), GTS_OBJECT, GTS_OBJECT_CLASS, gts_object_destroy(), gts_object_new(), GTS_POINT, gts_point_class(), gts_range_add_value(), gts_range_init(), gts_range_update(), gts_triangle_vertices(), gts_vector_init, gts_vector_scalar, _GtsPoint::x, x, _GtsPoint::y, y, and _GtsPoint::z.

Referenced by surface_distance_foreach_triangle().

Here is the call graph for this function:

GtsBBox* gts_bbox_bboxes ( GtsBBoxClass klass,
GSList *  bboxes 
)

gts_bbox_bboxes: : a GtsBBoxClass. : a list of GtsBBox.

Returns: a new GtsBBox bounding box of all the bounding boxes in .

Definition at line 225 of file bbtree.c.

References gts_bbox_new(), _GtsBBox::x1, _GtsBBox::x2, _GtsBBox::y1, _GtsBBox::y2, _GtsBBox::z1, and _GtsBBox::z2.

Referenced by gts_bb_tree_new().

Here is the call graph for this function:

GtsBBoxClass* gts_bbox_class ( void  )

gts_bbox_class:

Returns: the GtsBBoxClass.

Definition at line 33 of file bbtree.c.

References bbox_init(), gts_object_class(), and gts_object_class_new().

Referenced by build_list_boundary(), build_list_face(), gts_bb_tree_new(), gts_vertices_merge(), prepend_triangle_bbox(), and toporouter_bbox_class().

Here is the call graph for this function:

gdouble gts_bbox_diagonal2 ( GtsBBox bb)

gts_bbox_diagonal2: : a GtsBBox.

Returns: the squared length of the diagonal of .

Definition at line 331 of file bbtree.c.

References x, _GtsBBox::x1, _GtsBBox::x2, y, _GtsBBox::y1, _GtsBBox::y2, _GtsBBox::z1, and _GtsBBox::z2.

Referenced by gts_bb_tree_surface_boundary_distance(), and gts_bb_tree_surface_distance().

void gts_bbox_draw ( GtsBBox bb,
FILE *  fptr 
)

gts_bbox_draw: : a GtsBBox. : a file pointer.

Writes in file an OOGL (Geomview) description of .

Definition at line 351 of file bbtree.c.

References _GtsBBox::x1, _GtsBBox::x2, _GtsBBox::y1, _GtsBBox::y2, _GtsBBox::z1, and _GtsBBox::z2.

Referenced by gts_bb_tree_draw().

gboolean gts_bbox_is_stabbed ( GtsBBox bb,
GtsPoint p 
)

gts_bbox_is_stabbed: : a GtsBBox. : a GtsPoint.

Returns: TRUE if the ray starting at and ending at (+infty, ->y, ->z) intersects with , FALSE otherwise.

Definition at line 444 of file bbtree.c.

References FALSE, TRUE, _GtsPoint::x, _GtsBBox::x2, _GtsPoint::y, _GtsBBox::y1, _GtsBBox::y2, _GtsPoint::z, _GtsBBox::z1, and _GtsBBox::z2.

Referenced by gts_bb_tree_stabbed().

GtsBBox* gts_bbox_new ( GtsBBoxClass klass,
gpointer  bounded,
gdouble  x1,
gdouble  y1,
gdouble  z1,
gdouble  x2,
gdouble  y2,
gdouble  z2 
)

gts_bbox_new: : a GtsBBoxClass. : the object to be bounded. : x-coordinate of the lower left corner. : y-coordinate of the lower left corner. : z-coordinate of the lower left corner. : x-coordinate of the upper right corner. : y-coordinate of the upper right corner. : z-coordinate of the upper right corner.

Returns: a new GtsBBox.

Definition at line 92 of file bbtree.c.

References GTS_BBOX, gts_bbox_set(), GTS_OBJECT_CLASS, and gts_object_new().

Referenced by gts_bbox_bboxes(), gts_bbox_points(), gts_bbox_segment(), gts_bbox_surface(), gts_bbox_triangle(), and gts_vertices_merge().

Here is the call graph for this function:

gboolean gts_bbox_overlaps_segment ( GtsBBox bb,
GtsSegment s 
)

gts_bbox_overlaps_segment: : a GtsBBox. : a GtsSegment.

This functions uses gts_bbox_overlaps_triangle() with a degenerate triangle.

Returns: TRUE if overlaps with , FALSE otherwise.

Definition at line 504 of file bbtree.c.

References FALSE, GTS_POINT, triBoxOverlap(), _GtsSegment::v1, _GtsSegment::v2, _GtsPoint::x, _GtsBBox::x1, _GtsBBox::x2, _GtsPoint::y, _GtsBBox::y1, _GtsBBox::y2, _GtsPoint::z, _GtsBBox::z1, and _GtsBBox::z2.

Here is the call graph for this function:

gboolean gts_bbox_overlaps_triangle ( GtsBBox bb,
GtsTriangle t 
)

gts_bbox_overlaps_triangle: : a GtsBBox. : a GtsTriangle.

This is a wrapper around the fast overlap test of Tomas Akenine-Moller (http://www.cs.lth.se/home/Tomas_Akenine_Moller/).

Returns: TRUE if overlaps with , FALSE otherwise.

Definition at line 470 of file bbtree.c.

References _GtsTriangle::e1, FALSE, GTS_POINT, GTS_SEGMENT, gts_triangle_vertex, triBoxOverlap(), _GtsPoint::x, _GtsBBox::x1, _GtsBBox::x2, _GtsPoint::y, _GtsBBox::y1, _GtsBBox::y2, _GtsPoint::z, _GtsBBox::z1, and _GtsBBox::z2.

Here is the call graph for this function:

void gts_bbox_point_distance2 ( GtsBBox bb,
GtsPoint p,
gdouble *  min,
gdouble *  max 
)

gts_bbox_point_distance2: : a GtsBBox. : a GtsPoint. : a pointer on a gdouble. : a pointer on a gdouble.

Sets and to lower and upper bounds for the square of the Euclidean distance between the object contained in and . For these bounds to make any sense the bounding box must be "tight" i.e. each of the 6 faces of the box must at least be touched by one point of the bounded object.

Definition at line 397 of file bbtree.c.

References MIN, MINMAX, _GtsPoint::x, x, _GtsBBox::x1, _GtsBBox::x2, _GtsPoint::y, y, _GtsBBox::y1, _GtsBBox::y2, _GtsPoint::z, _GtsBBox::z1, and _GtsBBox::z2.

Referenced by bb_tree_min_max(), and gts_bb_tree_point_closest_bboxes().

GtsBBox* gts_bbox_points ( GtsBBoxClass klass,
GSList *  points 
)

gts_bbox_points: : a GtsBBoxClass. : a list of GtsPoint.

Returns: a new GtsBBox bounding box of .

Definition at line 258 of file bbtree.c.

References gts_bbox_new(), _GtsPoint::x, _GtsBBox::x1, _GtsBBox::x2, _GtsPoint::y, _GtsBBox::y1, _GtsBBox::y2, _GtsPoint::z, _GtsBBox::z1, and _GtsBBox::z2.

Referenced by toporouter_bbox_create_from_points().

Here is the call graph for this function:

GtsBBox* gts_bbox_segment ( GtsBBoxClass klass,
GtsSegment s 
)

gts_bbox_segment: : a GtsBBoxClass. : a GtsSegment.

Returns: a new GtsBBox bounding box of .

Definition at line 150 of file bbtree.c.

References gts_bbox_new(), GTS_POINT, _GtsSegment::v1, _GtsSegment::v2, _GtsPoint::x, _GtsBBox::x1, _GtsBBox::x2, _GtsPoint::y, _GtsBBox::y1, _GtsBBox::y2, _GtsPoint::z, _GtsBBox::z1, and _GtsBBox::z2.

Referenced by build_list_boundary().

Here is the call graph for this function:

void gts_bbox_set ( GtsBBox bbox,
gpointer  bounded,
gdouble  x1,
gdouble  y1,
gdouble  z1,
gdouble  x2,
gdouble  y2,
gdouble  z2 
)

gts_bbox_set: : a GtsBBox. : the object to be bounded. : x-coordinate of the lower left corner. : y-coordinate of the lower left corner. : z-coordinate of the lower left corner. : x-coordinate of the upper right corner. : y-coordinate of the upper right corner. : z-coordinate of the upper right corner.

Sets fields of .

Definition at line 66 of file bbtree.c.

References _GtsBBox::bounded, _GtsBBox::x1, _GtsBBox::x2, _GtsBBox::y1, _GtsBBox::y2, _GtsBBox::z1, and _GtsBBox::z2.

Referenced by gts_bbox_new().

GtsBBox* gts_bbox_surface ( GtsBBoxClass klass,
GtsSurface surface 
)

gts_bbox_surface: : a GtsBBoxClass. : a GtsSurface.

Returns: a new GtsBBox bounding box of .

Definition at line 201 of file bbtree.c.

References bbox_foreach_vertex(), gts_bbox_new(), gts_surface_foreach_vertex(), _GtsBBox::x1, _GtsBBox::x2, _GtsBBox::y1, _GtsBBox::y2, _GtsBBox::z1, and _GtsBBox::z2.

Referenced by toporouter_bbox_create().

Here is the call graph for this function:

GtsBBox* gts_bbox_triangle ( GtsBBoxClass klass,
GtsTriangle t 
)

gts_bbox_triangle: : a GtsBBoxClass. : a GtsTriangle.

Returns: a new GtsBBox bounding box of .

Definition at line 113 of file bbtree.c.

References _GtsTriangle::e1, gts_bbox_new(), GTS_POINT, GTS_SEGMENT, gts_triangle_vertex, _GtsPoint::x, _GtsBBox::x1, _GtsBBox::x2, _GtsPoint::y, _GtsBBox::y1, _GtsBBox::y2, _GtsPoint::z, _GtsBBox::z1, and _GtsBBox::z2.

Referenced by build_list_face(), and prepend_triangle_bbox().

Here is the call graph for this function:

gboolean gts_bboxes_are_overlapping ( GtsBBox bb1,
GtsBBox bb2 
)

gts_bboxes_are_overlapping: : a GtsBBox. : a GtsBBox.

Returns: TRUE if the bounding boxes and are overlapping (including just touching), FALSE otherwise.

Definition at line 299 of file bbtree.c.

References FALSE, TRUE, _GtsBBox::x1, _GtsBBox::x2, _GtsBBox::y1, _GtsBBox::y2, _GtsBBox::z1, and _GtsBBox::z2.

Referenced by gts_bb_tree_is_overlapping(), gts_bb_tree_overlap(), and gts_bb_tree_traverse_overlapping().

void gts_cluster_add ( GtsCluster c,
GtsPoint p,
gpointer  data 
)

gts_cluster_add: : a GtsCluster. : a GtsPoint. : data to pass to the add() virtual method of GtsClusterClass.

Adds point to cluster .

Definition at line 133 of file oocs.c.

References GTS_CLUSTER_CLASS, and GTS_OBJECT.

Referenced by cluster_grid_add_point().

GtsClusterClass* gts_cluster_class ( void  )

gts_cluster_class:

Returns: the GtsClusterClass.

Definition at line 84 of file oocs.c.

References cluster_class_init(), cluster_init(), gts_object_class(), and gts_object_class_new().

Referenced by cluster_destroy(), and cluster_grid_init().

Here is the call graph for this function:

void gts_cluster_grid_add_triangle ( GtsClusterGrid cluster_grid,
GtsPoint p1,
GtsPoint p2,
GtsPoint p3,
gpointer  data 
)

gts_cluster_grid_add_triangle: : a GtsClusterGrid. : a GtsPoint. : a GtsPoint. : a GtsPoint. : user data to pass to the cluster add() method.

Adds the triangle defined by , and to the respective clusters of .

Definition at line 316 of file oocs.c.

References cluster_grid_add_point(), _GtsSurface::edge_class, _GtsSurface::face_class, FALSE, GTS_EDGE, gts_edge_new(), gts_face_new(), gts_surface_add_face(), gts_triangle_use_edges(), gts_vertices_are_connected(), _GtsClusterGrid::surface, TRUE, and _GtsCluster::v.

Here is the call graph for this function:

GtsClusterGridClass* gts_cluster_grid_class ( void  )

gts_cluster_grid_class:

Returns: the GtsClusterGridClass.

Definition at line 205 of file oocs.c.

References cluster_grid_class_init(), cluster_grid_init(), gts_object_class(), and gts_object_class_new().

Referenced by cluster_grid_destroy().

Here is the call graph for this function:

GtsClusterGrid* gts_cluster_grid_new ( GtsClusterGridClass klass,
GtsClusterClass cluster_class,
GtsSurface s,
GtsBBox bbox,
gdouble  delta 
)

gts_cluster_grid_new: : a GtsClusterGridClass. : the klass to be used for the vertex clusters. : the simplified surface. : bounding box of the surface to be simplified. : the size of one grid cell of the simplification grid.

Returns: a new GtsClusterGrid.

Definition at line 235 of file oocs.c.

References _GtsClusterGrid::bbox, _GtsClusterGrid::cluster_class, GTS_CLUSTER_GRID, GTS_OBJECT_CLASS, gts_object_new(), s, _GtsClusterGrid::size, _GtsClusterGrid::surface, _GtsBBox::x1, _GtsBBox::x2, _GtsBBox::y1, _GtsBBox::y2, _GtsBBox::z1, and _GtsBBox::z2.

Here is the call graph for this function:

GtsRange gts_cluster_grid_update ( GtsClusterGrid cluster_grid)

gts_cluster_grid_update: : a GtsClusterGrid.

Updates the representative vertices of all the clusters of .

Returns: a GtsRange describing the statistics for the number of vertices added to each cluster of .

Definition at line 375 of file oocs.c.

References _GtsClusterGrid::clusters, gts_range_init(), gts_range_update(), and update_cluster().

Here is the call graph for this function:

GtsCluster* gts_cluster_new ( GtsClusterClass klass,
GtsClusterId  id,
GtsVertexClass vklass 
)

gts_cluster_new: : a GtsClusterClass. : the id of the new cluster. : a GtsVertexClass for the representative vertex of the cluster.

Returns: a new GtsCluster.

Definition at line 112 of file oocs.c.

References c, GTS_CLUSTER, GTS_OBJECT_CLASS, gts_object_new(), gts_vertex_new(), _GtsCluster::id, and _GtsCluster::v.

Referenced by cluster_grid_add_point().

Here is the call graph for this function:

void gts_cluster_update ( GtsCluster c)

gts_cluster_update: : a GtsCluster.

Updates the position of the vertex representative of all the vertices added to .

Definition at line 148 of file oocs.c.

References GTS_CLUSTER_CLASS, and GTS_OBJECT.

Referenced by update_cluster().

gboolean gts_coarsen_stop_cost ( gdouble  cost,
guint  nedge,
gdouble *  max_cost 
)

gts_coarsen_stop_cost: : the cost of the edge collapse considered. : the current number of edges of the surface being simplified. : a pointer to the maximum cost allowed for an edge collapse.

This function is to be used as the argument of gts_surface_coarsen() or gts_psurface_new().

Returns: TRUE if the cost of the edge collapse considered is larger than given by , FALSE otherwise.

Definition at line 1731 of file surface.c.

References FALSE, and TRUE.

gboolean gts_coarsen_stop_number ( gdouble  cost,
guint  nedge,
guint *  min_number 
)

gts_coarsen_stop_number: : the cost of the edge collapse considered. : the current number of edges of the surface being simplified. : a pointer to the minimum number of edges desired for the surface being simplified.

This function is to be used as the argument of gts_surface_coarsen() or gts_psurface_new().

Returns: TRUE if the edge collapse would create a surface with a smaller number of edges than given by , FALSE otherwise.

Definition at line 1708 of file surface.c.

References FALSE, and TRUE.

GtsVertexClass* gts_color_vertex_class ( void  )

Definition at line 760 of file vertex.c.

References GTS_OBJECT_CLASS, gts_object_class_new(), and gts_vertex_class().

Here is the call graph for this function:

GtsConstraintClass* gts_constraint_class ( void  )

gts_constraint_class:

Returns: the GtsConstraintClass.

Definition at line 391 of file cdt.c.

References gts_edge_class(), GTS_OBJECT_CLASS, and gts_object_class_new().

Referenced by edge_inter_class(), toporouter_arc_class(), and toporouter_constraint_class().

Here is the call graph for this function:

GtsContaineeClass* gts_containee_class ( void  )

Definition at line 33 of file container.c.

References containee_class_init(), gts_object_class(), and gts_object_class_new().

Referenced by gts_gedge_class(), and gts_slist_containee_class().

Here is the call graph for this function:

GtsContainee* gts_containee_new ( GtsContaineeClass klass)

Definition at line 54 of file container.c.

References GTS_CONTAINEE, GTS_OBJECT_CLASS, and gts_object_new().

Here is the call graph for this function:

void gts_containee_replace ( GtsContainee item,
GtsContainee with 
)

Definition at line 76 of file container.c.

References GTS_CONTAINEE_CLASS, gts_container_add(), gts_container_remove(), and GTS_OBJECT.

Here is the call graph for this function:

GtsContainerClass* gts_container_class ( void  )

Definition at line 240 of file container.c.

References container_class_init(), GTS_OBJECT_CLASS, gts_object_class_new(), and gts_slist_containee_class().

Referenced by container_destroy(), gts_hash_container_class(), and gts_slist_container_class().

Here is the call graph for this function:

GtsContainer* gts_container_new ( GtsContainerClass klass)

Definition at line 262 of file container.c.

References GTS_CONTAINER, GTS_OBJECT_CLASS, and gts_object_new().

Here is the call graph for this function:

GSList* gts_delaunay_add_constraint ( GtsSurface surface,
GtsConstraint c 
)

gts_delaunay_add_constraint: : a GtsSurface. : a GtsConstraint.

Add constraint to the constrained Delaunay triangulation defined by .

Returns: a list of GtsConstraint conflicting (i.e. intersecting) with which were removed from (NULL if there was none).

Definition at line 973 of file cdt.c.

References FALSE, gts_allow_floating_edges, GTS_IS_CONSTRAINT, GTS_OBJECT, gts_object_destroy(), GTS_POINT, GTS_SEGMENT, gts_surface_write(), remove_intersected_vertex(), _GtsFace::surfaces, triangulate_polygon(), TRUE, _GtsSegment::v1, and _GtsSegment::v2.

Referenced by build_cdt().

Here is the call graph for this function:

GtsVertex* gts_delaunay_add_vertex ( GtsSurface surface,
GtsVertex v,
GtsFace guess 
)

gts_delaunay_add_vertex: : a GtsSurface. : a GtsVertex. : NULL or a GtsFace belonging to to be used as an initial guess for point location.

Adds vertex to the Delaunay triangulation defined by . If is not contained in the convex hull bounding , is not added to the triangulation.

Returns: NULL is has been successfully added to or was already contained in , if is not contained in the convex hull bounding surface or a GtsVertex having the same x and y coordinates as .

Definition at line 642 of file cdt.c.

References f, gts_delaunay_add_vertex_to_face(), GTS_POINT, and gts_point_locate().

Referenced by build_cdt(), delaunay_create_from_vertices(), and gts_delaunay_refine().

Here is the call graph for this function:

GtsVertex* gts_delaunay_add_vertex_to_face ( GtsSurface surface,
GtsVertex v,
GtsFace f 
)

gts_delaunay_add_vertex_to_face: : a GtsSurface. : a GtsVertex. : a GtsFace belonging to .

Adds vertex to the face of the Delaunay triangulation defined by .

Returns: NULL is has been successfully added to or was already contained in or a GtsVertex having the same x and y coordinates as .

Definition at line 524 of file cdt.c.

References _GtsSurface::edge_class, _GtsSurface::face_class, GTS_EDGE, gts_edge_new(), gts_face_new(), GTS_IS_EDGE, GTS_IS_LIST_FACE, GTS_LIST_FACE, GTS_OBJECT, gts_object_attributes(), GTS_POINT, gts_point_orientation(), gts_surface_add_face(), gts_surface_remove_face(), GTS_TRIANGLE, gts_triangle_vertices_edges(), gts_vertices_are_connected(), swap_if_in_circle(), x, and y.

Referenced by gts_delaunay_add_vertex(), and split_encroached().

Here is the call graph for this function:

GtsFace* gts_delaunay_check ( GtsSurface surface)

gts_delaunay_check: : a GtsSurface.

Returns: NULL if the planar projection of is a Delaunay triangulation (unconstrained), a GtsFace violating the Delaunay property otherwise.

Definition at line 1084 of file cdt.c.

References delaunay_check(), FALSE, and gts_surface_foreach_face().

Here is the call graph for this function:

guint gts_delaunay_conform ( GtsSurface surface,
gint  steiner_max,
GtsEncroachFunc  encroaches,
gpointer  data 
)

gts_delaunay_conform: : a GtsSurface describing a constrained Delaunay triangulation. : maximum number of Steiner points. : a GtsEncroachFunc. : user-data to pass to .

Recursively split constraints of which are encroached by vertices of (see Shewchuk 96 for details). The split constraints are destroyed and replaced by a set of new constraints of the same class. If gts_vertex_encroaches_edge() is used for , the resulting surface will be Delaunay conforming.

If is positive or nul, the recursive splitting procedure will stop when this maximum number of Steiner points is reached. In that case the resulting surface will not necessarily be Delaunay conforming.

Returns: the number of remaining encroached edges. If is set to a negative value and gts_vertex_encroaches_edge() is used for this should always be zero.

Definition at line 266 of file refine.c.

References gts_fifo_destroy(), gts_fifo_foreach(), gts_fifo_new(), gts_fifo_size(), gts_object_reset_reserved(), gts_surface_foreach_edge(), make_encroached_fifo(), and split_encroached().

Here is the call graph for this function:

guint gts_delaunay_refine ( GtsSurface surface,
gint  steiner_max,
GtsEncroachFunc  encroaches,
gpointer  encroach_data,
GtsKeyFunc  cost,
gpointer  cost_data 
)

gts_delaunay_refine: : a GtsSurface describing a conforming Delaunay triangulation. : maximum number of Steiner points. : a GtsEncroachFunc. : user-data to pass to . : a GtsKeyFunc used to sort the faces during refinement. : user-data to pass to .

An implementation of the refinement algorithm described in Ruppert (1995) and Shewchuk (1996).

Returns: the number of unrefined faces of left. Should be zero if is set to a negative value.

Definition at line 362 of file refine.c.

References c, EHEAP_PAIR, f, gts_delaunay_add_vertex(), gts_delaunay_remove_vertex(), gts_eheap_destroy(), gts_eheap_foreach(), gts_eheap_new(), gts_eheap_remove_top(), gts_eheap_size(), gts_fifo_destroy(), gts_fifo_foreach(), gts_fifo_is_empty(), gts_fifo_new(), GTS_OBJECT, gts_object_reset_reserved(), GTS_POINT_CLASS, gts_surface_foreach_face(), GTS_TRIANGLE, gts_triangle_circumcircle_center(), GTS_VERTEX, heap_surface_class_new(), make_face_heap(), split_encroached(), _GtsSurface::vertex_class, and vertex_encroaches().

Here is the call graph for this function:

void gts_delaunay_remove_hull ( GtsSurface surface)

gts_delaunay_remove_hull: : a GtsSurface.

Removes all the edges of the boundary of which are not constraints.

Definition at line 1105 of file cdt.c.

References _GtsTriangle::e1, _GtsTriangle::e2, _GtsTriangle::e3, FALSE, gts_allow_floating_edges, gts_edge_is_boundary(), GTS_FACE, GTS_IS_CONSTRAINT, GTS_OBJECT, gts_object_destroy(), gts_surface_boundary(), gts_surface_remove_face(), GTS_TRIANGLE, _GtsEdge::triangles, and TRUE.

Here is the call graph for this function:

void gts_delaunay_remove_vertex ( GtsSurface surface,
GtsVertex v 
)

gts_delaunay_remove_vertex: : a GtsSurface. : a GtsVertex.

Removes from the Delaunay triangulation defined by and restores the Delaunay property. Vertex must not be used by any constrained edge otherwise the triangulation is not guaranteed to be Delaunay.

Definition at line 782 of file cdt.c.

References gts_face_has_parent_surface(), GTS_IS_FACE, gts_surface_remove_face(), gts_vertex_fan_oriented(), gts_vertex_triangles(), and triangulate_polygon().

Referenced by gts_delaunay_refine().

Here is the call graph for this function:

gboolean gts_edge_belongs_to_tetrahedron ( GtsEdge e)

gts_edge_belongs_to_tetrahedron: : a GtsEdge.

Returns: TRUE if is used by faces forming a tetrahedron, FALSE otherwise.

Definition at line 377 of file edge.c.

References FALSE, GTS_EDGE, GTS_IS_EDGE, gts_triangle_use_edges(), gts_vertices_are_connected(), triangle_vertices_edges(), _GtsEdge::triangles, and TRUE.

Referenced by gts_edge_collapse_is_valid().

Here is the call graph for this function:

GtsEdgeClass* gts_edge_class ( void  )

gts_edge_class:

Returns: the GtsEdgeClass.

Definition at line 64 of file edge.c.

References edge_class_init(), edge_init(), GTS_OBJECT_CLASS, gts_object_class_new(), and gts_segment_class().

Referenced by edge_clone(), edge_destroy(), gts_constraint_class(), gts_nedge_class(), gts_triangle_enclosing(), surface_init(), and toporouter_edge_class().

Here is the call graph for this function:

gboolean gts_edge_collapse_creates_fold ( GtsEdge e,
GtsVertex v,
gdouble  max 
)

gts_edge_collapse_creates_fold: : a GtsEdge. : a GtsVertex. : the maximum value of the square of the cosine of the angle between two triangles.

Returns: TRUE if collapsing edge to vertex would create faces making an angle the cosine squared of which would be larger than max, FALSE otherwise.

Definition at line 1367 of file surface.c.

References _GtsTriangle::e1, _GtsTriangle::e2, _GtsTriangle::e3, edge_triangles(), FALSE, GTS_EDGE, GTS_IS_EDGE, GTS_SEGMENT, gts_triangle_edge_opposite(), gts_triangles_are_folded(), gts_vertex_triangles(), replace_vertex(), s, _GtsVertex::segments, _GtsEdge::triangles, TRUE, _GtsSegment::v1, and _GtsSegment::v2.

Referenced by edge_collapse().

Here is the call graph for this function:

gboolean gts_edge_collapse_is_valid ( GtsEdge e)

gts_edge_collapse_is_valid: : a GtsEdge.

An implementation of the topological constraints described in the "Mesh Optimization" article of Hoppe et al (1993).

Returns: TRUE if can be collapsed without violation of the topological constraints, FALSE otherwise.

Definition at line 1446 of file surface.c.

References _GtsTriangle::e1, _GtsTriangle::e2, _GtsTriangle::e3, FALSE, gts_edge_belongs_to_tetrahedron(), gts_edge_is_boundary(), GTS_IS_EDGE, GTS_SEGMENT, gts_triangle_use_edges(), gts_vertex_is_boundary(), _GtsEdge::triangles, and TRUE.

Referenced by edge_collapse().

Here is the call graph for this function:

guint gts_edge_face_number ( GtsEdge e,
GtsSurface s 
)

gts_edge_face_number: : a GtsEdge. : a GtsSurface.

Returns: the number of faces using and belonging to .

Definition at line 256 of file edge.c.

References GTS_FACE, gts_face_has_parent_surface(), GTS_IS_FACE, and _GtsEdge::triangles.

Referenced by check_surface_edge(), closed_foreach_edge(), gts_edge_swap(), gts_psurface_new(), gts_surface_coarsen(), gts_surface_refine(), gts_vertex_principal_directions(), manifold_foreach_edge(), non_manifold_edges(), and stats_foreach_edge().

Here is the call graph for this function:

GtsFace* gts_edge_has_any_parent_surface ( GtsEdge e)

gts_edge_has_any_parent_surface: : a GtsEdge.

Returns: NULL if is not an edge of any triangle or if all the faces having has an edge do not belong to any surface, a GtsFace belonging to a surface and having as an edge.

Definition at line 167 of file edge.c.

References GTS_FACE, GTS_IS_FACE, and _GtsEdge::triangles.

GtsFace* gts_edge_has_parent_surface ( GtsEdge e,
GtsSurface surface 
)

gts_edge_has_parent_surface: : a GtsEdge. : a GtsSurface.

Returns: a GtsFace of having as an edge, NULL otherwise.

Definition at line 143 of file edge.c.

References gts_face_has_parent_surface(), GTS_IS_FACE, and _GtsEdge::triangles.

Referenced by gts_edges_from_vertices(), gts_vertex_neighbors(), split_encroached(), and stats_foreach_vertex().

Here is the call graph for this function:

GtsFace* gts_edge_is_boundary ( GtsEdge e,
GtsSurface surface 
)

gts_edge_is_boundary: : a GtsEdge. : a GtsSurface or NULL.

Returns: the unique GtsFace (which belongs to ) and which has as an edge (i.e. is a boundary edge (of )) or NULL if there is more than one or no faces (belonging to ) and with as an edge.

Definition at line 193 of file edge.c.

References f, gts_face_has_parent_surface(), GTS_IS_FACE, and _GtsEdge::triangles.

Referenced by build_list_boundary(), edge_boundary_cost(), gts_delaunay_remove_hull(), gts_edge_collapse_is_valid(), gts_surface_inter_boolean(), gts_vertex_is_boundary(), gts_volume_optimized_vertex(), next_compatible_face(), split_encroached(), surface_boundary(), surface_distance_foreach_boundary(), traverse_boundary(), and write_edge_oogl_boundary().

Here is the call graph for this function:

guint gts_edge_is_contact ( GtsEdge e)

gts_edge_is_contact: : a GtsEdge.

Returns: the number of sets of connected triangles sharing as a contact edge.

Definition at line 453 of file edge.c.

References GTS_OBJECT, gts_object_reset_reserved(), GTS_SEGMENT, gts_vertex_triangles(), next_edge(), triangle_next(), and _GtsEdge::triangles.

Referenced by edge_collapse().

Here is the call graph for this function:

GtsEdge* gts_edge_is_duplicate ( GtsEdge e)

gts_edge_is_duplicate: : a GtsEdge.

Returns: the first GtsEdge different from which shares the same endpoints or NULL if there is none.

Definition at line 281 of file edge.c.

References GTS_EDGE, GTS_IS_EDGE, GTS_SEGMENT, s, _GtsSegment::v1, and _GtsSegment::v2.

Referenced by edge_collapse(), gts_edges_merge(), and merge_duplicate().

GtsVertex* gts_edge_is_encroached ( GtsEdge e,
GtsSurface s,
GtsEncroachFunc  encroaches,
gpointer  data 
)

gts_edge_is_encroached: : a GtsEdge. : a GtsSurface describing a (constrained) Delaunay triangulation. : a GtsEncroachFunc. : user data to be passed to .

Returns: a GtsVertex belonging to and encroaching upon (as defined by ) or NULL if there is none.

Definition at line 57 of file refine.c.

References f, gts_face_has_parent_surface(), GTS_IS_FACE, GTS_TRIANGLE, gts_triangle_vertex_opposite(), and _GtsEdge::triangles.

Referenced by make_encroached_fifo(), and split_encroached().

Here is the call graph for this function:

gboolean gts_edge_manifold_faces ( GtsEdge e,
GtsSurface s,
GtsFace **  f1,
GtsFace **  f2 
)

gts_edge_manifold_faces: : a GtsEdge. : a GtsSurface. : pointer for first face. : pointer for second face.

If is a manifold edge of surface , fills and with the faces belonging to and sharing .

Returns: TRUE if is a manifold edge, FALSE otherwise.

Definition at line 560 of file edge.c.

References FALSE, gts_face_has_parent_surface(), GTS_IS_FACE, and _GtsEdge::triangles.

Here is the call graph for this function:

void gts_edge_replace ( GtsEdge e,
GtsEdge with 
)

gts_edge_replace: : a GtsEdge. : a GtsEdge.

Replaces with . For each triangle which uses as an edge, is replaced with . The ->triangles list is updated appropriately and the ->triangles list is freed and set to NULL.

Definition at line 116 of file edge.c.

References _GtsTriangle::e1, _GtsTriangle::e2, _GtsTriangle::e3, and _GtsEdge::triangles.

Referenced by edge_collapse(), gts_edges_merge(), merge_duplicate(), and unconstrain().

GSList* gts_edges_from_vertices ( GSList *  vertices,
GtsSurface parent 
)

gts_edges_from_vertices: : a list of GtsVertex. : a GtsSurface.

Returns: a list of unique GtsEdge which have one of their vertices in and are used by a face of .

Definition at line 222 of file edge.c.

References GTS_EDGE, gts_edge_has_parent_surface(), GTS_IS_EDGE, GTS_VERTEX, hash(), and s.

Here is the call graph for this function:

GList* gts_edges_merge ( GList *  edges)

gts_edges_merge: : a list of GtsEdge.

For each edge in 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.

Returns: the updated list.

Definition at line 321 of file edge.c.

References FALSE, gts_allow_floating_edges, gts_edge_is_duplicate(), gts_edge_replace(), GTS_OBJECT, gts_object_destroy(), and TRUE.

Here is the call graph for this function:

void gts_eheap_decrease_key ( GtsEHeap heap,
GtsEHeapPair p,
gdouble  new_key 
)

gts_eheap_decrease_key: : a GtsEHeap. : a GtsEHeapPair. : the new value of the key for this element. Must be smaller than the current key.

Decreases the value of the key of the element at position .

Definition at line 357 of file eheap.c.

References _GtsEHeap::elts, _GtsEHeap::frozen, _GtsEHeapPair::key, _GtsEHeapPair::pos, and sift_up().

Referenced by decrease_key().

Here is the call graph for this function:

void gts_eheap_destroy ( GtsEHeap heap)
void gts_eheap_foreach ( GtsEHeap heap,
GFunc  func,
gpointer  data 
)

gts_eheap_foreach: : a GtsEHeap. : the function to call for each element in the heap. : to pass to .

Definition at line 292 of file eheap.c.

References _GtsEHeap::elts.

Referenced by gts_delaunay_refine(), gts_graph_bisection_kl_refine(), gts_psurface_new(), gts_surface_coarsen(), heap_new(), and route().

void gts_eheap_freeze ( GtsEHeap heap)

gts_eheap_freeze: : a GtsEHeap.

Freezes the heap. Any subsequent operation will not preserve the heap property. Used in conjunction with gts_eheap_insert() and gts_eheap_thaw() to create a heap in O(n) time.

Definition at line 385 of file eheap.c.

References _GtsEHeap::frozen, and TRUE.

Referenced by gts_graph_bfgg_bisection(), gts_graph_bisection_bkl_refine(), gts_graph_bisection_kl_refine(), gts_graph_ggg_bisection(), gts_psurface_new(), gts_surface_coarsen(), and gts_surface_refine().

GtsEHeapPair* gts_eheap_insert ( GtsEHeap heap,
gpointer  p 
)

gts_eheap_insert: : a GtsEHeap. : a pointer to add to the heap.

Inserts a new element in the heap.

Returns: a GtsEHeapPair describing the position of the element in the heap. This pointer is necessary for gts_eheap_remove() and gts_eheap_decrease_key().

Definition at line 84 of file eheap.c.

References _GtsEHeap::data, _GtsEHeapPair::data, _GtsEHeap::elts, _GtsEHeap::frozen, _GtsEHeap::func, _GtsEHeapPair::key, _GtsEHeapPair::pos, and sift_up().

Referenced by add_neighbor(), add_seed(), build_bheap(), build_heap(), create_heap_refine(), gts_graph_bisection_kl_refine(), insert_entry_into_heap(), midvertex_insertion(), route(), and update_neighbors().

Here is the call graph for this function:

GtsEHeapPair* gts_eheap_insert_with_key ( GtsEHeap heap,
gpointer  p,
gdouble  key 
)

gts_eheap_insert_with_key: : a GtsEHeap. : a pointer to add to the heap. : the value of the key associated to .

Inserts a new element in the heap.

Returns: a GtsEHeapPair describing the position of the element in the heap. This pointer is necessary for gts_eheap_remove() and gts_eheap_decrease_key().

Definition at line 115 of file eheap.c.

References _GtsEHeapPair::data, _GtsEHeap::elts, _GtsEHeap::frozen, _GtsEHeapPair::key, _GtsEHeapPair::pos, and sift_up().

Referenced by edge_collapse(), heap_surface_add_face(), and make_face_heap().

Here is the call graph for this function:

gdouble gts_eheap_key ( GtsEHeap heap,
gpointer  p 
)

gts_eheap_key: : a GtsEHeap. : a pointer to be tested;

Returns: the value of the key for pointer .

Definition at line 443 of file eheap.c.

References _GtsEHeap::data, and _GtsEHeap::func.

Referenced by heap_surface_add_face(), and make_face_heap().

void gts_eheap_randomized ( GtsEHeap heap,
gboolean  randomized 
)

gts_eheap_randomized: : a GtsEHeap. : whether should be randomized.

Definition at line 456 of file eheap.c.

References _GtsEHeap::randomized.

gpointer gts_eheap_remove ( GtsEHeap heap,
GtsEHeapPair p 
)

gts_eheap_remove: : a GtsEHeap. : a GtsEHeapPair.

Removes element corresponding to from in O(log n).

Returns: the element just removed from .

Definition at line 316 of file eheap.c.

References _GtsEHeapPair::data, _GtsEHeap::elts, gts_eheap_remove_top(), PARENT, and _GtsEHeapPair::pos.

Referenced by add_neighbor(), gts_graph_bisection_kl_refine(), heap_remove(), heap_surface_remove_face(), and update_neighbors().

Here is the call graph for this function:

gpointer gts_eheap_remove_top ( GtsEHeap heap,
gdouble *  key 
)

gts_eheap_remove_top: : a GtsEHeap. : a pointer on a gdouble or NULL.

Removes the element at the top of the heap and optionally (if is not NULL) returns the value of its key.

Returns: the element at the top of the heap.

Definition at line 185 of file eheap.c.

References _GtsEHeapPair::data, _GtsEHeap::elts, _GtsEHeapPair::key, len, _GtsEHeapPair::pos, and sift_down().

Referenced by gts_delaunay_refine(), gts_eheap_remove(), gts_graph_bfgg_bisection(), gts_graph_bisection_bkl_refine(), gts_graph_bisection_kl_refine(), gts_graph_ggg_bisection(), gts_psurface_new(), gts_surface_coarsen(), gts_surface_refine(), and route().

Here is the call graph for this function:

guint gts_eheap_size ( GtsEHeap heap)

gts_eheap_size: : a GtsEHeap.

Returns: the number of items in .

Definition at line 398 of file eheap.c.

References _GtsEHeap::elts.

Referenced by gts_delaunay_refine(), gts_psurface_new(), gts_surface_coarsen(), gts_surface_refine(), heap_is_empty(), and route().

void gts_eheap_thaw ( GtsEHeap heap)

gts_eheap_thaw: : a GtsEHeap.

If has been frozen previously using gts_eheap_freeze(), reorder it in O(n) time and unfreeze it.

Definition at line 271 of file eheap.c.

References _GtsEHeap::elts, FALSE, _GtsEHeap::frozen, and sift_down().

Referenced by gts_eheap_update(), gts_graph_bfgg_bisection(), gts_graph_bisection_bkl_refine(), gts_graph_bisection_kl_refine(), gts_graph_ggg_bisection(), gts_psurface_new(), gts_surface_coarsen(), and gts_surface_refine().

Here is the call graph for this function:

gpointer gts_eheap_top ( GtsEHeap heap,
gdouble *  key 
)

gts_eheap_top: : a GtsEHeap. : a pointer on a gdouble or NULL.

Returns: the element at the top of the heap and optionally (if is not NULL) its key.

Definition at line 228 of file eheap.c.

References _GtsEHeapPair::data, _GtsEHeap::elts, and _GtsEHeapPair::key.

Referenced by gts_hsurface_foreach(), and heap_top().

void gts_eheap_update ( GtsEHeap heap)

gts_eheap_update: : a GtsEHeap.

Updates the key of each element of and reorders it.

Definition at line 411 of file eheap.c.

References _GtsEHeapPair::data, _GtsEHeap::data, _GtsEHeap::elts, _GtsEHeap::frozen, _GtsEHeap::func, gts_eheap_thaw(), _GtsEHeapPair::key, len, and TRUE.

Referenced by route().

Here is the call graph for this function:

GtsFaceClass* gts_face_class ( void  )

gts_face_class:

Returns: the GtsFaceClass.

Definition at line 63 of file face.c.

References face_class_init(), face_init(), GTS_OBJECT_CLASS, gts_object_class_new(), and gts_triangle_class().

Referenced by build_cdt(), cface_expand(), delaunay_create_from_vertices(), face_clone(), face_destroy(), gts_list_face_class(), gts_nface_class(), and surface_init().

Here is the call graph for this function:

void gts_face_foreach_neighbor ( GtsFace f,
GtsSurface s,
GtsFunc  func,
gpointer  data 
)

gts_face_foreach_neighbor: : a GtsFace. : a GtsSurface or NULL. : a GtsFunc. : user data to pass to .

Calls for each neighbor of belonging to (if not NULL).

Definition at line 238 of file face.c.

References GTS_FACE, gts_face_has_parent_surface(), GTS_IS_FACE, and GTS_TRIANGLE.

Referenced by gts_surface_traverse_next().

Here is the call graph for this function:

gboolean gts_face_is_compatible ( GtsFace f,
GtsSurface s 
)

gts_face_is_compatible: : a GtsFace. : a GtsSurface.

Returns: TRUE if is compatible with all its neighbors belonging to , FALSE otherwise.

Definition at line 289 of file face.c.

References FALSE, GTS_TRIANGLE, and triangle_is_incompatible().

Referenced by stats_foreach_face().

Here is the call graph for this function:

guint gts_face_neighbor_number ( GtsFace f,
GtsSurface s 
)

gts_face_neighbor_number: : a GtsFace. : a GtsSurface or NULL.

Returns: the number of faces neighbors of and belonging to .

Definition at line 169 of file face.c.

References GTS_FACE, gts_face_has_parent_surface(), GTS_IS_FACE, and GTS_TRIANGLE.

Here is the call graph for this function:

GSList* gts_face_neighbors ( GtsFace f,
GtsSurface s 
)

gts_face_neighbors: : a GtsFace. : a GtsSurface or NULL.

Returns: a list of unique GtsFace neighbors of and belonging to .

Definition at line 203 of file face.c.

References GTS_FACE, gts_face_has_parent_surface(), GTS_IS_FACE, and GTS_TRIANGLE.

Here is the call graph for this function:

GSList* gts_faces_from_edges ( GSList *  edges,
GtsSurface s 
)

gts_faces_from_edges: : a list of GtsEdge. : a GtsSurface or NULL.

Builds a list of unique faces which belong to and have one of their edges in .

Returns: the list of faces.

Definition at line 136 of file face.c.

References GTS_EDGE, GTS_FACE, gts_face_has_parent_surface(), GTS_IS_FACE, and hash().

Here is the call graph for this function:

void gts_fifo_destroy ( GtsFifo fifo)

gts_fifo_destroy: : a GtsFifo.

Frees all the memory allocated for .

Definition at line 138 of file fifo.c.

References _GtsFifo::head.

Referenced by gts_delaunay_conform(), gts_delaunay_refine(), gts_graph_traverse_destroy(), gts_surface_traverse_destroy(), and walk_faces().

void gts_fifo_foreach ( GtsFifo fifo,
GtsFunc  func,
gpointer  data 
)

gts_fifo_foreach: : a GtsFifo. : a GtsFunc. : user data to be passed to .

Calls in order for each item in , passing .

Definition at line 166 of file fifo.c.

References _GtsFifo::tail.

Referenced by gts_delaunay_conform(), and gts_delaunay_refine().

gboolean gts_fifo_is_empty ( GtsFifo fifo)

gts_fifo_is_empty: : a GtsFifo.

Returns: TRUE if is empty, FALSE otherwise.

Definition at line 151 of file fifo.c.

References _GtsFifo::head, and TRUE.

Referenced by gts_delaunay_refine().

GtsFifo* gts_fifo_new ( void  )

gts_fifo_new:

Returns: a new GtsFifo.

Definition at line 32 of file fifo.c.

References _GtsFifo::head, and _GtsFifo::tail.

Referenced by gts_delaunay_conform(), gts_delaunay_refine(), gts_graph_traverse_new(), gts_surface_traverse_new(), and walk_faces().

gpointer gts_fifo_pop ( GtsFifo fifo)

gts_fifo_pop: : a GtsFifo.

Removes the first element from .

Returns: the first element in or NULL if is empty.

Definition at line 87 of file fifo.c.

References _GtsFifo::head, and _GtsFifo::tail.

Referenced by gts_graph_traverse_next(), gts_surface_traverse_next(), split_encroached(), and walk_faces().

void gts_fifo_push ( GtsFifo fifo,
gpointer  data 
)

gts_fifo_push: : a GtsFifo. : data to add to .

Push into .

Definition at line 70 of file fifo.c.

References _GtsFifo::head, and _GtsFifo::tail.

Referenced by gts_graph_traverse_new(), gts_surface_traverse_new(), make_encroached_fifo(), push_neighbor(), split_encroached(), vertex_encroaches(), and walk_faces().

void gts_fifo_reverse ( GtsFifo fifo)

gts_fifo_reverse: : a GtsFifo.

Reverses the order of elements in .

Definition at line 186 of file fifo.c.

References _GtsFifo::head, and _GtsFifo::tail.

guint gts_fifo_size ( GtsFifo fifo)

gts_fifo_size: : a GtsFifo.

Returns: the number of elements in .

Definition at line 125 of file fifo.c.

References _GtsFifo::head.

Referenced by gts_delaunay_conform().

gpointer gts_fifo_top ( GtsFifo fifo)

gts_fifo_top: : a GtsFifo.

Returns: the first element in or NULL if is empty.

Definition at line 110 of file fifo.c.

References _GtsFifo::tail.

Referenced by gts_graph_traverse_what_next().

void gts_fifo_write ( GtsFifo fifo,
FILE *  fp 
)

gts_fifo_write: : a GtsFifo. : a file pointer.

Writes the content of in .

Definition at line 47 of file fifo.c.

References _GtsFifo::head.

GtsFileVariable* gts_file_assign_next ( GtsFile f,
GtsFileVariable vars 
)

gts_file_assign_next: : a GtsFile. : a GTS_NONE terminated array of GtsFileVariable.

Assigns the next optional argument of read from .

Returns: the variable of which has been assigned or NULL if no variable has been assigned (if an error has been encountered the field of is set).

Definition at line 451 of file gts/misc.c.

References _GtsFileVariable::data, FALSE, GTS_DOUBLE, GTS_ERROR, GTS_FILE, gts_file_error(), gts_file_next_token(), GTS_FLOAT, GTS_INT, GTS_NONE, GTS_STRING, GTS_UINT, _GtsFile::line, _GtsFileVariable::line, _GtsFileVariable::name, _GtsFile::pos, _GtsFileVariable::pos, _GtsFile::scope_max, _GtsFileVariable::set, _GtsFile::token, TRUE, _GtsFileVariable::type, _GtsFile::type, and _GtsFileVariable::unique.

Referenced by gts_file_assign_variables().

Here is the call graph for this function:

void gts_file_assign_start ( GtsFile f,
GtsFileVariable vars 
)

gts_file_assign_start: : a GtsFile. : a GTS_NONE terminated array of GtsFileVariable.

Opens a block delimited by braces to read a list of optional arguments specified by .

If an error is encountered the field of is set.

Definition at line 420 of file gts/misc.c.

References FALSE, gts_file_error(), gts_file_next_token(), GTS_NONE, _GtsFile::scope_max, _GtsFile::type, and _GtsFileVariable::type.

Referenced by gts_file_assign_variables().

Here is the call graph for this function:

void gts_file_assign_variables ( GtsFile f,
GtsFileVariable vars 
)

gts_file_assign_variables: : a GtsFile. : an array of GtsFileVariable.

Assigns all the variables belonging to found in .

If an error is encountered the field of is set.

Definition at line 562 of file gts/misc.c.

References gts_file_assign_next(), and gts_file_assign_start().

Here is the call graph for this function:

void gts_file_destroy ( GtsFile f)

gts_file_destroy: : a GtsFile.

Frees all the memory allocated for .

Definition at line 107 of file gts/misc.c.

References _GtsFile::comments, _GtsFile::delimiters, _GtsFile::error, _GtsFile::s1, _GtsFile::token, _GtsFile::tokens, and TRUE.

void gts_file_error ( GtsFile f,
const gchar *  format,
  ... 
)

gts_file_error: : a . : the standard sprintf() format string. @...: the parameters to insert into the format string.

Sets the field of using gts_file_verror().

This function can be called only once and disables any other operation on (gts_file_close() excepted).

Definition at line 156 of file gts/misc.c.

References args, and gts_file_verror().

Referenced by graph_read(), gts_file_assign_next(), gts_file_assign_start(), gts_file_getc(), gts_graph_read(), gts_graph_read_jostle(), gts_psurface_read_vertex(), gts_surface_read(), nedge_read(), nface_read(), point_read(), and surface_read().

Here is the call graph for this function:

void gts_file_first_token_after ( GtsFile f,
GtsTokenType  type 
)

gts_file_first_token_after: : a GtsFile. : a GtsTokenType.

Finds and sets the first token of a type different from occuring after a token of type .

Definition at line 398 of file gts/misc.c.

References GTS_ERROR, gts_file_next_token(), GTS_NONE, and _GtsFile::type.

Referenced by gts_graph_read(), gts_graph_read_jostle(), gts_psurface_open(), gts_psurface_read_vertex(), gts_surface_read(), and surface_read().

Here is the call graph for this function:

gint gts_file_getc ( GtsFile f)

gts_file_getc : : a GtsFile.

Returns: the next character in or EOF if the end of the file is reached or if an error occured.

Definition at line 186 of file gts/misc.c.

References c, char_in_string(), _GtsFile::comments, _GtsFile::curline, _GtsFile::curpos, GTS_ERROR, gts_file_error(), _GtsFile::line, next_char(), _GtsFile::pos, _GtsFile::scope, and _GtsFile::type.

Referenced by gts_file_getc_scope().

Here is the call graph for this function:

gint gts_file_getc_scope ( GtsFile f)

gts_file_getc_scope : : a GtsFile.

Returns: the next character in in the scope defined by ->scope_max or EOF if the end of the file is reached or if an error occured.

Definition at line 270 of file gts/misc.c.

References c, GTS_ERROR, gts_file_getc(), _GtsFile::scope, _GtsFile::scope_max, and _GtsFile::type.

Referenced by gts_file_next_token().

Here is the call graph for this function:

GtsFile* gts_file_new ( FILE *  fp)

gts_file_new: : a file pointer.

Returns: a new GtsFile.

Definition at line 69 of file gts/misc.c.

References f, file_new(), fp, _GtsFile::fp, and gts_file_next_token().

Here is the call graph for this function:

GtsFile* gts_file_new_from_string ( const gchar *  s)

gts_file_new_from_string: : a string.

Returns: a new GtsFile.

Definition at line 88 of file gts/misc.c.

References f, file_new(), gts_file_next_token(), _GtsFile::s, and _GtsFile::s1.

Here is the call graph for this function:

guint gts_file_read ( GtsFile f,
gpointer  ptr,
guint  size,
guint  nmemb 
)

gts_file_read: : a GtsFile. : a pointer. : size of an element. : number of elements.

Reads elements of data, each bytes long, from , storing them at the location given by .

Returns: the number of elements read.

Definition at line 239 of file gts/misc.c.

References _GtsFile::curline, _GtsFile::curpos, _GtsFile::fp, GTS_ERROR, n, and _GtsFile::type.

Referenced by point_read().

void gts_file_variable_error ( GtsFile f,
GtsFileVariable vars,
const gchar *  name,
const gchar *  format,
  ... 
)
void gts_file_verror ( GtsFile f,
const gchar *  format,
va_list  args 
)

gts_file_verror: : a . : the standard sprintf() format string. : the list of parameters to insert into the format string.

Sets the field of using g_strdup_vprintf().

This function can be called only once and disables any other operation on (gts_file_close() excepted).

Definition at line 133 of file gts/misc.c.

References _GtsFile::error, GTS_ERROR, and _GtsFile::type.

Referenced by gts_file_error(), and gts_file_variable_error().

void gts_finalize ( void  )

gts_finalize:

Free all the memory allocated by the object system of GTS. No other GTS function can be called after this function has been called.

Definition at line 338 of file object.c.

References class_table, and free_class().

Here is the call graph for this function:

GtsFNodeClass* gts_fnode_class ( void  )

gts_fnode_class:

Returns: the GtsFNodeClass.

Definition at line 432 of file graph.c.

References fnode_class_init(), fnode_init(), gts_gnode_class(), GTS_OBJECT_CLASS, and gts_object_class_new().

Referenced by create_node().

Here is the call graph for this function:

GtsFNode* gts_fnode_new ( GtsFNodeClass klass,
GtsFace f 
)

gts_fnode_new: : a GtsFNodeClass. : a GtsFace.

Returns: a new GtsFNode associated with face .

Definition at line 460 of file graph.c.

References f, _GtsFNode::f, GTS_FNODE, GTS_OBJECT_CLASS, and gts_object_new().

Referenced by create_node().

Here is the call graph for this function:

GtsGEdgeClass* gts_gedge_class ( void  )

gts_gedge_class:

Returns: the GtsGEdgeClass.

Definition at line 537 of file graph.c.

References gedge_class_init(), gedge_init(), gts_containee_class(), GTS_OBJECT_CLASS, and gts_object_class_new().

Referenced by gedge_destroy(), gedge_remove_container(), graph_init(), graph_read(), gts_graph_read(), gts_pgedge_class(), and gts_wgedge_class().

Here is the call graph for this function:

GtsGEdge* gts_gedge_new ( GtsGEdgeClass klass,
GtsGNode n1,
GtsGNode n2 
)

gts_gedge_new: : a GtsGEdgeClass. : a GtsGNode. : another GtsGNode.

Returns: a new GtsGEdge linking and .

Definition at line 566 of file graph.c.

References GTS_CONTAINEE, GTS_CONTAINER, gts_container_add(), GTS_GEDGE, GTS_OBJECT_CLASS, gts_object_new(), and _GtsGEdgeClass::link.

Referenced by gts_graph_read(), gts_graph_read_jostle(), gts_pgedge_new(), and gts_wgedge_new().

Here is the call graph for this function:

gfloat gts_gedge_weight ( GtsGEdge e)

gts_gedge_weight: : a GtsGEdge.

Returns: the weight of edge as defined by the weight() method of GtsGEdgeClass.

Definition at line 593 of file graph.c.

References GTS_GEDGE_CLASS, and GTS_OBJECT.

Referenced by gts_gnode_move_cost(), gts_gnode_split_collapse(), match_neighbor(), node_cost(), and sum_edge_cuts_weight().

GtsGNodeClass* gts_gnode_class ( void  )
guint gts_gnode_degree ( GtsGNode n,
GtsGraph g 
)

gts_gnode_degree:
: a GtsGNode. : a GtsGraph or NULL.

Returns: the number of neighbors of
(belonging to if is not NULL).

Definition at line 158 of file graph.c.

References GTS_CONTAINEE, gts_containee_is_contained(), GTS_CONTAINER, GTS_GNODE_NEIGHBOR, and GTS_SLIST_CONTAINER.

Referenced by bisection_children(), check_bg(), compute_degree(), degree_cost(), find_smallest_degree(), gts_graph_bisection_bkl_refine(), and update_neighbors().

Here is the call graph for this function:

void gts_gnode_foreach_edge ( GtsGNode n,
GtsGraph g,
GtsFunc  func,
gpointer  data 
)

gts_gnode_foreach_edge:
: a GtsGNode. : a GtsGraph or NULL. : a GtsFunc. : user data to be passed to .

Calls for each GtsGEdge connecting
to another GtsGNode (belonging to if is not NULL.

Definition at line 131 of file graph.c.

References GTS_CONTAINEE, gts_containee_is_contained(), GTS_CONTAINER, GTS_GNODE_NEIGHBOR, and GTS_SLIST_CONTAINER.

Here is the call graph for this function:

void gts_gnode_foreach_neighbor ( GtsGNode n,
GtsGraph g,
GtsFunc  func,
gpointer  data 
)

gts_gnode_foreach_neighbor:
: a GtsGNode. : a GtsGraph or NULL. : a GtsFunc. : user data to be passed to .

Calls for each neighbor GtsGNode of
(belonging to if is not NULL.

Definition at line 101 of file graph.c.

References GTS_CONTAINEE, gts_containee_is_contained(), GTS_CONTAINER, GTS_GNODE_NEIGHBOR, and GTS_SLIST_CONTAINER.

Referenced by count_edge_cuts(), graph_new_seed(), gts_graph_ggg_bisection(), and gts_graph_traverse_next().

Here is the call graph for this function:

gfloat gts_gnode_move_cost ( GtsGNode n,
GtsGraph src,
GtsGraph dst 
)

gts_gnode_move_cost:
: a GtsGNode. : a GtsGraph containing
. : another GtsGraph.

Returns: the cost (increase in the sum of the weights of the edges cut) of moving
from to .

Definition at line 187 of file graph.c.

References GTS_CONTAINEE, gts_containee_is_contained(), GTS_CONTAINER, gts_gedge_weight(), GTS_GNODE_NEIGHBOR, GTS_SLIST_CONTAINER, and neighbor().

Referenced by node_move_cost1(), and node_move_cost2().

Here is the call graph for this function:

GtsGNode* gts_gnode_new ( GtsGNodeClass klass)

gts_gnode_new: : a GtsGNodeClass.

Returns: a new GtsGNode.

Definition at line 82 of file graph.c.

References GTS_GNODE, GTS_OBJECT_CLASS, and gts_object_new().

Referenced by gts_ngnode_new(), and gts_wgnode_new().

Here is the call graph for this function:

GtsGNodeSplitClass* gts_gnode_split_class ( void  )

gts_gnode_split_class:

Returns: the GtsGNodeSplitClass.

Definition at line 59 of file pgraph.c.

References gnode_split_class_init(), gnode_split_init(), gts_object_class(), and gts_object_class_new().

Referenced by gnode_split_destroy(), gts_graph_bisection_new(), and pgraph_init().

Here is the call graph for this function:

void gts_gnode_split_collapse ( GtsGNodeSplit ns,
GtsGraph g,
GtsWGEdgeClass klass 
)

gts_gnode_split_collapse: : a GtsGNodeSplit. : a GtsGraph. : a GtsWGEdgeClass.

Collapses the node split . Any new edge created during the process will be of class .

Definition at line 138 of file pgraph.c.

References connect_edge(), FALSE, gts_allow_floating_gnodes, GTS_CONTAINEE, GTS_CONTAINER, gts_container_add(), gts_container_foreach(), gts_container_remove(), gts_container_size(), gts_gedge_weight(), GTS_GNODE_NEIGHBOR, GTS_GNODE_SPLIT_N1, GTS_GNODE_SPLIT_N2, GTS_OBJECT, GTS_SLIST_CONTAINER, gts_wgedge_new(), _GtsGNodeSplit::n, and TRUE.

Referenced by gts_pgraph_new(), and gts_pgraph_remove_node().

Here is the call graph for this function:

void gts_gnode_split_expand ( GtsGNodeSplit ns,
GtsGraph g 
)

gts_gnode_split_expand: : a GtsGNodeSplit. : a GtsGraph.

Expands the node split ns adding the new nodes to .

Definition at line 228 of file pgraph.c.

References FALSE, gts_allow_floating_gnodes, GTS_CONTAINEE, gts_containee_is_contained(), GTS_CONTAINER, gts_container_add(), gts_container_foreach(), gts_container_remove(), gts_container_size(), GTS_GNODE_SPLIT_N1, GTS_GNODE_SPLIT_N2, GTS_SLIST_CONTAINER, _GtsGNodeSplit::n, restore_edge(), and TRUE.

Referenced by gts_pgraph_add_node().

Here is the call graph for this function:

GtsGNodeSplit* gts_gnode_split_new ( GtsGNodeSplitClass klass,
GtsGNode n,
GtsObject n1,
GtsObject n2 
)

gts_gnode_split_new: : a GtsGNodeSplitClass.
: a GtsGNode. : a GtsGNodeSplit or GtsGNode. : a GtsGNodeSplit or GtsGNode.

Creates a new GtsGNodeSplit which would collapse and into
. The collapse itself is not performed.

Returns: the new GtsGNodeSplit.

Definition at line 91 of file pgraph.c.

References GTS_GNODE_SPLIT, GTS_IS_GNODE, GTS_IS_GNODE_SPLIT, GTS_OBJECT_CLASS, gts_object_new(), n, _GtsGNodeSplit::n, _GtsGNodeSplit::n1, and _GtsGNodeSplit::n2.

Referenced by gts_pgraph_new().

Here is the call graph for this function:

gfloat gts_gnode_weight ( GtsGNode n)

gts_gnode_weight:
: a GtsGNode.

Returns: the weight of
as defined by the weight() method of the GtsGNodeClass.

Definition at line 225 of file graph.c.

References GTS_GNODE_CLASS, GTS_OBJECT, and n.

Referenced by gts_graph_bfgg_bisection(), gts_graph_ggg_bisection(), gts_pgraph_new(), weight_max(), wgraph_add(), and wgraph_remove().

gdouble gts_graph_bisection_bkl_refine ( GtsGraphBisection bg,
guint  mmax,
gfloat  imbalance 
)

gts_graph_bisection_bkl_refine: : a GtsGraphBisection. : the maximum number of unsuccessful successive moves. : the maximum relative imbalance allowed between the weights of both halves of the partition.

An implementation of the simplified boundary Kernighan-Lin algorithm for graph bisection refinement as described in Karypis and Kumar (1997).

The algorithm stops if consecutive modes do not lead to a decrease in the number of edges cut. This last moves are undone.

Returns: the decrease in the weight of the edges cut by the bisection.

Definition at line 884 of file partition.c.

References _GtsGraphBisection::bg1, _GtsGraphBisection::bg2, build_bheap(), FALSE, _GtsGraphBisection::g, _GtsGraphBisection::g1, _GtsGraphBisection::g2, GTS_CONTAINEE, gts_containee_is_contained(), GTS_CONTAINER, gts_container_add(), gts_container_foreach(), gts_container_remove(), gts_eheap_destroy(), gts_eheap_freeze(), gts_eheap_new(), gts_eheap_remove_top(), gts_eheap_thaw(), gts_gnode_degree(), gts_graph_weight(), GTS_OBJECT, gts_object_reset_reserved(), n, node_move_cost1(), node_move_cost2(), TRUE, and update_neighbors().

Referenced by gts_graph_bisection_new().

Here is the call graph for this function:

gboolean gts_graph_bisection_check ( GtsGraphBisection bg)

gts_graph_bisection_check: : a GtsGraphBisection.

Checks that the boundary of is correctly defined (used for debugging purposes).

Returns: TRUE if is ok, FALSE otherwise.

Definition at line 458 of file partition.c.

References _GtsGraphBisection::bg1, _GtsGraphBisection::bg2, check_bg(), FALSE, _GtsGraphBisection::g1, _GtsGraphBisection::g2, GTS_CONTAINER, gts_container_foreach(), ok, and TRUE.

Referenced by gts_graph_bisection_new().

Here is the call graph for this function:

void gts_graph_bisection_destroy ( GtsGraphBisection bg,
gboolean  destroy_graphs 
)

gts_graph_bisection_destroy: : a GtsGraphBisection. : controls graph destruction.

Frees all the memory allocated for . If is TRUE the graphs created by are destroyed.

Definition at line 1139 of file partition.c.

References _GtsGraphBisection::bg1, _GtsGraphBisection::bg2, _GtsGraphBisection::g1, _GtsGraphBisection::g2, GTS_OBJECT, and gts_object_destroy().

Referenced by gts_graph_recursive_bisection(), and recursive_bisection().

Here is the call graph for this function:

gdouble gts_graph_bisection_kl_refine ( GtsGraphBisection bg,
guint  mmax 
)

gts_graph_bisection_kl_refine: : a GtsGraphBisection. : the maximum number of unsuccessful successive moves.

An implementation of the simplified Kernighan-Lin algorithm for graph bisection refinement as described in Karypis and Kumar (1997).

The algorithm stops if consecutive modes do not lead to a decrease in the number of edges cut. This last moves are undone.

Returns: the decrease in the weight of the edges cut by the bisection.

Definition at line 720 of file partition.c.

References build_heap(), _GtsGraphBisection::g, _GtsGraphBisection::g1, _GtsGraphBisection::g2, GTS_CONTAINEE, gts_containee_is_contained(), GTS_CONTAINER, gts_container_add(), gts_container_foreach(), gts_container_remove(), gts_eheap_destroy(), gts_eheap_foreach(), gts_eheap_freeze(), gts_eheap_insert(), gts_eheap_new(), gts_eheap_remove(), gts_eheap_remove_top(), gts_eheap_thaw(), GTS_GNODE_NEIGHBOR, gts_graph_weight(), GTS_OBJECT, gts_object_reset_reserved(), GTS_SLIST_CONTAINER, n, node_move_cost1(), and node_move_cost2().

Here is the call graph for this function:

GtsGraphBisection* gts_graph_bisection_new ( GtsWGraph wg,
guint  ntry,
guint  mmax,
guint  nmin,
gfloat  imbalance 
)

gts_graph_bisection_new: : a GtsWGraph. : the number of tries for the graph growing algorithm. : the number of unsucessful moves for the refinement algorithm. : the minimum number of nodes of the coarsest graph. : the maximum relative imbalance allowed between the weights of both halves of the partition.

An implementation of a multilevel bisection algorithm as presented in Karypis and Kumar (1997). A multilevel hierarchy of graphs is created using the GtsPGraph object. The bisection of the coarsest graph is created using the gts_graph_ggg_bisection() function. The graph is then uncoarsened using gts_pgraph_down() and at each level the bisection is refined using gts_graph_bisection_bkl_refine().

Returns: a new GtsGraphBisection of .

Definition at line 1062 of file partition.c.

References bisection_children(), _GtsGraphBisection::g1, GTS_CONTAINER, gts_container_size(), gts_gnode_split_class(), GTS_GRAPH, gts_graph_bisection_bkl_refine(), gts_graph_bisection_check(), gts_graph_edges_cut(), gts_graph_edges_cut_weight(), gts_graph_ggg_bisection(), gts_graph_weight(), GTS_OBJECT, gts_object_destroy(), gts_pgraph_class(), gts_pgraph_down(), gts_pgraph_new(), gts_wgedge_class(), and gts_wgnode_class().

Referenced by gts_graph_recursive_bisection(), and recursive_bisection().

Here is the call graph for this function:

GSList* gts_graph_bubble_partition ( GtsGraph g,
guint  np,
guint  niter,
GtsFunc  step_info,
gpointer  data 
)

gts_graph_bubble_partition: : a GtsGraph. : number of partitions. : the maximum number of iterations. : a GtsFunc or NULL. : user data to pass to .

An implementation of the "bubble partitioning algorithm" of Diekmann, Preis, Schlimbach and Walshaw (2000). The maximum number of iteration on the positions of the graph growing seeds is controlled by .

If not NULL is called after each iteration on the seeds positions passing the partition (a GSList) as argument.

Returns: a list of new GtsGraph representing the partition.

Definition at line 269 of file partition.c.

References FALSE, find_smallest_degree(), graph_new_seed(), GTS_CONTAINEE, GTS_CONTAINER, gts_container_add(), gts_container_foreach(), GTS_GRAPH, gts_graph_farthest(), GTS_OBJECT, gts_object_destroy(), gts_object_new(), gts_object_reset_reserved(), min, partition_update(), and TRUE.

Here is the call graph for this function:

GtsGraphClass* gts_graph_class ( void  )

gts_graph_class:

Returns: the GtsGraphClass.

Definition at line 816 of file graph.c.

References graph_class_init(), graph_init(), gts_hash_container_class(), GTS_OBJECT_CLASS, and gts_object_class_new().

Referenced by graph_init(), gts_graph_read(), and gts_wgraph_class().

Here is the call graph for this function:

guint gts_graph_distance_sum ( GtsGraph g,
GtsGNode center 
)

gts_graph_distance_sum: : a GtsGraph. : a GtsGNode of .

Returns: the sum of the distances between all the other GtsGNode of and .

Definition at line 1074 of file graph.c.

References GTS_BREADTH_FIRST, gts_graph_traverse_destroy(), gts_graph_traverse_new(), gts_graph_traverse_next(), _GtsGNode::level, n, and TRUE.

Referenced by better_seed(), and graph_new_seed().

Here is the call graph for this function:

guint gts_graph_edges_cut ( GtsGraph g)

gts_graph_edges_cut: : a GtsGraph.

Returns: the number of edges of connecting nodes belonging to to nodes not belonging to .

Definition at line 1164 of file graph.c.

References count_edge_cuts(), GTS_CONTAINER, and gts_container_foreach().

Referenced by gts_graph_bisection_new(), gts_graph_partition_edges_cut(), and gts_graph_print_stats().

Here is the call graph for this function:

gfloat gts_graph_edges_cut_weight ( GtsGraph g)

gts_graph_edges_cut_weight: : a GtsGraph.

Returns: the sum of the weights of the edges of connecting nodes belonging to to nodes not belonging to .

Definition at line 1199 of file graph.c.

References GTS_CONTAINER, gts_container_foreach(), and sum_edge_cuts_weight().

Referenced by gts_graph_bfgg_bisection(), gts_graph_bisection_new(), gts_graph_ggg_bisection(), gts_graph_partition_edges_cut_weight(), and gts_graph_print_stats().

Here is the call graph for this function:

GtsGNode* gts_graph_farthest ( GtsGraph g,
GSList *  gnodes 
)

gts_graph_farthest: : a GtsGraph. : a list of GtsGNode belonging to .

Returns: the GtsGNode belonging to and farthest from all the nodes in (hmmm, definition of "farthest"?).

Definition at line 1099 of file graph.c.

References FALSE, GTS_BREADTH_FIRST, gts_graph_traverse_destroy(), gts_graph_traverse_new(), gts_graph_traverse_next(), gts_graph_traverse_what_next(), GTS_OBJECT, _GtsGNode::level, n, and TRUE.

Referenced by gts_graph_bubble_partition().

Here is the call graph for this function:

void gts_graph_foreach_edge ( GtsGraph g,
GtsFunc  func,
gpointer  data 
)

gts_graph_foreach_edge: : a GtsGraph. : a GtsFunc. : user data to be passed to .

Calls for each GtsEdge of .

Definition at line 1035 of file graph.c.

References edge_foreach_node(), GTS_CONTAINER, gts_container_foreach(), and hash().

Referenced by gts_graph_write(), and gts_graph_write_dot().

Here is the call graph for this function:

GtsGraphBisection* gts_graph_ggg_bisection ( GtsGraph g,
guint  ntry 
)
GtsGraph* gts_graph_new ( GtsGraphClass klass,
GtsGNodeClass node_class,
GtsGEdgeClass edge_class 
)

gts_graph_new: : a GtsGraphClass. : a GtsGNodeClass. : a GtsGEdgeClass.

Returns: a new GtsGraph using and as node types.

Definition at line 845 of file graph.c.

References _GtsGraph::edge_class, GTS_GRAPH, GTS_OBJECT_CLASS, gts_object_new(), and _GtsGraph::node_class.

Referenced by gts_graph_bfgg_bisection(), and gts_graph_ggg_bisection().

Here is the call graph for this function:

gfloat gts_graph_partition_balance ( GSList *  partition)

gts_graph_partition_balance: : a list of representing a partition.

Returns: the difference between the maximum and the minimum weight of the graphs in .

Definition at line 106 of file partition.c.

References gts_graph_weight().

Here is the call graph for this function:

GSList* gts_graph_partition_clone ( GSList *  partition)

gts_graph_partition_clone: : a list of representing a partition.

Returns: a new partition clone of (i.e. a list of new graphs clones of the graphs in ).

Definition at line 131 of file partition.c.

References GTS_OBJECT, and gts_object_clone().

Here is the call graph for this function:

void gts_graph_partition_destroy ( GSList *  partition)

gts_graph_partition_destroy: : a list of representing a partition.

Destroys all the graphs in and frees .

Definition at line 150 of file partition.c.

References GTS_OBJECT, and gts_object_destroy().

Here is the call graph for this function:

guint gts_graph_partition_edges_cut ( GSList *  partition)

gts_graph_partition_edges_cut: : a list of representing a partition.

Returns: the number of edges cut by the partition.

Definition at line 34 of file partition.c.

References gts_graph_edges_cut().

Referenced by gts_graph_partition_print_stats().

Here is the call graph for this function:

gfloat gts_graph_partition_edges_cut_weight ( GSList *  partition)

gts_graph_partition_edges_cut_weight: : a list of representing a partition.

Returns: the total weight of the edges cut by the partition.

Definition at line 52 of file partition.c.

References gts_graph_edges_cut_weight().

Referenced by gts_graph_partition_print_stats().

Here is the call graph for this function:

void gts_graph_partition_print_stats ( GSList *  partition,
FILE *  fp 
)

gts_graph_partition_print_stats: : a list of representing a partition. : a file pointer.

Writes to a summary of the properties of .

Definition at line 71 of file partition.c.

References gts_graph_partition_edges_cut(), gts_graph_partition_edges_cut_weight(), gts_graph_weight(), gts_range_add_value(), gts_range_init(), gts_range_print(), and gts_range_update().

Here is the call graph for this function:

void gts_graph_print_stats ( GtsGraph g,
FILE *  fp 
)

gts_graph_print_stats: : a GtsGraph. : a file pointer.

Writes to a summary of the properties of .

Definition at line 877 of file graph.c.

References compute_degree(), GTS_CONTAINER, gts_container_foreach(), gts_container_size(), gts_graph_edges_cut(), gts_graph_edges_cut_weight(), gts_graph_weight(), gts_range_init(), gts_range_print(), and gts_range_update().

Here is the call graph for this function:

guint gts_graph_read_jostle ( GtsGraph g,
GtsFile fp 
)

gts_graph_read_jostle: : a GtsGraph. : a GtsFile.

Adds to the nodes and edges defined in the file pointed to by . This file must use the Jostle "graph" ASCII format. The nodes created are of type GtsNGNode and their identities are the line number at which they appear in .

Returns: 0 if the lecture was successful, the line number at which an error occured otherwise (in which case the field of is set).

Definition at line 1228 of file graph.c.

References _GtsGraph::edge_class, GTS_CONTAINEE, GTS_CONTAINER, gts_container_add(), GTS_ERROR, gts_file_error(), gts_file_first_token_after(), gts_file_next_token(), gts_gedge_new(), GTS_GNODE, GTS_INT, gts_ngnode_class(), gts_ngnode_new(), _GtsFile::line, n, node, _GtsFile::token, and _GtsFile::type.

Here is the call graph for this function:

GSList* gts_graph_recursive_bisection ( GtsWGraph wg,
guint  n,
guint  ntry,
guint  mmax,
guint  nmin,
gfloat  imbalance 
)

gts_graph_recursive_bisection: : a GtsWGraph.
: the number of bisection levels. : the number of tries for the graph growing algorithm. : the number of unsucessful moves for the refinement algorithm. : the minimum number of nodes of the coarsest graph. : the maximum relative imbalance allowed between the weights of both halves of the partition.

Calls gts_graph_bisection_new() recursively in order to obtain a 2^
partition of .

Returns: a list of 2^
new GtsGraph representing the partition.

Definition at line 1195 of file partition.c.

References FALSE, _GtsGraphBisection::g1, _GtsGraphBisection::g2, gts_graph_bisection_destroy(), gts_graph_bisection_new(), GTS_WGRAPH, and recursive_bisection().

Here is the call graph for this function:

void gts_graph_traverse_destroy ( GtsGraphTraverse t)

gts_graph_traverse_destroy: : a GtsGraphTraverse.

Frees all the memory allocated for .

Definition at line 1002 of file graph.c.

References gts_fifo_destroy(), and _GtsGraphTraverse::q.

Referenced by gts_graph_bfgg_bisection(), gts_graph_distance_sum(), gts_graph_farthest(), and partition_update().

Here is the call graph for this function:

GtsGraphTraverse* gts_graph_traverse_new ( GtsGraph g,
GtsGNode n,
GtsTraverseType  type,
gboolean  reinit 
)

gts_graph_traverse_new: : a GtsGraph.
: a GtsGNode belonging to . : the type of traversal. : if TRUE, the traversal is reinitialized.

Returns: a new GtsGraphTraverse initialized for the traversal of of type , starting from
.

Definition at line 921 of file graph.c.

References _GtsGraphTraverse::g, GTS_CONTAINEE, gts_containee_is_contained(), GTS_CONTAINER, gts_container_foreach(), gts_fifo_new(), gts_fifo_push(), _GtsGNode::level, _GtsGraphTraverse::q, and reset_level().

Referenced by gts_graph_bfgg_bisection(), gts_graph_distance_sum(), gts_graph_farthest(), and partition_update().

Here is the call graph for this function:

GtsGNode* gts_graph_traverse_next ( GtsGraphTraverse t)

gts_graph_traverse_next: : a GtsGraphTraverse.

Returns: the next GtsGNode of the traversal defined by or NULL if the traversal is complete.

Definition at line 964 of file graph.c.

References _GtsGraphTraverse::g, gts_fifo_pop(), gts_gnode_foreach_neighbor(), push_neighbor(), _GtsGraphTraverse::q, and u().

Referenced by gts_graph_bfgg_bisection(), gts_graph_distance_sum(), gts_graph_farthest(), and partition_update().

Here is the call graph for this function:

GtsGNode* gts_graph_traverse_what_next ( GtsGraphTraverse t)

gts_graph_traverse_what_next: : a GtsGraphTraverse.

Returns: the next GtsGNode of the traversal defined by or NULL if the traversal is complete but without advancing the traversal.

Definition at line 989 of file graph.c.

References gts_fifo_top(), and _GtsGraphTraverse::q.

Referenced by gts_graph_farthest().

Here is the call graph for this function:

gfloat gts_graph_weight ( GtsGraph g)

gts_graph_weight: : a GtsGraph.

Returns: the weight of graph as defined by the weight() method of GtsGraphClass.

Definition at line 1057 of file graph.c.

References GTS_CONTAINER, gts_container_size(), GTS_GRAPH_CLASS, and GTS_OBJECT.

Referenced by graph_comp_weight(), gts_graph_bfgg_bisection(), gts_graph_bisection_bkl_refine(), gts_graph_bisection_kl_refine(), gts_graph_bisection_new(), gts_graph_ggg_bisection(), gts_graph_partition_balance(), gts_graph_partition_print_stats(), and gts_graph_print_stats().

Here is the call graph for this function:

void gts_graph_write ( GtsGraph g,
FILE *  fp 
)

gts_graph_write: : a GtsGraph. : a file pointer.

Writes in the file an ASCII representation of . The file format is as follows.

All the lines beginning with GTS_COMMENTS are ignored. The first line contains two unsigned integers separated by spaces. The first integer is the number of nodes, nn, the second is the number of edges, ne.

Follows nn lines containing node description. Follows ne lines containing the two indices (starting from one) of the nodes of each edge.

The format described above is the least common denominator to all GTS files. Consistent with an object-oriented approach, the GTS file format is extensible. Each of the lines of the file can be extended with user-specific attributes accessible through the read() and write() virtual methods of each of the objects written (graph, nodes or edges). When read with different object classes, these extra attributes are just ignored.

Definition at line 1344 of file graph.c.

References count_edges(), fp, GTS_CONTAINER, gts_container_foreach(), gts_container_size(), gts_graph_foreach_edge(), GTS_OBJECT, gts_object_reset_reserved(), write_edge(), and write_node().

Here is the call graph for this function:

void gts_graph_write_dot ( GtsGraph g,
FILE *  fp 
)

gts_graph_write_dot: : a GtsGraph. : a file pointer.

Writes in the file an ASCII representation of in the dot format of AT&T Bell Labs.

Definition at line 1535 of file graph.c.

References fp, GTS_CONTAINER, gts_container_foreach(), gts_graph_foreach_edge(), gts_object_reset_reserved(), write_dot_edge(), and write_dot_node().

Here is the call graph for this function:

void gts_grid_plane_destroy ( GtsGridPlane g)

gts_grid_plane_destroy: :

Definition at line 103 of file iso.c.

References free2D(), _GtsGridPlane::nx, and _GtsGridPlane::p.

Here is the call graph for this function:

GtsGridPlane* gts_grid_plane_new ( guint  nx,
guint  ny 
)

gts_grid_plane_new: : :

Returns:

Definition at line 87 of file iso.c.

References malloc2D(), _GtsGridPlane::nx, _GtsGridPlane::ny, and _GtsGridPlane::p.

Here is the call graph for this function:

GtsHashContainerClass* gts_hash_container_class ( void  )
void gts_heap_destroy ( GtsHeap heap)

gts_heap_destroy: : a GtsHeap.

Free all the memory allocated for .

Definition at line 181 of file gts/heap.c.

References _GtsHeap::elts, and TRUE.

Referenced by partition_update().

void gts_heap_foreach ( GtsHeap heap,
GFunc  func,
gpointer  user_data 
)

gts_heap_foreach: : a GtsHeap. : the function to call for each element in the heap. : to pass to .

Definition at line 217 of file gts/heap.c.

References _GtsHeap::elts.

void gts_heap_freeze ( GtsHeap heap)

gts_heap_freeze: : a GtsHeap.

Freezes the heap. Any subsequent operation will not preserve the heap property. Used in conjunction with gts_heap_insert() and gts_heap_thaw() to create a heap in O(n) time.

Definition at line 240 of file gts/heap.c.

References _GtsHeap::frozen, and TRUE.

void gts_heap_insert ( GtsHeap heap,
gpointer  p 
)

gts_heap_insert: : a GtsHeap. : a pointer to add to the heap.

Inserts a new element in the heap.

Definition at line 79 of file gts/heap.c.

References _GtsHeap::elts, _GtsHeap::frozen, and sift_up().

Referenced by partition_update().

Here is the call graph for this function:

GtsHeap* gts_heap_new ( GCompareFunc  compare_func)

gts_heap_new: : a GCompareFunc.

Returns: a new GtsHeap using as a sorting function.

Definition at line 39 of file gts/heap.c.

References _GtsHeap::elts, FALSE, _GtsHeap::frozen, and _GtsHeap::func.

Referenced by partition_update().

gpointer gts_heap_remove_top ( GtsHeap heap)

gts_heap_remove_top: : a GtsHeap.

Removes the element at the top of the heap.

Returns: the element at the top of the heap.

Definition at line 134 of file gts/heap.c.

References _GtsHeap::elts, len, and sift_down().

Referenced by partition_update().

Here is the call graph for this function:

guint gts_heap_size ( GtsHeap heap)

gts_heap_size: : a GtsHeap.

Returns: the number of items in .

Definition at line 253 of file gts/heap.c.

References _GtsHeap::elts.

void gts_heap_thaw ( GtsHeap heap)

gts_heap_thaw: : a GtsHeap.

If has been frozen previously using gts_heap_freeze(), reorder it in O(n) time and unfreeze it.

Definition at line 196 of file gts/heap.c.

References _GtsHeap::elts, FALSE, _GtsHeap::frozen, and sift_down().

Here is the call graph for this function:

gpointer gts_heap_top ( GtsHeap heap)

gts_heap_top: : a GtsHeap.

Returns: the element at the top of the heap.

Definition at line 161 of file gts/heap.c.

References _GtsHeap::elts, and len.

GtsHSplitClass* gts_hsplit_class ( void  )

gts_hsplit_class:

Returns: the GtsHSplitClass.

Definition at line 40 of file hsurface.c.

References GTS_OBJECT_CLASS, gts_object_class_new(), gts_split_class(), and hsplit_init().

Here is the call graph for this function:

void gts_hsplit_collapse ( GtsHSplit hs,
GtsHSurface hsurface 
)

gts_hsplit_collapse: : a GtsHSplit. : a GtsHSurface.

Collapses the GtsSplit defined by , updates the expandable and collapsable priority heaps of .

Definition at line 89 of file hsurface.c.

References _GtsHSurface::collapsable, _GtsSurface::edge_class, _GtsHSurface::expandable, GTS_HSPLIT, GTS_IS_HSPLIT, GTS_SPLIT, gts_split_collapse(), HEAP_INSERT_HSPLIT, HEAP_REMOVE_HSPLIT, _GtsHSplit::nchild, _GtsHSurface::nvertex, _GtsHSplit::parent, _GtsHSurface::s, _GtsSplit::v1, and _GtsSplit::v2.

Referenced by gts_hsurface_foreach().

Here is the call graph for this function:

void gts_hsplit_expand ( GtsHSplit hs,
GtsHSurface hsurface 
)

gts_hsplit_expand: : a GtsHSplit. : a GtsHSurface.

Expands the GtsSplit defined by (which must be expandable) and updates the priority heaps of .

Definition at line 125 of file hsurface.c.

References _GtsHSurface::collapsable, _GtsSurface::edge_class, _GtsHSurface::expandable, GTS_HSPLIT, GTS_IS_HSPLIT, GTS_SPLIT, gts_split_expand(), HEAP_INSERT_HSPLIT, HEAP_REMOVE_HSPLIT, _GtsHSplit::nchild, _GtsHSurface::nvertex, _GtsHSplit::parent, _GtsHSurface::s, _GtsSplit::v1, and _GtsSplit::v2.

Referenced by gts_hsplit_force_expand(), and gts_hsurface_foreach().

Here is the call graph for this function:

void gts_hsplit_force_expand ( GtsHSplit hs,
GtsHSurface hsurface 
)

gts_hsplit_force_expand: : a GtsHSplit. : a GtsHSurface.

Forces the expansion of by first expanding all its dependencies not already expanded.

Definition at line 1184 of file split.c.

References _GtsSplitCFace::a1, _GtsSplitCFace::a2, CFACE, _GtsSplitCFace::f, GTS_HSPLIT, gts_hsplit_expand(), gts_hsplit_force_expand(), GTS_SPLIT, IS_CFACE, _GtsHSplit::nchild, and _GtsHSplit::parent.

Referenced by gts_hsplit_force_expand().

Here is the call graph for this function:

GtsHSplit* gts_hsplit_new ( GtsHSplitClass klass,
GtsSplit vs 
)

gts_hsplit_new: : a GtsHSplitClass. : a GtsSplit.

Returns: a new GtsHSplit, hierarchical extension of .

Definition at line 68 of file hsurface.c.

References GTS_HSPLIT, GTS_OBJECT, GTS_OBJECT_CLASS, and gts_object_new().

Referenced by gts_hsurface_new().

Here is the call graph for this function:

GtsHSurfaceClass* gts_hsurface_class ( void  )

gts_hsurface_class:

Returns: the GtsHSurfaceClass.

Definition at line 188 of file hsurface.c.

References gts_object_class(), gts_object_class_new(), hsurface_class_init(), and hsurface_init().

Referenced by hsurface_destroy().

Here is the call graph for this function:

void gts_hsurface_foreach ( GtsHSurface hsurface,
GTraverseType  order,
GtsFunc  func,
gpointer  data 
)

gts_hsurface_foreach: : a GtsHSurface. : the order in which GtsHSplit are visited - G_PRE_ORDER or G_POST_ORDER. : the function to call for each visited GtsHSplit. : user data to pass to the function.

Starts by expanding all the GtsHSplit of . If is G_PRE_ORDER, calls for each GtsHSplit and collapses it. If order is G_POST_ORDER, collapses each GtsHSplit first and then calls . The traversal can be halted at any point by returning TRUE from func.

Definition at line 343 of file hsurface.c.

References _GtsHSurface::expandable, FALSE, gts_eheap_top(), gts_hsplit_collapse(), gts_hsplit_expand(), len, and _GtsHSurface::split.

Here is the call graph for this function:

guint gts_hsurface_height ( GtsHSurface hsurface)

gts_hsurface_height: : a GtsHSurface.

Returns: the maximum height of the tree described by .

Definition at line 389 of file hsurface.c.

References gts_split_height(), and _GtsHSurface::roots.

Here is the call graph for this function:

GtsHSurface* gts_hsurface_new ( GtsHSurfaceClass klass,
GtsHSplitClass hsplit_class,
GtsPSurface psurface,
GtsKeyFunc  expand_key,
gpointer  expand_data,
GtsKeyFunc  collapse_key,
gpointer  collapse_data 
)

gts_hsurface_new: : a GtsHSurfaceClass. : a GtsHSplitClass. : a GtsPSurface. : a GtsKeyFunc used to order the priority heap of expandable GtsHSplit. : data to be passed to . : a GtsKeyFunc used to order the priority heap of collapsable GtsHSplit. : data to be passed to .

Returns: a new GtsHSurface, hierarchical extension of and using GtsHSplit of class . Note that is destroyed in the process.

Definition at line 225 of file hsurface.c.

References _GtsHSurface::collapsable, _GtsSurface::edge_class, _GtsHSurface::expandable, gts_eheap_new(), gts_hsplit_new(), GTS_HSURFACE, GTS_IS_SPLIT, GTS_OBJECT, GTS_OBJECT_CLASS, gts_object_destroy(), gts_object_new(), gts_psurface_remove_vertex(), GTS_SPLIT, gts_split_expand(), gts_surface_vertex_number(), HEAP_INSERT_HSPLIT, _GtsHSplit::nchild, _GtsHSurface::nvertex, _GtsHSplit::parent, _GtsPSurface::pos, _GtsHSurface::roots, _GtsPSurface::s, _GtsHSurface::s, _GtsPSurface::split, _GtsHSurface::split, _GtsSplit::v1, and _GtsSplit::v2.

Here is the call graph for this function:

void gts_hsurface_traverse ( GtsHSurface hsurface,
GTraverseType  order,
gint  depth,
GtsSplitTraverseFunc  func,
gpointer  data 
)

gts_hsurface_traverse: : a GtsHSurface. : the order in which nodes are visited - G_PRE_ORDER or G_POST_ORDER. : the maximum depth of the traversal. Nodes below this depth will not be visited. If max_depth is -1 all nodes in the tree are visited. If depth is 1, only the root is visited. If depth is 2, the root and its children are visited. And so on. : the function to call for each visited GtsHSplit. : user data to pass to the function.

Traverses a hierarchical surface starting from its roots. It calls the given function for each GtsHSplit visited. See also gts_split_traverse().

Definition at line 309 of file hsurface.c.

References gts_split_traverse(), and _GtsHSurface::roots.

Referenced by hsurface_destroy().

Here is the call graph for this function:

void gts_iso_slice_destroy ( GtsIsoSlice slice)

gts_iso_slice_destroy: : a GtsIsoSlice.

Free all memory allocated for .

Definition at line 303 of file iso.c.

References free2D(), _GtsIsoSlice::nx, and _GtsIsoSlice::vertices.

Referenced by gts_isosurface_cartesian().

Here is the call graph for this function:

void gts_iso_slice_fill ( GtsIsoSlice slice,
GtsGridPlane plane1,
GtsGridPlane plane2,
gdouble **  f1,
gdouble **  f2,
gdouble  iso,
GtsVertexClass klass 
)

gts_iso_slice_fill: : a GtsIsoSlice. : a GtsGridPlane. : another GtsGridPlane. : values of the function corresponding to . : values of the function corresponding to . : isosurface value. : a GtsVertexClass or one of its descendant to be used for the new vertices.

Fill with the coordinates of the vertices defined by f1 (x,y,z) = and f2 (x, y, z) = .

Definition at line 154 of file iso.c.

References gts_vertex_new(), LEFT, _GtsIsoSlice::nx, _GtsIsoSlice::ny, OrientedVertex::orientation, _GtsGridPlane::p, RIGHT, OrientedVertex::v, _GtsIsoSlice::vertices, x, and y.

Here is the call graph for this function:

void gts_iso_slice_fill_cartesian ( GtsIsoSlice slice,
GtsCartesianGrid  g,
gdouble **  f1,
gdouble **  f2,
gdouble  iso,
GtsVertexClass klass 
)

gts_iso_slice_fill_cartesian: : a GtsIsoSlice. : a GtsCartesianGrid. : values of the function for plane z = .z. : values of the function for plane z = .z + .dz. : isosurface value. : a GtsVertexClass.

Fill with the coordinates of the vertices defined by f1 (x,y,z) = and f2 (x, y, z) = .

Definition at line 241 of file iso.c.

References _GtsCartesianGrid::dx, _GtsCartesianGrid::dy, _GtsCartesianGrid::dz, gts_vertex_new(), LEFT, _GtsCartesianGrid::nx, _GtsCartesianGrid::ny, OrientedVertex::orientation, RIGHT, OrientedVertex::v, _GtsIsoSlice::vertices, _GtsCartesianGrid::x, x, _GtsCartesianGrid::y, y, and _GtsCartesianGrid::z.

Referenced by gts_isosurface_cartesian().

Here is the call graph for this function:

GtsIsoSlice* gts_iso_slice_new ( guint  nx,
guint  ny 
)

gts_iso_slice_new: : number of vertices in the x direction. : number of vertices in the y direction.

Returns: a new GtsIsoSlice.

Definition at line 118 of file iso.c.

References malloc2D(), _GtsIsoSlice::nx, _GtsIsoSlice::ny, and _GtsIsoSlice::vertices.

Referenced by gts_isosurface_cartesian().

Here is the call graph for this function:

void gts_isosurface_cartesian ( GtsSurface surface,
GtsCartesianGrid  g,
GtsIsoCartesianFunc  f,
gpointer  data,
gdouble  iso 
)

gts_isosurface_cartesian: : a GtsSurface. : a GtsCartesianGrid. : a GtsIsoCartesianFunc. : user data to be passed to . : isosurface value.

Adds to new faces defining the isosurface f(x,y,z) = . By convention, the normals to the surface are pointing toward the positive values of f(x,y,z) - .

The user function is called successively for each value of the z coordinate defined by . It must fill the corresponding (x,y) plane with the values of the function for which the isosurface is to be computed.

Definition at line 407 of file iso.c.

References free2D(), gts_iso_slice_destroy(), gts_iso_slice_fill_cartesian(), gts_iso_slice_new(), gts_isosurface_slice(), malloc2D(), _GtsCartesianGrid::nx, _GtsCartesianGrid::ny, _GtsCartesianGrid::nz, SWAP, and _GtsSurface::vertex_class.

Here is the call graph for this function:

void gts_isosurface_slice ( GtsIsoSlice slice1,
GtsIsoSlice slice2,
GtsSurface surface 
)

gts_isosurface_slice: : a GtsIsoSlice. : another GtsIsoSlice. : a GtsSurface.

Given two successive slices and link their vertices with segments and triangles which are added to .

Definition at line 323 of file iso.c.

References c, edge, _GtsSurface::edge_class, _GtsSurface::face_class, FALSE, GTS_EDGE, gts_edge_new(), gts_face_new(), GTS_OBJECT, gts_surface_add_face(), gts_vertices_are_connected(), m, _GtsIsoSlice::nx, _GtsIsoSlice::ny, OrientedVertex::orientation, TRUE, OrientedVertex::v, and _GtsIsoSlice::vertices.

Referenced by gts_isosurface_cartesian().

Here is the call graph for this function:

void gts_isosurface_tetra ( GtsSurface surface,
GtsCartesianGrid  g,
GtsIsoCartesianFunc  f,
gpointer  data,
gdouble  iso 
)

gts_isosurface_tetra: : a GtsSurface. : a GtsCartesianGrid. : a GtsIsoCartesianFunc. : user data to be passed to . : isosurface value.

Adds to new faces defining the isosurface f(x,y,z) = . By convention, the normals to the surface are pointing toward the positive values of f(x,y,z) - .

The user function is called successively for each value of the z coordinate defined by . It must fill the corresponding (x,y) plane with the values of the function for which the isosurface is to be computed.

Definition at line 693 of file isotetra.c.

References slice_t::data, _GtsCartesianGrid::dz, f, free_helper(), free_slice(), helper_advance(), init_helper(), iso_slice_evaluate(), iso_sub(), new_slice(), _GtsCartesianGrid::nx, _GtsCartesianGrid::ny, _GtsCartesianGrid::nz, and _GtsCartesianGrid::z.

Here is the call graph for this function:

void gts_isosurface_tetra_bcl ( GtsSurface surface,
GtsCartesianGrid  g,
GtsIsoCartesianFunc  f,
gpointer  data,
gdouble  iso 
)

gts_isosurface_tetra_bcl: : a GtsSurface. : a GtsCartesianGrid. : a GtsIsoCartesianFunc. : user data to be passed to . : isosurface value.

Adds to new faces defining the isosurface f(x,y,z) = . By convention, the normals to the surface are pointing toward the positive values of f(x,y,z) - .

The user function is called successively for each value of the z coordinate defined by . It must fill the corresponding (x,y) plane with the values of the function for which the isosurface is to be computed.

This version produces the dual "body-centered" faces relative to the faces produced by gts_isosurface_tetra().

Definition at line 773 of file isotetra.c.

References slice_t::data, _GtsCartesianGrid::dz, f, free_helper_bcl(), free_slice(), helper_advance_bcl(), init_helper_bcl(), iso_slice_evaluate_bcl(), iso_sub(), new_slice(), _GtsCartesianGrid::nx, _GtsCartesianGrid::ny, _GtsCartesianGrid::nz, and _GtsCartesianGrid::z.

Here is the call graph for this function:

void gts_isosurface_tetra_bounded ( GtsSurface surface,
GtsCartesianGrid  g,
GtsIsoCartesianFunc  f,
gpointer  data,
gdouble  iso 
)

gts_isosurface_tetra_bounded: : a GtsSurface. : a GtsCartesianGrid. : a GtsIsoCartesianFunc. : user data to be passed to . : isosurface value.

Adds to new faces defining the isosurface f(x,y,z) = . By convention, the normals to the surface are pointing toward the positive values of f(x,y,z) - . To ensure a closed object, a boundary of G_MINDOUBLE is added around the domain

The user function is called successively for each value of the z coordinate defined by . It must fill the corresponding (x,y) plane with the values of the function for which the isosurface is to be computed.

Definition at line 603 of file isotetra.c.

References copy_to_bounded(), slice_t::data, _GtsCartesianGrid::dx, _GtsCartesianGrid::dy, _GtsCartesianGrid::dz, f, free_helper(), free_slice(), helper_advance(), init_helper(), iso_slice_evaluate(), new_slice(), _GtsCartesianGrid::nx, _GtsCartesianGrid::ny, _GtsCartesianGrid::nz, slice_init(), _GtsCartesianGrid::x, _GtsCartesianGrid::y, and _GtsCartesianGrid::z.

Here is the call graph for this function:

GNode* gts_kdtree_new ( GPtrArray *  points,
int(*)(const void *, const void *)  compare 
)

gts_kdtree_new: : an array of GtsPoint. : always NULL.

Note that the order of the points in array is modified by this function.

Returns: a new 3D tree for .

Definition at line 61 of file kdtree.c.

References compare_x(), compare_y(), compare_z(), gts_kdtree_new(), and node.

Referenced by gts_kdtree_new(), and gts_vertices_merge().

Here is the call graph for this function:

GSList* gts_kdtree_range ( GNode *  tree_3d,
GtsBBox bbox,
int(*)(const void *, const void *)  compare 
)

gts_kdtree_range: : a 3D tree. : a GtsBBox. : always NULL.

Returns: a list of GtsPoint belonging to which are inside .

Definition at line 111 of file kdtree.c.

References compare_x(), compare_y(), compare_z(), gts_bbox_point_is_inside, gts_kdtree_range(), node, _GtsPoint::x, _GtsBBox::x1, _GtsBBox::x2, _GtsPoint::y, _GtsBBox::y1, _GtsBBox::y2, _GtsPoint::z, _GtsBBox::z1, and _GtsBBox::z2.

Referenced by gts_kdtree_range(), and gts_vertices_merge().

Here is the call graph for this function:

GtsFaceClass* gts_list_face_class ( void  )

Definition at line 1156 of file cdt.c.

References gts_face_class(), gts_list_face_class_init(), GTS_OBJECT_CLASS, and gts_object_class_new().

Referenced by gts_list_face_destroy().

Here is the call graph for this function:

GtsMatrix* gts_matrix3_inverse ( GtsMatrix m)

gts_matrix3_inverse: : a 3x3 GtsMatrix.

Returns: a pointer to a newly created 3x3 GtsMatrix inverse of or NULL if is not invertible.

Definition at line 340 of file matrix.c.

References det().

Referenced by gts_volume_optimized_vertex().

Here is the call graph for this function:

void gts_matrix_assign ( GtsMatrix m,
gdouble  a00,
gdouble  a01,
gdouble  a02,
gdouble  a03,
gdouble  a10,
gdouble  a11,
gdouble  a12,
gdouble  a13,
gdouble  a20,
gdouble  a21,
gdouble  a22,
gdouble  a23,
gdouble  a30,
gdouble  a31,
gdouble  a32,
gdouble  a33 
)

gts_matrix_assign: : a GtsMatrix. : element [0][0]. : element [0][1]. : element [0][2]. : element [0][3]. : element [1][0]. : element [1][1]. : element [1][2]. : element [1][3]. : element [2][0]. : element [2][1]. : element [2][2]. : element [2][3]. : element [3][0]. : element [3][1]. : element [3][2]. : element [3][3].

Set values of matrix elements.

Definition at line 85 of file matrix.c.

guint gts_matrix_compatible_row ( GtsMatrix A,
GtsVector  b,
guint  n,
GtsVector  A1,
gdouble  b1 
)

gts_matrix_compatible_row: : a GtsMatrix. : a GtsVector.
: the number of previous constraints of .x=. : a GtsMatrix. : a GtsVector.

Given a system of
constraints .x=adds to it the compatible constraints defined by .x=. The compatibility is determined by insuring that the resulting system is well-conditioned (see Lindstrom and Turk (1998, 1999)).

Returns: the number of constraints of the resulting system.

Definition at line 443 of file matrix.c.

References COSALPHA2, gts_vector_cross, gts_vector_scalar, n, s, and SINALPHA2.

Referenced by gts_matrix_quadratic_optimization(), and gts_volume_optimized_vertex().

void gts_matrix_destroy ( GtsMatrix m)

gts_matrix_destroy: : a GtsMatrix.

Free all the memory allocated for .

Definition at line 574 of file matrix.c.

Referenced by gts_volume_optimized_vertex().

gdouble gts_matrix_determinant ( GtsMatrix m)

gts_matrix_determinant: : a GtsMatrix.

Returns: the value of det().

Definition at line 216 of file matrix.c.

References det3x3().

Referenced by gts_matrix_inverse().

Here is the call graph for this function:

GtsMatrix* gts_matrix_identity ( GtsMatrix m)

gts_matrix_identity: : a GtsMatrix or NULL.

Initializes to an identity matrix. Allocates a matrix if is NULL.

Returns: the identity matrix.

Definition at line 633 of file matrix.c.

References gts_matrix_zero(), and m.

Here is the call graph for this function:

GtsMatrix* gts_matrix_inverse ( GtsMatrix m)

gts_matrix_inverse: : a GtsMatrix.

Returns: a pointer to a newly created GtsMatrix inverse of or NULL if is not invertible.

Definition at line 313 of file matrix.c.

References adjoint(), det(), and gts_matrix_determinant().

Here is the call graph for this function:

GtsMatrix* gts_matrix_new ( gdouble  a00,
gdouble  a01,
gdouble  a02,
gdouble  a03,
gdouble  a10,
gdouble  a11,
gdouble  a12,
gdouble  a13,
gdouble  a20,
gdouble  a21,
gdouble  a22,
gdouble  a23,
gdouble  a30,
gdouble  a31,
gdouble  a32,
gdouble  a33 
)

gts_matrix_new: : element [0][0]. : element [0][1]. : element [0][2]. : element [0][3]. : element [1][0]. : element [1][1]. : element [1][2]. : element [1][3]. : element [2][0]. : element [2][1]. : element [2][2]. : element [2][3]. : element [3][0]. : element [3][1]. : element [3][2]. : element [3][3].

Allocates memory and initializes a new GtsMatrix.

Returns: a pointer to the newly created GtsMatrix.

Definition at line 46 of file matrix.c.

References m.

Referenced by gts_volume_optimized_vertex().

void gts_matrix_print ( GtsMatrix m,
FILE *  fptr 
)

gts_matrix_print: : a GtsMatrix. : a file descriptor.

Print to file .

Definition at line 375 of file matrix.c.

Referenced by gts_volume_optimized_vertex().

GtsMatrix* gts_matrix_product ( GtsMatrix m1,
GtsMatrix m2 
)

gts_matrix_product: : a GtsMatrix. : another GtsMatrix.

Returns: a new GtsMatrix, product of and .

Definition at line 586 of file matrix.c.

References m.

GtsMatrix* gts_matrix_projection ( GtsTriangle t)

gts_matrix_projection: : a GtsTriangle.

Creates a new GtsMatrix representing the projection onto a plane of normal given by .

Returns: a pointer to the newly created GtsMatrix.

Definition at line 108 of file matrix.c.

References GTS_POINT, gts_triangle_vertices_edges(), and m.

Here is the call graph for this function:

guint gts_matrix_quadratic_optimization ( GtsMatrix A,
GtsVector  b,
guint  n,
GtsMatrix H,
GtsVector  c 
)

gts_matrix_quadratic_optimization: : a GtsMatrix. : a GtsVector.
: the number of constraints (must be smaller than 3). : a symmetric positive definite Hessian. : a GtsVector.

Solve a quadratic optimization problem: Given a quadratic objective function f which can be written as: f(x) = x^t..x + ^t.x + k, where is the symmetric positive definite Hessian of f and k is a constant, find the minimum of f subject to the set of
prior linear constraints, defined by the first
rows of and (.x = ). The new constraints given by the minimization are added to and only if they are linearly independent as determined by gts_matrix_compatible_row().

Returns: the new number of constraints defined by and .

Definition at line 498 of file matrix.c.

References gts_matrix_compatible_row(), gts_vector_cross, gts_vector_scalar, max, and n.

Referenced by gts_volume_optimized_vertex().

Here is the call graph for this function:

GtsMatrix* gts_matrix_rotate ( GtsMatrix m,
GtsVector  r,
gdouble  angle 
)

gts_matrix_rotate: : a GtsMatrix or NULL. : the rotation axis. : the angle (in radians) to rotate by.

Initializes to a rotation matrix around by . Allocates a new matrix if is NULL.

Returns: the rotation matrix.

Definition at line 692 of file matrix.c.

References c, gts_vector_normalize, m, and s.

GtsMatrix* gts_matrix_scale ( GtsMatrix m,
GtsVector  s 
)

gts_matrix_scale: : a GtsMatrix or NULL. : the scaling vector.

Initializes to a scaling matrix for . Allocates a matrix if is NULL.

Returns: the scaling matrix.

Definition at line 650 of file matrix.c.

References gts_matrix_zero(), and m.

Here is the call graph for this function:

GtsMatrix* gts_matrix_translate ( GtsMatrix m,
GtsVector  t 
)

gts_matrix_translate: : a GtsMatrix or NULL. : the translation vector.

Initializes to a translation matrix for . Allocates a new matrix if is NULL.

Returns: the translation matix.

Definition at line 670 of file matrix.c.

References gts_matrix_zero(), and m.

Here is the call graph for this function:

GtsMatrix* gts_matrix_transpose ( GtsMatrix m)

gts_matrix_transpose: : a GtsMatrix.

Returns: a pointer to a newly created GtsMatrix transposed of .

Definition at line 149 of file matrix.c.

GtsMatrix* gts_matrix_zero ( GtsMatrix m)

gts_matrix_zero: : a GtsMatrix or $NULL.

Initializes to zeros. Allocates a matrix if is NULL.

Returns: the zero'ed matrix.

Definition at line 612 of file matrix.c.

References m.

Referenced by gts_matrix_identity(), gts_matrix_scale(), gts_matrix_translate(), and gts_volume_optimized_vertex().

GtsNEdgeClass* gts_nedge_class ( void  )

gts_nedge_class:

Returns: the GtsNEdgeClass.

Definition at line 114 of file named.c.

References gts_edge_class(), GTS_OBJECT_CLASS, gts_object_class_new(), nedge_class_init(), and nedge_init().

Here is the call graph for this function:

GtsNFaceClass* gts_nface_class ( void  )

gts_nface_class:

Returns: the GtsNFaceClass.

Definition at line 169 of file named.c.

References gts_face_class(), GTS_OBJECT_CLASS, gts_object_class_new(), nface_class_init(), and nface_init().

Here is the call graph for this function:

GtsNGNodeClass* gts_ngnode_class ( void  )

gts_ngnode_class:

Returns: the GtsNGNodeClass.

Definition at line 246 of file graph.c.

References gts_gnode_class(), GTS_OBJECT_CLASS, gts_object_class_new(), and ngnode_init().

Referenced by gts_graph_read_jostle().

Here is the call graph for this function:

GtsNGNode* gts_ngnode_new ( GtsNGNodeClass klass,
guint  id 
)

gts_ngnode_new: : a GtsNGNodeClass.

Returns: a new GtsNGNode with identity .

Definition at line 273 of file graph.c.

References GTS_GNODE_CLASS, gts_gnode_new(), GTS_NGNODE, _GtsNGNode::id, and n.

Referenced by gts_graph_read_jostle().

Here is the call graph for this function:

GtsNVertexClass* gts_nvertex_class ( void  )

gts_nvertex_class:

Returns: the GtsNVertexClass.

Definition at line 59 of file named.c.

References GTS_OBJECT_CLASS, gts_object_class_new(), gts_vertex_class(), nvertex_class_init(), and nvertex_init().

Here is the call graph for this function:

void gts_object_attributes ( GtsObject object,
GtsObject from 
)

gts_object_attributes: : a GtsObject. : a GtsObject.

Calls the attributes() method of using as source.

Definition at line 319 of file object.c.

References _GtsObjectClass::attributes, and _GtsObject::klass.

Referenced by gts_delaunay_add_vertex_to_face(), swap_if_in_circle(), triangulate_face(), and triangulate_polygon().

gpointer gts_object_check_cast ( gpointer  object,
gpointer  klass 
)

gts_object_check_cast: : a GtsObject. : a GtsObjectClass.

Returns: while emitting warnings if is not of class .

Definition at line 154 of file object.c.

References GTS_OBJECT_CLASS, and gts_object_is_from_class().

Here is the call graph for this function:

gpointer gts_object_class_check_cast ( gpointer  klass,
gpointer  from 
)

gts_object_class_check_cast: : a GtsObjectClass. : a GtsObjectClass.

Returns: while emitting warnings if is not derived from .

Definition at line 184 of file object.c.

References GTS_OBJECT_CLASS, and gts_object_class_is_from_class().

Here is the call graph for this function:

GtsObjectClass* gts_object_class_from_name ( const gchar *  name)

Definition at line 76 of file object.c.

References class_table.

Referenced by graph_read(), and gts_graph_read().

static gpointer gts_object_class_is_from_class ( gpointer  klass,
gpointer  from 
) [inline, static]

Definition at line 291 of file gts.h.

References c, and _GtsObjectClass::parent_class.

Referenced by graph_read(), gts_graph_read(), and gts_object_class_check_cast().

gpointer gts_object_class_new ( GtsObjectClass parent_class,
GtsObjectClassInfo info 
)

gts_object_class_new: : a GtsObjectClass. : a GtsObjectClassInfo, description of the new class to create.

Returns: a new GtsObjectClass derived from and described by .

Definition at line 44 of file object.c.

References _GtsObjectClassInfo::class_size, class_table, gts_object_class_init(), _GtsObjectClass::info, _GtsObjectClassInfo::name, _GtsObjectClassInfo::object_size, and _GtsObjectClass::parent_class.

Referenced by cface_class(), edge_inter_class(), gts_bbox_class(), gts_cluster_class(), gts_cluster_grid_class(), gts_color_vertex_class(), gts_constraint_class(), gts_containee_class(), gts_container_class(), gts_edge_class(), gts_face_class(), gts_fnode_class(), gts_gedge_class(), gts_gnode_class(), gts_gnode_split_class(), gts_graph_class(), gts_hash_container_class(), gts_hsplit_class(), gts_hsurface_class(), gts_list_face_class(), gts_nedge_class(), gts_nface_class(), gts_ngnode_class(), gts_nvertex_class(), gts_object_class(), gts_pgedge_class(), gts_pgraph_class(), gts_pnode_class(), gts_point_class(), gts_psurface_class(), gts_segment_class(), gts_slist_containee_class(), gts_slist_container_class(), gts_split_class(), gts_surface_class(), gts_surface_inter_class(), gts_triangle_class(), gts_vertex_class(), gts_vertex_normal_class(), gts_wgedge_class(), gts_wgnode_class(), gts_wgraph_class(), heap_surface_class_new(), toporouter_arc_class(), toporouter_bbox_class(), toporouter_constraint_class(), toporouter_edge_class(), and toporouter_vertex_class().

Here is the call graph for this function:

GtsObject* gts_object_clone ( GtsObject object)

gts_object_clone: : a GtsObject.

Calls the clone method of . The call to this function will fail if no clone method exists for the given object.

Returns: a new object clone of .

Definition at line 262 of file object.c.

References _GtsObjectClass::clone, _GtsObjectClass::info, _GtsObject::klass, _GtsObjectClassInfo::name, object_init(), and _GtsObjectClassInfo::object_size.

Referenced by gts_graph_partition_clone(), gts_vertex_is_contact(), and split_encroached().

Here is the call graph for this function:

void gts_object_destroy ( GtsObject object)

gts_object_destroy: : a GtsObject.

Calls the destroy method of , freeing all memory allocated for it.

Definition at line 292 of file object.c.

References _GtsObjectClass::destroy, GTS_DESTROYED, GTS_OBJECT_SET_FLAGS, and _GtsObject::klass.

Referenced by bb_tree_free(), build_cdt(), cface_expand(), cluster_destroy(), cluster_find(), delaunay_create_from_vertices(), delete_route(), delete_vertex(), destroy_cluster(), destroy_foreach_face(), edge_collapse(), edge_destroy(), foreach_face_remove(), gnode_remove_container(), gnode_split_destroy(), gts_bb_tree_point_closest(), gts_bb_tree_segment_distance(), gts_bb_tree_triangle_distance(), gts_delaunay_add_constraint(), gts_delaunay_remove_hull(), gts_edge_swap(), gts_edges_merge(), gts_graph_bfgg_bisection(), gts_graph_bisection_destroy(), gts_graph_bisection_new(), gts_graph_bubble_partition(), gts_graph_ggg_bisection(), gts_graph_partition_destroy(), gts_graph_read(), gts_hsurface_new(), gts_point_is_inside_surface(), gts_point_locate(), gts_point_triangle_closest(), gts_psurface_open(), gts_psurface_read_vertex(), gts_split_collapse(), gts_surface_inter_new(), gts_surface_intersection(), gts_surface_is_self_intersecting(), gts_surface_read(), gts_surface_remove_face(), gts_vertices_merge(), gts_volume_optimized_cost(), hsurface_destroy(), merge_duplicate(), midvertex_insertion(), oproute_free(), pgraph_destroy(), psurface_destroy(), recursive_bisection(), remove_intersected_edge(), replace_edge_collapse(), segment_destroy(), self_intersecting(), split_destroy(), split_encroached(), surface_inter_destroy(), surface_read(), temp_point_clean(), tessellate_face(), toporouter_bbox_locate(), triangle_destroy(), triangulate_face(), unconstrain(), and vertex_destroy().

void gts_object_init ( GtsObject object,
GtsObjectClass klass 
)

gts_object_init: : a GtsObject. : a GtsObjectClass.

Calls the init method of with as argument. This is done recursively in the correct order (from the base class to the top). You should rarely need this function as it is called automatically by the constructor for each class.

Definition at line 211 of file object.c.

References gts_object_init(), _GtsObjectClass::info, _GtsObjectClassInfo::object_init_func, and _GtsObjectClass::parent_class.

Referenced by cface_expand(), cface_new(), container_clone(), gts_object_init(), and gts_object_new().

Here is the call graph for this function:

static gpointer gts_object_is_from_class ( gpointer  object,
gpointer  klass 
) [inline, static]

Definition at line 267 of file gts.h.

References c, and _GtsObjectClass::parent_class.

Referenced by gts_object_check_cast().

GtsPGEdgeClass* gts_pgedge_class ( void  )

gts_pgedge_class:

Returns: the GtsPGEdgeClass.

Definition at line 639 of file graph.c.

References gts_gedge_class(), GTS_OBJECT_CLASS, gts_object_class_new(), pgedge_class_init(), and pgedge_init().

Referenced by create_edge(), and create_segment_edge().

Here is the call graph for this function:

GtsPGEdge* gts_pgedge_new ( GtsPGEdgeClass klass,
GtsGNode g1,
GtsGNode g2,
gpointer  data 
)

gts_pgedge_new: : a GtsPGEdgeClass. : a GtsGNode. : another GtsGNode. : user data.

Returns: a new GtsPGEdge associated with linking and .

Definition at line 669 of file graph.c.

References _GtsPGEdge::data, GTS_GEDGE_CLASS, gts_gedge_new(), and GTS_PGEDGE.

Referenced by create_edge(), and create_segment_edge().

Here is the call graph for this function:

GtsGNodeSplit* gts_pgraph_add_node ( GtsPGraph pg)

gts_pgraph_add_node: : a GtsPGraph.

Adds one node to the multilevel graph by expanding the next available GtsGNodeSplit.

Returns: the expanded GtsGNodeSplit or #NULL if all the GtsGNodeSplit have already been expanded.

Definition at line 448 of file pgraph.c.

References _GtsPGraph::g, gts_gnode_split_expand(), _GtsPGraph::pos, and _GtsPGraph::split.

Referenced by gts_pgraph_down(), and gts_pgraph_set_node_number().

Here is the call graph for this function:

GtsPGraphClass* gts_pgraph_class ( void  )

gts_pgraph_class:

Returns: the GtsPGraphClass.

Definition at line 303 of file pgraph.c.

References gts_object_class(), gts_object_class_new(), pgraph_class_init(), and pgraph_init().

Referenced by gts_graph_bisection_new(), and pgraph_destroy().

Here is the call graph for this function:

gboolean gts_pgraph_down ( GtsPGraph pg,
GtsFunc  func,
gpointer  data 
)

gts_pgraph_down: : a GtsPGraph. : a GtsFunc or NULL. : user data to pass to .

Performs the required number of expansions to go from the current level to the level immediately below.

If is not NULL, it is called after each GtsGNodeSplit has been expanded.

Returns: FALSE if it is not possible to go down one level, TRUE otherwise.

Definition at line 563 of file pgraph.c.

References FALSE, _GtsPGraph::g, GTS_CONTAINER, gts_container_size(), gts_pgraph_add_node(), _GtsPGraph::level, _GtsPGraph::levels, and TRUE.

Referenced by gts_graph_bisection_new().

Here is the call graph for this function:

void gts_pgraph_foreach_node ( GtsPGraph pg,
GtsFunc  func,
gpointer  data 
)
guint gts_pgraph_get_node_number ( GtsPGraph pg)

gts_pgraph_get_node_number: : a GtsPGraph.

Returns: the current number of nodes of .

Definition at line 541 of file pgraph.c.

References _GtsPGraph::min, _GtsPGraph::pos, and _GtsPGraph::split.

guint gts_pgraph_max_node_number ( GtsPGraph pg)

gts_pgraph_max_node_number: : a GtsPGraph.

Returns: the maximum number of nodes of i.e. the number of nodes if all the GtsGNodeSplit were expanded.

Definition at line 495 of file pgraph.c.

References _GtsPGraph::min, and _GtsPGraph::split.

guint gts_pgraph_min_node_number ( GtsPGraph pg)

gts_pgraph_min_node_number: : a GtsPGraph.

Returns: the minimum number of nodes of i.e. the number of nodes if all the GtsGNodeSplit were collapsed.

Definition at line 509 of file pgraph.c.

References _GtsPGraph::min.

GtsPGraph* gts_pgraph_new ( GtsPGraphClass klass,
GtsGraph g,
GtsGNodeSplitClass split_class,
GtsWGNodeClass node_class,
GtsWGEdgeClass edge_class,
guint  min 
)

gts_pgraph_new: : a GtsPGraphClass. : a GtsGraph. : a GtsGNodeSplitClass. : a GtsWGNodeClass. : a GtsWGEdgeClass. : the minimum number of nodes.

Creates a new multilevel approximation of graph . At each level a maximal matching is created using the Heavy Edge Matching (HEM) technique of Karypis and Kumar (1997). The newly created nodes are of type and their weight is set to the sum of the weights of their children. The newly created edges are of type and their weight is set to the sum of the weight of the collapsed edges. The last level is reached when the maximal matching obtained would lead to a graph with less than nodes.

Returns: the new GtsPGraph containing the multilevel representation of .

Definition at line 388 of file pgraph.c.

References _GtsPGraph::edge_class, _GtsPGraph::g, GTS_CONTAINER, gts_container_size(), GTS_GNODE, gts_gnode_split_collapse(), gts_gnode_split_new(), gts_gnode_weight(), GTS_OBJECT, GTS_OBJECT_CLASS, gts_object_new(), GTS_PGRAPH, gts_wgnode_new(), _GtsPGraph::level, _GtsPGraph::levels, maximal_matching(), _GtsPGraph::min, n, _GtsGEdge::n1, _GtsGEdge::n2, _GtsPGraph::pos, _GtsPGraph::split, and _GtsPGraph::split_class.

Referenced by gts_graph_bisection_new().

Here is the call graph for this function:

GtsGNodeSplit* gts_pgraph_remove_node ( GtsPGraph pg)

gts_pgraph_remove_node: : a GtsPGraph.

Removes one node from the multilevel graph by collapsing the first available GtsGNodeSplit.

Returns: the collapsed GtsGNodeSplit or NULL if all the GtsGNodeSplit have already been collapsed.

Definition at line 473 of file pgraph.c.

References _GtsPGraph::edge_class, _GtsPGraph::g, gts_gnode_split_collapse(), _GtsPGraph::pos, and _GtsPGraph::split.

Referenced by gts_pgraph_set_node_number().

Here is the call graph for this function:

void gts_pgraph_set_node_number ( GtsPGraph pg,
guint  n 
)

gts_pgraph_set_node_number: : a GtsPGraph.
: a number of nodes.

Performs the required number of collapses or expansions to set the number of nodes of to
.

Definition at line 524 of file pgraph.c.

References gts_pgraph_add_node(), gts_pgraph_remove_node(), _GtsPGraph::min, n, _GtsPGraph::pos, and _GtsPGraph::split.

Here is the call graph for this function:

GtsPNodeClass* gts_pnode_class ( void  )

gts_pnode_class:

Returns: the GtsPNodeClass.

Definition at line 372 of file graph.c.

References gts_gnode_class(), GTS_OBJECT_CLASS, gts_object_class_new(), pnode_class_init(), and pnode_init().

Referenced by create_segment_edge().

Here is the call graph for this function:

GtsPNode* gts_pnode_new ( GtsPNodeClass klass,
gpointer  data 
)

gts_pnode_new: : a GtsPNodeClass. : user data.

Returns: a new GtsPNode associated with .

Definition at line 400 of file graph.c.

References _GtsPNode::data, GTS_OBJECT_CLASS, gts_object_new(), and GTS_PNODE.

Referenced by create_segment_edge().

Here is the call graph for this function:

gdouble gts_point_in_circle ( GtsPoint p,
GtsPoint p1,
GtsPoint p2,
GtsPoint p3 
)

gts_point_in_circle: : a GtsPoint. : a GtsPoint. : a GtsPoint. : a GtsPoint.

Tests if the planar projection (x, y) of is inside or outside the circle defined by the planar projection of , and .

Returns: a positive number if lies inside, a negative number if lies outside and zero if lies on the circle.

Definition at line 297 of file point.c.

References incircle(), and _GtsPoint::x.

Referenced by delaunay_check(), polygon_in_circle(), and swap_if_in_circle().

Here is the call graph for this function:

gdouble gts_point_in_sphere ( GtsPoint p,
GtsPoint p1,
GtsPoint p2,
GtsPoint p3,
GtsPoint p4 
)

gts_point_in_sphere: : a GtsPoint. : a GtsPoint. : a GtsPoint. : a GtsPoint. : a GtsPoint.

Tests if is inside or outside the sphere defined by , , and .

Returns: a positive number if lies inside, a negative number if lies outside and zero if lies on the sphere.

Definition at line 324 of file point.c.

References insphere(), and _GtsPoint::x.

Here is the call graph for this function:

gdouble gts_point_in_triangle_circle ( GtsPoint p,
GtsTriangle t 
)

gts_point_in_triangle_circle: : a GtsPoint. : a GtsTriangle.

Tests if the planar projection (x, y) of is inside or outside the circumcircle of the planar projection of . This function is geometrically robust.

Returns: a positive number if lies inside, a negative number if lies outside and zero if lies on the circumcircle of .

Definition at line 266 of file point.c.

References gts_triangle_vertices(), incircle(), and _GtsPoint::x.

Here is the call graph for this function:

GtsIntersect gts_point_is_in_triangle ( GtsPoint p,
GtsTriangle t 
)

gts_point_is_in_triangle: : a GtsPoint. : a GtsTriangle.

Tests if the planar projection (x, y) of is inside, outside or on the boundary of the planar projection of . This function is geometrically robust.

Returns: GTS_IN if is inside , GTS_ON if is on the boundary of , GTS_OUT otherwise.

Definition at line 230 of file point.c.

References FALSE, GTS_IN, GTS_ON, GTS_OUT, GTS_POINT, gts_point_orientation(), and gts_triangle_vertices().

Here is the call graph for this function:

gboolean gts_point_is_inside_surface ( GtsPoint p,
GNode *  tree,
gboolean  is_open 
)

gts_point_is_inside_surface: : a GtsPoint. : a bounding box tree of the faces of a closed, orientable surface (see gts_bb_tree_surface()). : TRUE if the surface defined by is "open" i.e. its volume is negative, FALSE otherwise.

Returns: TRUE if is inside the surface defined by , FALSE otherwise.

Definition at line 749 of file point.c.

References FALSE, gts_bb_tree_stabbed(), GTS_BBOX, GTS_OBJECT, gts_object_destroy(), gts_point_class(), gts_point_new(), GTS_TRIANGLE, ray_intersects_triangle(), _GtsBBox::x2, _GtsPoint::y, and _GtsPoint::z.

Here is the call graph for this function:

GtsFace* gts_point_locate ( GtsPoint p,
GtsSurface surface,
GtsFace guess 
)

gts_point_locate: : a GtsPoint. : a GtsSurface. : NULL or a face of close to .

Locates the face of the planar projection of containing . The planar projection of must define a connected set of triangles without holes and bounded by a convex boundary. The algorithm is randomized and performs in O(n^1/3) expected time where n is the number of triangles of .

If a good is given the point location can be significantly faster.

Returns: a GtsFace of containing or NULL if is not contained within the boundary of .

Definition at line 357 of file cdt.c.

References closest_face(), fr, gts_face_has_parent_surface(), GTS_OBJECT, GTS_OBJECT_CLASS, gts_object_destroy(), gts_object_new(), GTS_POINT, gts_point_class(), GTS_TRIANGLE, gts_triangle_orientation(), point_locate(), and triangle_barycenter().

Referenced by cluster_find(), and gts_delaunay_add_vertex().

Here is the call graph for this function:

GtsPoint* gts_point_new ( GtsPointClass klass,
gdouble  x,
gdouble  y,
gdouble  z 
)

gts_point_new: : a GtsPointClass. : the x-coordinate. : the y-coordinate. : the z-coordinate.

Returns: a new GtsPoint.

Definition at line 123 of file point.c.

References GTS_OBJECT_CLASS, gts_object_new(), GTS_POINT, x, _GtsPoint::x, y, _GtsPoint::y, and _GtsPoint::z.

Referenced by cluster_find(), gts_point_is_inside_surface(), gts_triangle_circumcircle_center(), midpoint(), segment_triangle_intersection(), toporouter_bbox_locate(), and triangulate_face().

Here is the call graph for this function:

gdouble gts_point_orientation ( GtsPoint p1,
GtsPoint p2,
GtsPoint p3 
)

gts_point_orientation: : a GtsPoint. : a GtsPoint. : a GtsPoint.

Checks for orientation of the projection of three points on the (x,y) plane. The result is also an approximation of twice the signed area of the triangle defined by the three points. This function uses adaptive floating point arithmetic and is consequently geometrically robust.

Returns: a positive value if , and appear in counterclockwise order, a negative value if they appear in clockwise order and zero if they are colinear.

Definition at line 696 of file point.c.

References orient2d(), and _GtsPoint::x.

Referenced by gts_delaunay_add_vertex_to_face(), gts_point_is_in_triangle(), gts_segments_are_intersecting(), gts_triangle_is_stabbed(), gts_triangle_orientation(), point_locate(), remove_intersected_edge(), remove_intersected_vertex(), split_list(), triangle_next_edge(), and triangulate_polygon().

Here is the call graph for this function:

gdouble gts_point_orientation_3d ( GtsPoint p1,
GtsPoint p2,
GtsPoint p3,
GtsPoint p4 
)

gts_point_orientation_3d: : a GtsPoint. : a GtsPoint. : a GtsPoint. : a GtsPoint.

Checks if lies above, below or on the plane passing through the points , and . Below is defined so that , and appear in counterclockwise order when viewed from above the plane. The returned value is an approximation of six times the signed volume of the tetrahedron defined by the four points. This function uses adaptive floating point arithmetic and is consequently geometrically robust.

Returns: a positive value if lies below, a negative value if lies above the plane, zero if the four points are coplanar.

Definition at line 205 of file point.c.

References orient3d(), and _GtsPoint::x.

Referenced by gts_segment_triangle_intersection(), gts_triangle_is_stabbed(), and segment_triangle_intersection().

Here is the call graph for this function:

gint gts_point_orientation_3d_sos ( GtsPoint p1,
GtsPoint p2,
GtsPoint p3,
GtsPoint p4 
)

gts_point_orientation_3d_sos: : a GtsPoint. : a GtsPoint. : a GtsPoint. : a GtsPoint.

Checks if lies above or below the plane passing through the points , and . Below is defined so that , and appear in counterclockwise order when viewed from above the plane. This function uses adaptive floating point arithmetic and is consequently geometrically robust.

Simulation of Simplicity (SoS) is used to break ties when the orientation is degenerate (i.e. lies on the plane defined by , and ).

Returns: +1 if lies below, -1 if lies above the plane.

Definition at line 816 of file point.c.

References c, ORIENT1D, orient2d(), orient3d(), sign, SIGN, sortp(), x, _GtsPoint::x, and y.

Referenced by add_edge_inter(), intersection_orientation(), ray_intersects_triangle(), segment_triangle_intersection(), triangle_point_orientation(), and triangle_triangle_orientation().

Here is the call graph for this function:

gint gts_point_orientation_sos ( GtsPoint p1,
GtsPoint p2,
GtsPoint p3 
)

gts_point_orientation_sos: : a GtsPoint. : a GtsPoint. : a GtsPoint.

Checks for orientation of the projection of three points on the (x,y) plane.

Simulation of Simplicity (SoS) is used to break ties when the orientation is degenerate (i.e. lies on the line defined by and ).

Returns: a positive value if , and appear in counterclockwise order or a negative value if they appear in clockwise order.

Definition at line 948 of file point.c.

References ORIENT1D, orient2d(), sign, SIGN, sortp(), x, _GtsPoint::x, and y.

Here is the call graph for this function:

void gts_point_segment_closest ( GtsPoint p,
GtsSegment s,
GtsPoint closest 
)

gts_point_segment_closest: : a GtsPoint. : a GtsSegment. : a GtsPoint.

Set the coordinates of to the coordinates of the point belonging to closest to .

Definition at line 394 of file point.c.

References GTS_POINT, gts_point_distance2(), gts_point_set(), _GtsSegment::v1, _GtsSegment::v2, _GtsPoint::x, _GtsPoint::y, and _GtsPoint::z.

Referenced by gts_point_triangle_closest().

Here is the call graph for this function:

gdouble gts_point_segment_distance ( GtsPoint p,
GtsSegment s 
)

gts_point_segment_distance: : a GtsPoint. : a GtsSegment.

Returns: the minimun Euclidean distance between and .

Definition at line 377 of file point.c.

References gts_point_segment_distance2().

Referenced by gts_surface_distance().

Here is the call graph for this function:

gdouble gts_point_segment_distance2 ( GtsPoint p,
GtsSegment s 
)

gts_point_segment_distance2: : a GtsPoint. : a GtsSegment.

Returns: the square of the minimun Euclidean distance between and .

Definition at line 344 of file point.c.

References GTS_POINT, gts_point_distance2(), _GtsSegment::v1, _GtsSegment::v2, _GtsPoint::x, x, _GtsPoint::y, y, and _GtsPoint::z.

Referenced by gts_point_segment_distance(), and gts_point_triangle_distance2().

Here is the call graph for this function:

void gts_point_set ( GtsPoint p,
gdouble  x,
gdouble  y,
gdouble  z 
)

gts_point_set: : a GtsPoint. : the x-coordinate. : the y-coordinate. : the z-coordinate.

Sets the coordinates of .

Definition at line 145 of file point.c.

References x, _GtsPoint::x, y, _GtsPoint::y, and _GtsPoint::z.

Referenced by gts_point_segment_closest(), gts_point_triangle_closest(), gts_segment_triangle_intersection(), and gts_vertex_new().

void gts_point_transform ( GtsPoint p,
GtsMatrix m 
)

gts_point_transform: : a GtsPoint. : the GtsMatrix representing the transformation to apply to the coordinates of .

Transform the coordinates of according to . (p[] becomes m[][].p[]).

Definition at line 670 of file point.c.

References _GtsPoint::x, x, _GtsPoint::y, y, and _GtsPoint::z.

void gts_point_triangle_closest ( GtsPoint p,
GtsTriangle t,
GtsPoint closest 
)

gts_point_triangle_closest: : a GtsPoint. : a GtsTriangle. : a GtsPoint.

Set the coordinates of to those of the point belonging to and closest to .

Definition at line 515 of file point.c.

References B, det(), GTS_OBJECT, GTS_OBJECT_CLASS, gts_object_destroy(), gts_object_new(), GTS_POINT, gts_point_class(), gts_point_distance2(), gts_point_segment_closest(), gts_point_set(), GTS_SEGMENT, gts_triangle_vertices_edges(), gts_vector_init, gts_vector_scalar, _GtsPoint::x, _GtsPoint::y, and _GtsPoint::z.

Here is the call graph for this function:

gdouble gts_point_triangle_distance ( GtsPoint p,
GtsTriangle t 
)

gts_point_triangle_distance: : a GtsPoint. : a GtsTriangle.

Returns: the minimun Euclidean distance between and .

Definition at line 498 of file point.c.

References gts_point_triangle_distance2().

Referenced by gts_surface_distance().

Here is the call graph for this function:

gdouble gts_point_triangle_distance2 ( GtsPoint p,
GtsTriangle t 
)

gts_point_triangle_distance2: : a GtsPoint. : a GtsTriangle.

Returns: the square of the minimun Euclidean distance between and .

Definition at line 436 of file point.c.

References B, det(), gts_point_segment_distance2(), GTS_SEGMENT, gts_triangle_vertices_edges(), gts_vector_init, gts_vector_scalar, x, and y.

Referenced by gts_point_triangle_distance().

Here is the call graph for this function:

GtsSplit* gts_psurface_add_vertex ( GtsPSurface ps)

gts_psurface_add_vertex: : a GtsPSurface.

Adds a vertex to the progressive surface by expanding the next available GtsSplit.

Returns: the expanded GtsSplit or NULL if all the GtsSplit have already been expanded.

Definition at line 341 of file psurface.c.

References _GtsSurface::edge_class, GTS_PSURFACE_IS_CLOSED, gts_split_expand(), _GtsPSurface::pos, _GtsPSurface::s, and _GtsPSurface::split.

Referenced by gts_psurface_set_vertex_number().

Here is the call graph for this function:

GtsPSurfaceClass* gts_psurface_class ( void  )

gts_psurface_class:

Returns: the GtsPSurfaceClass.

Definition at line 64 of file psurface.c.

References gts_object_class(), gts_object_class_new(), psurface_class_init(), and psurface_init().

Referenced by psurface_destroy().

Here is the call graph for this function:

void gts_psurface_close ( GtsPSurface ps)

gts_psurface_close: : a GtsPSurface prealably created with gts_psurface_open().

Closes a progressive surface.

Definition at line 1804 of file split.c.

References _GtsPSurface::faces, gts_object_reset_reserved(), GTS_PSURFACE_IS_CLOSED, gts_surface_foreach_vertex(), n, _GtsPSurface::pos, _GtsPSurface::s, _GtsPSurface::split, TRUE, and _GtsPSurface::vertices.

Referenced by psurface_destroy().

Here is the call graph for this function:

void gts_psurface_foreach_vertex ( GtsPSurface ps,
GtsFunc  func,
gpointer  data 
)

gts_psurface_foreach_vertex: : a GtsPSurface. : a function to call for each vertex of . : data to be passed to .

Calls for each (potential) vertex of , whether actually used or not. The vertices are called in the order they were created during the edge collapse operation.

Definition at line 457 of file psurface.c.

References GTS_PSURFACE_IS_CLOSED, _GtsPSurface::split, and _GtsSplit::v.

guint gts_psurface_get_vertex_number ( GtsPSurface ps)

gts_psurface_get_vertex_number: : a GtsPSurface.

Returns: the current number of vertices of .

Definition at line 437 of file psurface.c.

References GTS_PSURFACE_IS_CLOSED, _GtsPSurface::min, _GtsPSurface::pos, and _GtsPSurface::split.

guint gts_psurface_max_vertex_number ( GtsPSurface ps)

gts_psurface_max_vertex_number: : a GtsPSurface.

Returns: the maximum number of vertices of i.e. the number of vertices if all the GtsSplit were expanded.

Definition at line 390 of file psurface.c.

References _GtsPSurface::min, and _GtsPSurface::split.

guint gts_psurface_min_vertex_number ( GtsPSurface ps)

gts_psurface_min_vertex_number: : a GtsPSurface.

Returns: the minimum number of vertices of i.e. the number of vertices if all the GtsSplit were collapsed.

Definition at line 404 of file psurface.c.

References _GtsPSurface::min.

GtsPSurface* gts_psurface_new ( GtsPSurfaceClass klass,
GtsSurface surface,
GtsSplitClass split_class,
GtsKeyFunc  cost_func,
gpointer  cost_data,
GtsCoarsenFunc  coarsen_func,
gpointer  coarsen_data,
GtsStopFunc  stop_func,
gpointer  stop_data,
gdouble  minangle 
)

gts_psurface_new: : a GtsPSurfaceClass. : a GtsSurface. : a GtsSplitClass to use for the new progressive surface. : cost function for the edge collapse algorithm. : data to pass to . : the function returning the vertex replacement for the edge collapse. : data to pass to . : the function to call to decide whether to stop the coarsening process. : data to pass to . : the minimum angle allowable between two neighboring triangles. This is used to avoid introducing folds in the mesh during simplification.

This function works in exactly the same way as the gts_surface_coarsen() function, except that the history of edge collapse is saved in an array of GtsSplit objects. This allows for dynamic continuous multiresolution control of the input .

Returns: a new progressive surface.

Definition at line 228 of file psurface.c.

References create_heap_coarsen(), _GtsTriangle::e1, _GtsTriangle::e2, _GtsTriangle::e3, edge_collapse(), edge_length2(), FALSE, gts_allow_floating_edges, gts_edge_face_number(), gts_eheap_destroy(), gts_eheap_foreach(), gts_eheap_freeze(), gts_eheap_new(), gts_eheap_remove_top(), gts_eheap_size(), gts_eheap_thaw(), GTS_OBJECT, GTS_OBJECT_CLASS, gts_object_new(), gts_object_reset_reserved(), GTS_POINT, GTS_PSURFACE, gts_segment_midvertex(), gts_surface_foreach_edge(), gts_surface_foreach_face(), gts_surface_vertex_number(), gts_vertex_is_contact(), gts_vertex_triangles(), _GtsPSurface::min, _GtsPSurface::pos, _GtsPSurface::s, _GtsPSurface::split, _GtsPSurface::split_class, TRUE, update_2nd_closest_neighbors(), and _GtsSplit::v.

Here is the call graph for this function:

GtsPSurface* gts_psurface_open ( GtsPSurfaceClass klass,
GtsSurface s,
GtsSplitClass split_class,
GtsFile f 
)

gts_psurface_open: : a GtsPSurfaceClass. : a GtsSurface. : a GtsSplitClass to use for the GtsSplit. : a GtsFile.

Creates a new GtsPSurface prepared for input from the file containing a valid GTS representation of a progressive surface. The initial shape of the progressive surface is loaded into .

Before being usable as such this progressive surface must be closed using gts_psurface_close(). While open however, the functions gts_psurface_get_vertex_number(), gts_psurface_min_vertex_number() and gts_psurface_max_vertex_number() can still be used.

Returns: a new GtsPSurface or NULL if there was a format error while reading the file, in which case contains information about the error.

Definition at line 1563 of file split.c.

References _GtsPSurface::faces, gts_file_first_token_after(), GTS_INT, GTS_OBJECT, GTS_OBJECT_CLASS, gts_object_destroy(), gts_object_new(), GTS_PSURFACE, gts_surface_vertex_number(), _GtsPSurface::min, _GtsPSurface::pos, s, _GtsPSurface::s, _GtsPSurface::split, _GtsPSurface::split_class, surface_read(), _GtsFile::token, _GtsFile::type, and _GtsPSurface::vertices.

Here is the call graph for this function:

GtsSplit* gts_psurface_read_vertex ( GtsPSurface ps,
GtsFile fp 
)
GtsSplit* gts_psurface_remove_vertex ( GtsPSurface ps)

gts_psurface_remove_vertex: : a GtsPSurface.

Removes one vertex from the progressive surface by collapsing the first available GtsSplit.

Returns: the collapsed GtsSplit or NULL if all the GtsSplit have already been collapsed.

Definition at line 367 of file psurface.c.

References _GtsSurface::edge_class, GTS_PSURFACE_IS_CLOSED, gts_split_collapse(), _GtsPSurface::pos, _GtsPSurface::s, and _GtsPSurface::split.

Referenced by gts_hsurface_new(), gts_psurface_set_vertex_number(), and gts_psurface_write().

Here is the call graph for this function:

void gts_psurface_set_vertex_number ( GtsPSurface ps,
guint  n 
)

gts_psurface_set_vertex_number: : a GtsPSurface.
: a number of vertices.

Performs the required number of collapses or expansions to set the number of vertices of to
.

Definition at line 419 of file psurface.c.

References gts_psurface_add_vertex(), GTS_PSURFACE_IS_CLOSED, gts_psurface_remove_vertex(), _GtsPSurface::min, n, _GtsPSurface::pos, and _GtsPSurface::split.

Here is the call graph for this function:

void gts_range_print ( GtsRange r,
FILE *  fptr 
)

gts_range_print: : a GtsRange. : a file pointer.

Writes a text representation of in .

Definition at line 505 of file surface.c.

References _GtsRange::max, _GtsRange::mean, _GtsRange::min, and _GtsRange::stddev.

Referenced by gts_graph_partition_print_stats(), gts_graph_print_stats(), and gts_surface_print_stats().

void gts_range_reset ( GtsRange r)

gts_range_reset: : a GtsRange.

Sets all the fields of to 0.

Definition at line 448 of file surface.c.

References _GtsRange::max, _GtsRange::min, _GtsRange::n, _GtsRange::sum, and _GtsRange::sum2.

Referenced by gts_surface_distance().

GtsSegmentClass* gts_segment_class ( void  )

gts_segment_class:

Returns: the GtsSegmentClass.

Definition at line 56 of file segment.c.

References gts_object_class(), gts_object_class_new(), segment_class_init(), and segment_init().

Referenced by gts_edge_class(), and segment_destroy().

Here is the call graph for this function:

GtsSegment* gts_segment_is_duplicate ( GtsSegment s)

gts_segment_is_duplicate: : a GtsSegment.

Returns: the first GtsSegment different from which shares the same endpoints or NULL if there is none.

Definition at line 110 of file segment.c.

References _GtsVertex::segments, _GtsSegment::v1, and _GtsSegment::v2.

Referenced by gts_segment_is_ok(), gts_split_collapse(), and stats_foreach_edge().

gboolean gts_segment_is_ok ( GtsSegment s)

gts_segment_is_ok: : a GtsSegment.

Returns: TRUE if is not degenerate (i.e. ->v1 != ->v2) and not duplicate, FALSE otherwise.

Definition at line 226 of file segment.c.

References FALSE, GTS_OBJECT, gts_segment_is_duplicate(), TRUE, _GtsSegment::v1, and _GtsSegment::v2.

Here is the call graph for this function:

GtsVertex* gts_segment_midvertex ( GtsSegment s,
GtsVertexClass klass 
)

gts_segment_midvertex: : a GtsSegment. : a GtsVertexClass to be used for the new vertex.

Returns: a new GtsVertex, midvertex of .

Definition at line 175 of file segment.c.

References GTS_POINT, gts_vertex_new(), _GtsSegment::v1, _GtsSegment::v2, _GtsPoint::x, _GtsPoint::y, and _GtsPoint::z.

Referenced by gts_psurface_new(), gts_surface_coarsen(), gts_surface_refine(), and split_edge().

Here is the call graph for this function:

GtsSegment* gts_segment_new ( GtsSegmentClass klass,
GtsVertex v1,
GtsVertex v2 
)

gts_segment_new: : a GtsSegmentClass. : a GtsVertex. : another GtsVertex different from .

Returns: a new GtsSegment linking and .

Definition at line 85 of file segment.c.

References GTS_OBJECT_CLASS, gts_object_new(), GTS_SEGMENT, s, _GtsVertex::segments, _GtsSegment::v1, and _GtsSegment::v2.

Referenced by gts_edge_new().

Here is the call graph for this function:

GtsPoint* gts_segment_triangle_intersection ( GtsSegment s,
GtsTriangle t,
gboolean  boundary,
GtsPointClass klass 
)

gts_segment_triangle_intersection: : a GtsSegment. : a GtsTriangle. : if TRUE, the boundary of is taken into account. : a GtsPointClass to be used for the new point.

Checks if intersects . If this is the case, creates a new point pi intersection of with .

This function is geometrically robust in the sense that it will not return a point if and do not intersect and will return a point if and do intersect. However, the point coordinates are subject to round-off errors.

Note that this function will not return any point if is contained in the plane defined by .

Returns: a summit of (if is set to TRUE), one of the endpoints of or a new GtsPoint, intersection of with or NULL if and don't intersect.

Definition at line 597 of file point.c.

References B, c, _GtsTriangle::e1, GTS_OBJECT_CLASS, gts_object_new(), GTS_POINT, gts_point_orientation_3d(), gts_point_set(), GTS_SEGMENT, gts_triangle_vertex, _GtsSegment::v1, _GtsSegment::v2, _GtsPoint::x, _GtsPoint::y, and _GtsPoint::z.

Here is the call graph for this function:

GtsIntersect gts_segments_are_intersecting ( GtsSegment s1,
GtsSegment s2 
)

gts_segments_are_intersecting: : a GtsSegment. : a GtsSegment.

Returns: GTS_IN if and are intersecting, GTS_ON if one of the endpoints of (resp. ) lies on (resp. ), GTS_OUT otherwise.

Definition at line 144 of file segment.c.

References FALSE, GTS_IN, GTS_ON, GTS_OUT, GTS_POINT, gts_point_orientation(), _GtsSegment::v1, and _GtsSegment::v2.

Referenced by build_cdt().

Here is the call graph for this function:

GSList* gts_segments_from_vertices ( GSList *  vertices)

gts_segments_from_vertices: : a list of GtsVertex.

Returns: a list of unique GtsSegment which have one of their vertices in .

Definition at line 196 of file segment.c.

References GTS_VERTEX, hash(), and s.

Here is the call graph for this function:

GtsGraph* gts_segments_graph_new ( GtsGraphClass klass,
GSList *  segments 
)

gts_segments_graph_new: : a GtsGraphClass. : a list of GtsSegment.

Returns: a new GtsGraph representing the connectivity of the segments in .

Definition at line 1732 of file graph.c.

References create_segment_edge(), GTS_GRAPH, GTS_OBJECT_CLASS, gts_object_new(), and reset_reserved().

Here is the call graph for this function:

GtsSListContaineeClass* gts_slist_containee_class ( void  )

Definition at line 163 of file container.c.

References gts_containee_class(), GTS_OBJECT_CLASS, gts_object_class_new(), slist_containee_class_init(), and slist_containee_init().

Referenced by gts_container_class(), and slist_containee_destroy().

Here is the call graph for this function:

GtsSListContainerClass* gts_slist_container_class ( void  )
GtsSplitClass* gts_split_class ( void  )

gts_split_class:

Returns: the GtsSplitClass.

Definition at line 463 of file split.c.

References gts_object_class(), gts_object_class_new(), split_class_init(), and split_init().

Referenced by gts_hsplit_class(), psurface_init(), and split_destroy().

Here is the call graph for this function:

void gts_split_collapse ( GtsSplit vs,
GtsEdgeClass klass,
GtsEHeap heap 
)

gts_split_collapse: : a GtsSplit. : a GtsEdgeClass. : a GtsEHeap or NULL.

Collapses the vertex split . Any new edge created during the process will be of class . If heap is not NULL, the new edges will be inserted into it and the destroyed edges will be removed from it.

Definition at line 554 of file split.c.

References _GtsSplitCFace::a1, _GtsSplitCFace::a2, CFACE, cface_class(), cface_new(), _GtsSplit::cfaces, DYNAMIC_SPLIT, _GtsTriangle::e1, _GtsTriangle::e2, _GtsTriangle::e3, _GtsSplitCFace::f, FALSE, gts_allow_floating_vertices, GTS_EDGE, GTS_FACE, GTS_IS_FACE, GTS_OBJECT, GTS_OBJECT_CLASS, gts_object_destroy(), GTS_POINT, GTS_SEGMENT, gts_segment_is_duplicate(), gts_split_expand(), GTS_SPLIT_V1, GTS_SPLIT_V2, gts_triangle_is_duplicate(), gts_vertex_triangles(), gts_vertices_are_connected(), _GtsSplit::ncf, s, _GtsVertex::segments, _GtsEdge::triangles, TRUE, _GtsSplit::v, _GtsSegment::v1, and _GtsSegment::v2.

Referenced by edge_collapse(), gts_hsplit_collapse(), and gts_psurface_remove_vertex().

Here is the call graph for this function:

void gts_split_expand ( GtsSplit vs,
GtsSurface s,
GtsEdgeClass klass 
)
guint gts_split_height ( GtsSplit root)

gts_split_height: : a GtsSplit.

Returns: the maximum height of the vertex split tree having as root.

Definition at line 1080 of file split.c.

References GTS_IS_SPLIT, GTS_SPLIT, gts_split_height(), _GtsSplit::v1, and _GtsSplit::v2.

Referenced by gts_hsurface_height(), and gts_split_height().

Here is the call graph for this function:

GtsSplit* gts_split_new ( GtsSplitClass klass,
GtsVertex v,
GtsObject o1,
GtsObject o2 
)

gts_split_new: : a GtsSplitClass. : a GtsVertex. : either a GtsVertex or a GtsSplit. : either a GtsVertex or a GtsSplit.

Creates a new GtsSplit which would collapse and into . The collapse itself is not performed.

Returns: the new GtsSplit.

Definition at line 907 of file split.c.

References _GtsSplit::cfaces, _GtsSplitCFace::f, GTS_EDGE, GTS_IS_SPLIT, GTS_IS_VERTEX, GTS_OBJECT_CLASS, gts_object_new(), GTS_SPLIT, GTS_SPLIT_V1, GTS_SPLIT_V2, gts_vertices_are_connected(), _GtsSplit::ncf, _GtsEdge::triangles, _GtsSplit::v, _GtsSplit::v1, and _GtsSplit::v2.

Referenced by edge_collapse().

Here is the call graph for this function:

void gts_split_traverse ( GtsSplit root,
GTraverseType  order,
gint  depth,
GtsSplitTraverseFunc  func,
gpointer  data 
)

gts_split_traverse: : the GtsSplit to start the traversal from. : the order in which nodes are visited - G_PRE_ORDER or G_POST_ORDER. : the maximum depth of the traversal. Nodes below this depth will not be visited. If depth is -1 all nodes in the tree are visited. If depth is 1, only the root is visited. If depth is 2, the root and its children are visited. And so on. : the function to call for each visited GtsHSplit. : user data to pass to the function.

Traverses the GtsSplit tree having as root. Calls for each GtsSplit of the tree in the order specified by . If order is set to G_PRE_ORDER is called for the GtsSplit then its children, if order is set to G_POST_ORDER is called for the children and then for the GtsSplit.

Definition at line 1045 of file split.c.

References split_depth_traverse_post_order(), split_depth_traverse_pre_order(), split_traverse_post_order(), and split_traverse_pre_order().

Referenced by gts_hsurface_traverse().

Here is the call graph for this function:

gdouble gts_surface_area ( GtsSurface s)

gts_surface_area: : a GtsSurface.

Returns: the area of obtained as the sum of the signed areas of its faces.

Definition at line 419 of file surface.c.

References gts_surface_foreach_face(), and sum_area().

Here is the call graph for this function:

GSList* gts_surface_boundary ( GtsSurface surface)

gts_surface_boundary: : a GtsSurface.

Returns: a list of GtsEdge boundary of .

Definition at line 2518 of file surface.c.

References gts_surface_foreach_edge(), and surface_boundary().

Referenced by gts_delaunay_remove_hull().

Here is the call graph for this function:

gdouble gts_surface_center_of_area ( GtsSurface s,
GtsVector  cm 
)

gts_surface_center_of_area: : a GtsSurface. : a GtsVector.

Fills with the coordinates of the center of area of .

Returns: the area of surface .

Definition at line 2355 of file surface.c.

References center_of_area_foreach_face(), and gts_surface_foreach_face().

Here is the call graph for this function:

gdouble gts_surface_center_of_mass ( GtsSurface s,
GtsVector  cm 
)

gts_surface_center_of_mass: : a GtsSurface. : a GtsVector.

Fills with the coordinates of the center of mass of .

Returns: the signed volume of the domain bounded by the surface .

Definition at line 2302 of file surface.c.

References center_of_mass_foreach_face(), and gts_surface_foreach_face().

Here is the call graph for this function:

GtsSurfaceClass* gts_surface_class ( void  )

gts_surface_class:

Returns: the GtsSurfaceClass.

Definition at line 97 of file surface.c.

References gts_object_class(), gts_object_class_new(), surface_class_init(), and surface_init().

Referenced by build_cdt(), delaunay_create_from_vertices(), gts_surface_inter_new(), surface_destroy(), surface_inter_new(), and triangulate_face().

Here is the call graph for this function:

void gts_surface_coarsen ( GtsSurface surface,
GtsKeyFunc  cost_func,
gpointer  cost_data,
GtsCoarsenFunc  coarsen_func,
gpointer  coarsen_data,
GtsStopFunc  stop_func,
gpointer  stop_data,
gdouble  minangle 
)

gts_surface_coarsen: : a GtsSurface. : a function returning the cost for a given edge. : user data to be passed to . : a #GtsCoarsenVertexFunc. : user data to be passed to . : a GtsStopFunc. : user data to be passed to . : minimum angle between two neighboring triangles.

The edges of are sorted according to to create a priority heap (a GtsEHeap). The edges are extracted in turn from the top of the heap and collapsed (i.e. the vertices are replaced by the vertex returned by the function) until the functions returns TRUE.

If is set to NULL, the edges are sorted according to their length squared (the shortest is on top).

If is set to NULL gts_segment_midvertex() is used.

The minimum angle is used to avoid introducing faces which would be folded.

Definition at line 1646 of file surface.c.

References create_heap_coarsen(), edge_collapse(), edge_length2(), FALSE, gts_allow_floating_edges, gts_edge_face_number(), gts_eheap_destroy(), gts_eheap_foreach(), gts_eheap_freeze(), gts_eheap_new(), gts_eheap_remove_top(), gts_eheap_size(), gts_eheap_thaw(), GTS_OBJECT, gts_object_reset_reserved(), gts_segment_midvertex(), gts_surface_foreach_edge(), TRUE, update_2nd_closest_neighbors(), and _GtsSurface::vertex_class.

Here is the call graph for this function:

GtsSurface* gts_surface_copy ( GtsSurface s1,
GtsSurface s2 
)

gts_surface_copy: : a GtsSurface. : a GtsSurface.

Add a copy of all the faces, edges and vertices of to .

Returns: .

Definition at line 2081 of file surface.c.

References _GtsSurface::edge_class, foreach_edge_copy(), foreach_face_copy(), foreach_vertex_copy(), gts_object_reset_reserved(), gts_surface_foreach_edge(), gts_surface_foreach_face(), gts_surface_foreach_vertex(), and _GtsSurface::vertex_class.

Here is the call graph for this function:

void gts_surface_distance ( GtsSurface s1,
GtsSurface s2,
gdouble  delta,
GtsRange face_range,
GtsRange boundary_range 
)

gts_surface_distance: : a GtsSurface. : a GtsSurface. : a spatial increment defined as the percentage of the diagonal of the bounding box of . : a GtsRange. : a GtsRange.

Using the gts_bb_tree_surface_distance() and gts_bb_tree_surface_boundary_distance() functions fills and with the min, max and average Euclidean (minimum) distances between the faces of and the faces of and between the boundary edges of and .

Definition at line 2460 of file surface.c.

References build_list_boundary(), build_list_face(), gts_bb_tree_destroy(), gts_bb_tree_new(), gts_bb_tree_surface_boundary_distance(), gts_bb_tree_surface_distance(), gts_point_segment_distance(), gts_point_triangle_distance(), gts_range_reset(), gts_surface_foreach_edge(), gts_surface_foreach_face(), and TRUE.

Here is the call graph for this function:

guint gts_surface_edge_number ( GtsSurface s)

gts_surface_edge_number: : a GtsSurface.

Returns: the number of edges of .

Definition at line 2405 of file surface.c.

References gts_surface_foreach_edge(), n, and number_foreach().

Here is the call graph for this function:

guint gts_surface_face_number ( GtsSurface s)

gts_surface_face_number: : a GtsSurface.

Returns: the number of faces of

Definition at line 2422 of file surface.c.

References _GtsSurface::faces.

guint gts_surface_foreach_face_remove ( GtsSurface s,
GtsFunc  func,
gpointer  data 
)

gts_surface_foreach_face_remove: : a GtsSurface. : a GtsFunc. : user data to be passed to .

Calls once for each face of . If returns TRUE the corresponding face is removed from (and destroyed if it does not belong to any other surface and gts_allow_floating_faces is set to FALSE).

Returns: the number of faces removed from .

Definition at line 1161 of file surface.c.

References _GtsSurface::faces, FALSE, foreach_face_remove(), _GtsSurface::keep_faces, n, s, and TRUE.

Here is the call graph for this function:

gboolean gts_surface_foreach_intersecting_face ( GtsSurface s,
GtsBBTreeTraverseFunc  func,
gpointer  data 
)

gts_surface_foreach_intersecting_face: : a GtsSurface. : a GtsBBTreeTraverseFunc. : user data to pass to .

Calls for each intersecting pair of faces of .

Returns: TRUE if was called at least once, FALSE otherwise.

Definition at line 1945 of file boolean.c.

References FALSE, gts_bb_tree_destroy(), gts_bb_tree_surface(), gts_bb_tree_traverse_overlapping(), self_intersecting(), and TRUE.

Referenced by gts_surface_is_self_intersecting().

Here is the call graph for this function:

void gts_surface_foreach_vertex ( GtsSurface s,
GtsFunc  func,
gpointer  data 
)

gts_surface_foreach_vertex: : a GtsSurface. : a GtsFunc. : user data to be passed to .

Calls once for each vertex of .

Definition at line 970 of file surface.c.

References _GtsSurface::faces, FALSE, _GtsSurface::keep_faces, TRUE, and vertex_foreach_face().

Referenced by gts_bbox_surface(), gts_psurface_close(), gts_psurface_write(), gts_surface_copy(), gts_surface_stats(), gts_surface_vertex_number(), gts_surface_write(), gts_surface_write_oogl(), gts_surface_write_vtk(), and toporouter_draw_surface().

Here is the call graph for this function:

GtsSurface* gts_surface_generate_sphere ( GtsSurface s,
guint  geodesation_order 
)

gts_surface_generate_sphere: : a GtsSurface. : a #guint.

Add a triangulated unit sphere generated by recursive subdivision to . First approximation is an isocahedron; each level of refinement () increases the number of triangles by a factor of 4. http://mathworld.wolfram.com/GeodesicDome.html

Returns: .

Definition at line 2035 of file surface.c.

References generate_icosahedron(), gts_surface_tessellate(), and s.

Here is the call graph for this function:

GtsGraph* gts_surface_graph_new ( GtsGraphClass klass,
GtsSurface s 
)

gts_surface_graph_new: : a GtsGraphClass. : a GtsSurface.

Returns: a new GtsGraph representing the connectivity of the faces of . This graph uses #GtsFGNode as nodes which allows to store the dependencies between nodes and faces of .

Definition at line 1683 of file graph.c.

References create_edge(), create_node(), GTS_GRAPH, GTS_OBJECT_CLASS, gts_object_new(), gts_object_reset_reserved(), gts_surface_foreach_edge(), and gts_surface_foreach_face().

Here is the call graph for this function:

GtsSurface* gts_surface_graph_surface ( GtsGraph surface_graph,
GtsSurface s 
)

gts_surface_graph_surface: : a GtsGraph using #GtsFGNode as nodes. : a GtsSurface.

Returns: a new GtsSurface using the same classes as and composed of the faces defined by .

Definition at line 1760 of file graph.c.

References add_to_surface(), _GtsSurface::edge_class, _GtsSurface::face_class, GTS_CONTAINER, gts_container_foreach(), GTS_OBJECT, GTS_SURFACE_CLASS, gts_surface_new(), and _GtsSurface::vertex_class.

Here is the call graph for this function:

void gts_surface_inter_boolean ( GtsSurfaceInter si,
GtsSurface surface,
GtsBooleanOperation  op 
)
gboolean gts_surface_inter_check ( GtsSurfaceInter si,
gboolean *  closed 
)

gts_surface_inter_check: : a GtsSurfaceInter. : is set to TRUE if ->edges is a closed curve, FALSE otherwise.

Returns: TRUE if the curve described by is an orientable manifold, FALSE otherwise.

Definition at line 1732 of file boolean.c.

References check_edge(), check_surface_edge(), _GtsSurfaceInter::edges, FALSE, gts_object_reset_reserved(), gts_surface_foreach_edge(), mark_edge(), ok, _GtsSurfaceInter::s1, _GtsSurfaceInter::s2, and TRUE.

Here is the call graph for this function:

GtsSurfaceInterClass* gts_surface_inter_class ( void  )

gts_surface_inter_class:

Returns: the GtsSurfaceInterClass.

Definition at line 65 of file boolean.c.

References gts_object_class(), gts_object_class_new(), surface_inter_class_init(), and surface_inter_init().

Referenced by gts_surface_intersection(), and surface_inter_destroy().

Here is the call graph for this function:

GtsSurfaceInter* gts_surface_inter_new ( GtsSurfaceInterClass klass,
GtsSurface s1,
GtsSurface s2,
GNode *  faces_tree1,
GNode *  faces_tree2,
gboolean  is_open1,
gboolean  is_open2 
)

gts_surface_inter_new: : a GtsSurfaceInterClass. : a GtsSurface. : a GtsSurface. : a bounding box tree (see gts_bb_tree_new()) for the faces of . : a bounding box tree for the faces of . : whether is an "open" surface. : whether is an "open" surface.

When triangulating the cut faces, the new faces inherit the attributes of these original faces through their attributes() method.

Returns: a new GtsSurfaceInter describing the intersection of and .

Definition at line 1570 of file boolean.c.

References create_edges(), _GtsSurface::edge_class, _GtsSurface::face_class, free_edge_list(), GTS_OBJECT, gts_object_destroy(), gts_surface_class(), gts_surface_foreach_edge(), gts_surface_foreach_face(), gts_surface_new(), s, _GtsSurfaceInter::s1, _GtsSurfaceInter::s2, surface_inter_new(), triangulate_face(), and _GtsSurface::vertex_class.

Here is the call graph for this function:

GSList* gts_surface_intersection ( GtsSurface s1,
GtsSurface s2,
GNode *  faces_tree1,
GNode *  faces_tree2 
)

gts_surface_intersection: : a GtsSurface. : a GtsSurface. : a bounding box tree (see gts_bb_tree_new()) for the faces of . : a bounding box tree for the faces of .

Returns: a list of GtsEdge defining the curve intersection of the two surfaces.

Definition at line 510 of file boolean.c.

References _GtsSurfaceInter::edges, free_glist(), free_slist(), GTS_OBJECT, gts_object_destroy(), gts_surface_foreach_edge(), gts_surface_foreach_face(), gts_surface_inter_class(), _GtsSurfaceInter::s1, _GtsSurfaceInter::s2, and surface_inter_new().

Here is the call graph for this function:

gboolean gts_surface_is_closed ( GtsSurface s)

gts_surface_is_closed: : a GtsSurface.

Returns: TRUE if is a closed surface, FALSE otherwise. Note that a closed surface is also a manifold.

Definition at line 2165 of file surface.c.

References closed_foreach_edge(), FALSE, gts_surface_foreach_edge(), s, and TRUE.

Here is the call graph for this function:

gboolean gts_surface_is_manifold ( GtsSurface s)

gts_surface_is_manifold: : a GtsSurface.

Returns: TRUE if the surface is a manifold, FALSE otherwise.

Definition at line 2135 of file surface.c.

References FALSE, gts_surface_foreach_edge(), manifold_foreach_edge(), s, and TRUE.

Here is the call graph for this function:

gboolean gts_surface_is_orientable ( GtsSurface s)

gts_surface_is_orientable: : a GtsSurface.

Returns: TRUE if all the faces of have compatible orientation as checked by gts_faces_are_compatible(), FALSE otherwise. Note that an orientable surface is also a manifold.

Definition at line 2209 of file surface.c.

References FALSE, gts_surface_foreach_edge(), orientable_foreach_edge(), s, and TRUE.

Here is the call graph for this function:

GtsSurface* gts_surface_is_self_intersecting ( GtsSurface s)

gts_surface_is_self_intersecting: : a GtsSurface.

Returns: a new GtsSurface containing the faces of which are self-intersecting or NULL if no faces of are self-intersecting.

Definition at line 1982 of file boolean.c.

References add_intersecting(), _GtsSurface::edge_class, _GtsSurface::face_class, GTS_OBJECT, gts_object_destroy(), GTS_SURFACE_CLASS, gts_surface_foreach_intersecting_face(), gts_surface_new(), and _GtsSurface::vertex_class.

Here is the call graph for this function:

void gts_surface_merge ( GtsSurface s,
GtsSurface with 
)

gts_surface_merge: : a GtsSurface. : another GtsSurface.

Adds all the faces of which do not already belong to to .

Definition at line 2111 of file surface.c.

References gts_surface_foreach_face(), and merge_foreach_face().

Referenced by triangulate_face().

Here is the call graph for this function:

void gts_surface_quality_stats ( GtsSurface s,
GtsSurfaceQualityStats stats 
)
guint gts_surface_read ( GtsSurface surface,
GtsFile f 
)

gts_surface_read: : a GtsSurface. : a GtsFile.

Add to the data read from . The format of the file pointed to by is as described in gts_surface_write().

Returns: 0 if successful or the line number at which the parsing stopped in case of error (in which case the field of is set to a description of the error which occured).

Definition at line 216 of file surface.c.

References _GtsSurface::edge_class, f, _GtsSurface::face_class, FALSE, gts_allow_floating_vertices, gts_edge_new(), GTS_ERROR, gts_face_new(), gts_file_error(), gts_file_first_token_after(), gts_file_next_token(), GTS_INT, GTS_OBJECT, GTS_OBJECT_CLASS, gts_object_destroy(), gts_object_new(), GTS_POINT_CLASS, GTS_STRING, gts_surface_add_face(), GTS_VERTEX, _GtsFile::line, n, _GtsFile::token, TRUE, _GtsFile::type, and _GtsSurface::vertex_class.

Here is the call graph for this function:

void gts_surface_refine ( GtsSurface surface,
GtsKeyFunc  cost_func,
gpointer  cost_data,
GtsRefineFunc  refine_func,
gpointer  refine_data,
GtsStopFunc  stop_func,
gpointer  stop_data 
)

gts_surface_refine: : a GtsSurface. : a function returning the cost for a given edge. : user data to be passed to . : a GtsRefineFunc. : user data to be passed to . : a GtsStopFunc. : user data to be passed to .

Refine using a midvertex insertion technique. All the edges of are ordered according to . The edges are then processed in order until returns TRUE. Each edge is split in two and new edges and faces are created.

If is set to NULL, the edges are sorted according to their length squared (the longest is on top).

If is set to NULL gts_segment_midvertex() is used.

Definition at line 1267 of file surface.c.

References create_heap_refine(), _GtsSurface::edge_class, edge_length2_inverse(), gts_edge_face_number(), gts_eheap_destroy(), gts_eheap_freeze(), gts_eheap_new(), gts_eheap_remove_top(), gts_eheap_size(), gts_eheap_thaw(), gts_segment_midvertex(), gts_surface_foreach_edge(), midvertex_insertion(), and _GtsSurface::vertex_class.

Here is the call graph for this function:

GSList* gts_surface_split ( GtsSurface s)

gts_surface_split: : a GtsSurface.

Splits a surface into connected and manifold components.

Returns: a list of new GtsSurface.

Definition at line 2726 of file surface.c.

References gts_surface_foreach_edge(), gts_surface_foreach_face(), s, traverse_boundary(), and traverse_remaining().

Here is the call graph for this function:

GSList* gts_surface_strip ( GtsSurface s)

gts_surface_strip: : a GtsSurface.

Decompose into triangle strips for fast-rendering.

Returns: a list of triangle strips containing all the triangles of . A triangle strip is itself a list of successive triangles having one edge in common.

Definition at line 718 of file stripe.c.

References find_min_neighbor(), find_right_turn(), grow_strip_backward(), grow_strip_forward(), gts_triangle_vertices(), heap_destroy(), heap_is_empty(), heap_new(), heap_remove(), and heap_top().

Here is the call graph for this function:

void gts_surface_tessellate ( GtsSurface s,
GtsRefineFunc  refine_func,
gpointer  refine_data 
)

gts_surface_tessellate: : a GtsSurface. : a GtsRefineFunc. : user data to be passed to .

Tessellate each triangle of with 4 triangles: the number of triangles is increased by a factor of 4. http://mathworld.wolfram.com/GeodesicDome.html

If is set to NULL a mid arc function is used: if the surface is a polyhedron with the unit sphere as circum sphere, then gts_surface_tessellate() corresponds to a geodesation step (see gts_surface_generate_sphere()).

Definition at line 2002 of file surface.c.

References create_array_tessellate(), _GtsSurface::edge_class, gts_surface_foreach_face(), tessellate_face(), TRUE, unit_sphere_arc_midvertex(), and _GtsSurface::vertex_class.

Referenced by gts_surface_generate_sphere().

Here is the call graph for this function:

void gts_surface_traverse_destroy ( GtsSurfaceTraverse t)

gts_surface_traverse_destroy: : a GtsSurfaceTraverse.

Frees all the memory allocated for .

Definition at line 2607 of file surface.c.

References gts_fifo_destroy(), gts_object_reset_reserved(), gts_surface_foreach_face(), _GtsSurfaceTraverse::q, and _GtsSurfaceTraverse::s.

Referenced by build_cdt().

Here is the call graph for this function:

GtsSurfaceTraverse* gts_surface_traverse_new ( GtsSurface s,
GtsFace f 
)

gts_surface_traverse_new: : a GtsSurface. : a GtsFace belonging to .

Returns: a new GtsSurfaceTraverse, initialized to start traversing from face of surface .

Definition at line 2545 of file surface.c.

References gts_face_has_parent_surface(), gts_fifo_new(), gts_fifo_push(), GTS_OBJECT, _GtsSurfaceTraverse::q, s, and _GtsSurfaceTraverse::s.

Referenced by build_cdt().

Here is the call graph for this function:

GtsFace* gts_surface_traverse_next ( GtsSurfaceTraverse t,
guint *  level 
)

gts_surface_traverse_next: : a GtsSurfaceTraverse. : a pointer to a guint or NULL.

Returns: the next face of the traversal in breadth-first order or NULL if no faces are left. If if not NULL, it is filled with the level of the returned face (0 for the initial face, 1 for its neighbors and so on).

Definition at line 2581 of file surface.c.

References gts_face_foreach_neighbor(), gts_fifo_pop(), GTS_OBJECT, push_neighbor(), _GtsSurfaceTraverse::q, _GtsSurfaceTraverse::s, and u().

Here is the call graph for this function:

guint gts_surface_vertex_number ( GtsSurface s)

gts_surface_vertex_number: : a GtsSurface.

Returns: the number of vertices of .

Definition at line 2388 of file surface.c.

References gts_surface_foreach_vertex(), n, and number_foreach().

Referenced by gts_hsurface_new(), gts_psurface_new(), and gts_psurface_open().

Here is the call graph for this function:

gdouble gts_surface_volume ( GtsSurface s)

gts_surface_volume: : a GtsSurface.

Returns: the signed volume of the domain bounded by the surface . It makes sense only if is a closed and orientable manifold.

Definition at line 2245 of file surface.c.

References gts_surface_foreach_face(), and volume_foreach_face().

Here is the call graph for this function:

void gts_surface_write ( GtsSurface s,
FILE *  fptr 
)

gts_surface_write: : a GtsSurface. : a file pointer.

Writes in the file an ASCII representation of . The file format is as follows.

All the lines beginning with GTS_COMMENTS are ignored. The first line contains three unsigned integers separated by spaces. The first integer is the number of vertices, nv, the second is the number of edges, ne and the third is the number of faces, nf.

Follows nv lines containing the x, y and z coordinates of the vertices. Follows ne lines containing the two indices (starting from one) of the vertices of each edge. Follows nf lines containing the three ordered indices (also starting from one) of the edges of each face.

The format described above is the least common denominator to all GTS files. Consistent with an object-oriented approach, the GTS file format is extensible. Each of the lines of the file can be extended with user-specific attributes accessible through the read() and write() virtual methods of each of the objects written (surface, vertices, edges or faces). When read with different object classes, these extra attributes are just ignored.

Definition at line 738 of file surface.c.

References _GtsSurfaceStats::edges_per_vertex, _GtsSurfaceStats::faces_per_edge, GTS_OBJECT, GTS_POINT_CLASS, gts_surface_foreach_edge(), gts_surface_foreach_face(), gts_surface_foreach_vertex(), gts_surface_stats(), _GtsRange::n, n, _GtsSurfaceStats::n_faces, _GtsSurface::vertex_class, write_edge(), write_face(), and write_vertex().

Referenced by build_cdt(), gts_delaunay_add_constraint(), and gts_psurface_write().

Here is the call graph for this function:

void gts_surface_write_oogl ( GtsSurface s,
FILE *  fptr 
)

gts_surface_write_oogl: : a GtsSurface. : a file pointer.

Writes in the file an OOGL (Geomview) representation of .

Definition at line 809 of file surface.c.

References _GtsSurfaceStats::edges_per_vertex, _GtsSurfaceStats::faces_per_edge, GTS_OBJECT_CLASS, gts_object_reset_reserved(), gts_surface_foreach_face(), gts_surface_foreach_vertex(), gts_surface_stats(), _GtsRange::n, n, _GtsSurfaceStats::n_faces, _GtsSurface::vertex_class, write_face_oogl(), and write_vertex_oogl().

Here is the call graph for this function:

void gts_surface_write_oogl_boundary ( GtsSurface s,
FILE *  fptr 
)

gts_surface_write_oogl_boundary: : a GtsSurface. : a file pointer.

Writes in the file an OOGL (Geomview) representation of the boundary of .

Definition at line 914 of file surface.c.

References gts_surface_foreach_edge(), s, and write_edge_oogl_boundary().

Here is the call graph for this function:

void gts_surface_write_vtk ( GtsSurface s,
FILE *  fptr 
)

gts_surface_write_vtk: : a GtsSurface. : a file pointer.

Writes in the file a VTK representation of .

Definition at line 860 of file surface.c.

References _GtsSurfaceStats::edges_per_vertex, gts_object_reset_reserved(), gts_surface_foreach_face(), gts_surface_foreach_vertex(), gts_surface_stats(), _GtsRange::n, n, _GtsSurfaceStats::n_faces, write_face_vtk(), and write_vertex_vtk().

Here is the call graph for this function:

gdouble gts_triangle_area ( GtsTriangle t)

gts_triangle_area: : a GtsTriangle.

Returns: the area of the triangle .

Definition at line 293 of file triangle.c.

References gts_triangle_normal(), x, and y.

Referenced by center_of_area_foreach_face(), gts_triangle_quality(), gts_vertex_principal_directions(), quality_foreach_face(), region_area(), sum_area(), surface_distance_foreach_triangle(), and triangle_cost().

Here is the call graph for this function:

GtsPoint* gts_triangle_circumcircle_center ( GtsTriangle t,
GtsPointClass point_class 
)

gts_triangle_circumcircle_center: : a GtsTriangle. : a GtsPointClass.

Returns: a new GtsPoint, center of the circumscribing circle of or NULL if the circumscribing circle is not defined.

Definition at line 853 of file triangle.c.

References det(), GTS_POINT, gts_point_new(), and gts_triangle_vertices().

Referenced by gts_delaunay_refine().

Here is the call graph for this function:

GtsTriangleClass* gts_triangle_class ( void  )

gts_triangle_class:

Returns: the GtsTriangleClass.

Definition at line 63 of file triangle.c.

References gts_object_class(), gts_object_class_new(), triangle_class_init(), and triangle_init().

Referenced by build_cdt(), delaunay_create_from_vertices(), gts_face_class(), gts_triangle_enclosing(), and triangle_destroy().

Here is the call graph for this function:

GtsTriangle* gts_triangle_enclosing ( GtsTriangleClass klass,
GSList *  points,
gdouble  scale 
)

gts_triangle_enclosing: : the class of the new triangle. : a list of GtsPoint. : a scaling factor (must be larger than one).

Builds a new triangle (including new vertices and edges) enclosing the plane projection of all the points in . This triangle is equilateral and encloses a rectangle defined by the maximum and minimum x and y coordinates of the points. is an homothetic scaling factor. If equal to one, the triangle encloses exactly the enclosing rectangle.

Returns: a new GtsTriangle.

Definition at line 593 of file triangle.c.

References gts_edge_class(), gts_edge_new(), GTS_POINT, gts_triangle_class(), gts_triangle_new(), gts_vertex_class(), gts_vertex_new(), scale, SQRT3, _GtsPoint::x, and _GtsPoint::y.

Referenced by build_cdt(), and delaunay_create_from_vertices().

Here is the call graph for this function:

void gts_triangle_interpolate_height ( GtsTriangle t,
GtsPoint p 
)

gts_triangle_interpolate_height: : a GtsTriangle. : a GtsPoint.

Fills the z-coordinate of point belonging to the plane projection of triangle with the linearly interpolated value of the z-coordinates of the vertices of .

Definition at line 1067 of file triangle.c.

References det(), _GtsTriangle::e1, GTS_POINT, GTS_SEGMENT, gts_triangle_vertex, x, _GtsPoint::x, y, _GtsPoint::y, and _GtsPoint::z.

Here is the call graph for this function:

GtsTriangle* gts_triangle_is_duplicate ( GtsTriangle t)

gts_triangle_is_duplicate: : a GtsTriangle.

Returns: a GtsTriangle different from but sharing all its edges with or NULL if there is none.

Definition at line 714 of file triangle.c.

References _GtsTriangle::e1, _GtsTriangle::e2, _GtsTriangle::e3, and _GtsEdge::triangles.

Referenced by cface_new(), gts_edge_swap(), gts_split_collapse(), gts_triangle_is_ok(), and stats_foreach_face().

gboolean gts_triangle_is_ok ( GtsTriangle t)

gts_triangle_is_ok: : a GtsTriangle.

Returns: TRUE if is a non-degenerate, non-duplicate triangle, FALSE otherwise.

Definition at line 775 of file triangle.c.

References _GtsTriangle::e1, _GtsTriangle::e2, _GtsTriangle::e3, FALSE, GTS_OBJECT, GTS_SEGMENT, gts_segments_touch, gts_triangle_is_duplicate(), and TRUE.

Here is the call graph for this function:

GtsObject* gts_triangle_is_stabbed ( GtsTriangle t,
GtsPoint p,
gdouble *  orientation 
)

gts_triangle_is_stabbed: : a GtsTriangle. : a GtsPoint. : a pointer or NULL.

Returns: one of the vertices of , one of the edges of or if any of these are stabbed by the ray starting at (included) and ending at (->x, ->y, +infty), NULL otherwise. If the ray is contained in the plane of the triangle NULL is also returned. If is not NULL, it is set to the value of the orientation of relative to (as given by gts_point_orientation_3d()).

Definition at line 1002 of file triangle.c.

References GTS_OBJECT, GTS_POINT, gts_point_orientation(), gts_point_orientation_3d(), and gts_triangle_vertices_edges().

Here is the call graph for this function:

guint gts_triangle_neighbor_number ( GtsTriangle t)

gts_triangle_neighbor_number: : a GtsTriangle.

Returns: the number of triangles neighbors of .

Definition at line 637 of file triangle.c.

References _GtsTriangle::e1, _GtsTriangle::e2, and _GtsTriangle::e3.

GSList* gts_triangle_neighbors ( GtsTriangle t)

gts_triangle_neighbors: : a GtsTriangle.

Returns: a list of GtsTriangle neighbors of .

Definition at line 664 of file triangle.c.

References _GtsTriangle::e1, _GtsTriangle::e2, and _GtsTriangle::e3.

Referenced by tri_data_new().

GtsTriangle* gts_triangle_new ( GtsTriangleClass klass,
GtsEdge e1,
GtsEdge e2,
GtsEdge e3 
)

gts_triangle_new: : a GtsTriangleClass. : a GtsEdge. : another GtsEdge touching . : another GtsEdge touching both and .

Returns: a new GtsTriangle having , and as edges.

Definition at line 141 of file triangle.c.

References GTS_OBJECT_CLASS, gts_object_new(), GTS_TRIANGLE, gts_triangle_set(), and opti_s::t.

Referenced by gts_triangle_enclosing().

Here is the call graph for this function:

void gts_triangle_normal ( GtsTriangle t,
gdouble *  x,
gdouble *  y,
gdouble *  z 
)

gts_triangle_normal: : a GtsTriangle. : the x coordinate of the normal. : the y coordinate of the normal. : the z coordinate of the normal.

Computes the coordinates of the oriented normal of as the cross-product of two edges, using the left-hand rule. The normal is not normalized. If this triangle is part of a closed and oriented surface, the normal points to the outside of the surface.

Definition at line 365 of file triangle.c.

References _GtsTriangle::e1, _GtsTriangle::e2, _GtsTriangle::e3, GTS_POINT, GTS_SEGMENT, _GtsPoint::x, _GtsPoint::y, and _GtsPoint::z.

Referenced by gts_triangle_area(), gts_triangles_angle(), gts_vertex_principal_directions(), and triangulate_face().

gdouble gts_triangle_orientation ( GtsTriangle t)

gts_triangle_orientation: : a GtsTriangle.

Checks for the orientation of the plane (x,y) projection of a triangle. See gts_point_orientation() for details. This function is geometrically robust.

Returns: a number depending on the orientation of the vertices of .

Definition at line 429 of file triangle.c.

References _GtsTriangle::e1, _GtsTriangle::e2, GTS_POINT, gts_point_orientation(), and GTS_SEGMENT.

Referenced by find_closest(), and gts_point_locate().

Here is the call graph for this function:

gdouble gts_triangle_perimeter ( GtsTriangle t)

gts_triangle_perimeter: : a GtsTriangle.

Returns: the perimeter of the triangle .

Definition at line 310 of file triangle.c.

References _GtsTriangle::e1, GTS_POINT, gts_point_distance(), GTS_SEGMENT, and gts_triangle_vertex.

Referenced by gts_triangle_quality().

Here is the call graph for this function:

gdouble gts_triangle_quality ( GtsTriangle t)

gts_triangle_quality: : a GtsTriangle.

The quality of a triangle is defined as the ratio of the square root of its surface area to its perimeter relative to this same ratio for an equilateral triangle with the same area. The quality is then one for an equilateral triangle and tends to zero for a very stretched triangle.

Returns: the quality of the triangle .

Definition at line 341 of file triangle.c.

References GOLDEN_PERIMETER, gts_triangle_area(), and gts_triangle_perimeter().

Referenced by quality_foreach_face(), and triangle_cost().

Here is the call graph for this function:

void gts_triangle_revert ( GtsTriangle t)

gts_triangle_revert: : a GtsTriangle.

Changes the orientation of triangle , turning it inside out.

Definition at line 465 of file triangle.c.

References _GtsTriangle::e1, and _GtsTriangle::e2.

void gts_triangle_set ( GtsTriangle triangle,
GtsEdge e1,
GtsEdge e2,
GtsEdge e3 
)

gts_triangle_set: : a GtsTriangle. : a GtsEdge. : another GtsEdge touching . : another GtsEdge touching both and .

Sets the edge of to , and while checking that they define a valid triangle.

Definition at line 94 of file triangle.c.

References _GtsTriangle::e1, _GtsTriangle::e2, _GtsTriangle::e3, GTS_SEGMENT, gts_segment_connect, and _GtsEdge::triangles.

Referenced by cface_expand(), gts_face_new(), and gts_triangle_new().

GtsTriangle* gts_triangle_use_edges ( GtsEdge e1,
GtsEdge e2,
GtsEdge e3 
)

gts_triangle_use_edges: : a GtsEdge. : a GtsEdge. : a GtsEdge.

Returns: a GtsTriangle having , and as edges or NULL if , and are not part of any triangle.

Definition at line 745 of file triangle.c.

References _GtsTriangle::e1, _GtsTriangle::e2, _GtsTriangle::e3, opti_s::t, and _GtsEdge::triangles.

Referenced by check_speccut(), gts_cluster_grid_add_triangle(), gts_edge_belongs_to_tetrahedron(), and gts_edge_collapse_is_valid().

GtsVertex* gts_triangle_vertex_opposite ( GtsTriangle t,
GtsEdge e 
)

gts_triangle_vertex_opposite: : a GtsTriangle. : a GtsEdge used by .

This function fails if is not an edge of .

Returns: a GtsVertex, vertex of which does not belong to .

Definition at line 163 of file triangle.c.

References _GtsTriangle::e1, _GtsTriangle::e2, _GtsTriangle::e3, and GTS_SEGMENT.

Referenced by check_speccut(), compute_candidate_points(), gts_edge_is_encroached(), gts_vertex_principal_directions(), triangle_all_candidate_points_from_edge(), and triangle_candidate_points_from_edge().

void gts_triangle_vertices_edges ( GtsTriangle t,
GtsEdge e,
GtsVertex **  v1,
GtsVertex **  v2,
GtsVertex **  v3,
GtsEdge **  e1,
GtsEdge **  e2,
GtsEdge **  e3 
)

gts_triangle_vertices_edges: : a GtsTriangle. : a GtsEdge belonging to the edges of or NULL. : a GtsVertex used by . : a GtsVertex used by . : a GtsVertex used by . : a GtsEdge used by . : a GtsEdge used by . : a GtsEdge used by .

Given and , returns , , , , and . has and as vertices, has and as vertices and has and as vertices. , and respects the orientation of . If is not NULL, and are identical.

Definition at line 525 of file triangle.c.

References _GtsTriangle::e1, _GtsTriangle::e2, _GtsTriangle::e3, and GTS_SEGMENT.

Referenced by gts_delaunay_add_vertex_to_face(), gts_edge_swap(), gts_matrix_projection(), gts_point_triangle_closest(), gts_point_triangle_distance2(), gts_triangle_is_stabbed(), gts_vertex_fan_oriented(), intersection_orientation(), midvertex_insertion(), point_locate(), remove_intersected_edge(), remove_intersected_vertex(), segment_triangle_intersection(), and triangle_next_edge().

gdouble gts_triangles_angle ( GtsTriangle t1,
GtsTriangle t2 
)

gts_triangles_angle: : a GtsTriangle. : a GtsTriangle.

Returns: the value (in radians) of the angle between and .

Definition at line 226 of file triangle.c.

References gts_triangle_normal(), and M_PI.

Referenced by quality_foreach_edge().

Here is the call graph for this function:

gboolean gts_triangles_are_compatible ( GtsTriangle t1,
GtsTriangle t2,
GtsEdge e 
)

gts_triangles_are_compatible: : a GtsTriangle. : a GtsTriangle. : a GtsEdge used by both and .

Checks if and have compatible orientations i.e. if and can be part of the same surface without conflict in the surface normal orientation.

Returns: TRUE if and are compatible, FALSE otherwise.

Definition at line 259 of file triangle.c.

References _GtsTriangle::e1, _GtsTriangle::e2, _GtsTriangle::e3, FALSE, GTS_SEGMENT, and TRUE.

Referenced by next_compatible_face(), orientable_foreach_edge(), and triangle_is_incompatible().

gboolean gts_triangles_are_folded ( GSList *  triangles,
GtsVertex A,
GtsVertex B,
gdouble  max 
)

gts_triangles_are_folded: : a list of GtsTriangle. : a GtsVertex. : another GtsVertex. : the maximum value of the square of the cosine of the angle between two triangles.

Given a list of triangles sharing and as vertices, checks if any two triangles in the list make an angle larger than a given value defined by .

Returns: TRUE if any pair of triangles in makes an angle larger than the maximum value, FALSE otherwise.

Definition at line 960 of file triangle.c.

References FALSE, GTS_POINT, points_are_folded(), triangle_use_vertices(), and TRUE.

Referenced by gts_edge_collapse_creates_fold().

Here is the call graph for this function:

GtsEdge* gts_triangles_common_edge ( GtsTriangle t1,
GtsTriangle t2 
)

gts_triangles_common_edge: : a GtsTriangle. : a GtsTriangle.

Returns: a GtsEdge common to both and or NULL if and do not share any edge.

Definition at line 692 of file triangle.c.

References _GtsTriangle::e1, _GtsTriangle::e2, and _GtsTriangle::e3.

GSList* gts_triangles_from_edges ( GSList *  edges)

gts_triangles_from_edges: : a list of GtsEdge.

Builds a list of unique triangles which have one of their edges in .

Returns: the list of triangles.

Definition at line 484 of file triangle.c.

References GTS_EDGE, hash(), and opti_s::t.

Here is the call graph for this function:

void gts_vector4_print ( GtsVector4  v,
FILE *  fptr 
)

gts_vector4_print: : a GtsVector4. : a file descriptor.

Print to file .

Definition at line 414 of file matrix.c.

void gts_vector_print ( GtsVector  v,
FILE *  fptr 
)

gts_vector_print: : a GtsVector. : a file descriptor.

Print to file .

Definition at line 398 of file matrix.c.

Referenced by gts_volume_optimized_vertex().

gboolean gts_vertex_encroaches_edge ( GtsVertex v,
GtsEdge e 
)

gts_vertex_encroaches_edge: : a GtsVertex. : a GtsEdge.

Returns: TRUE if is strictly contained in the diametral circle of , FALSE otherwise.

Definition at line 31 of file refine.c.

References FALSE, GTS_POINT, GTS_SEGMENT, TRUE, _GtsPoint::x, and _GtsPoint::y.

GSList* gts_vertex_faces ( GtsVertex v,
GtsSurface surface,
GSList *  list 
)

gts_vertex_faces: : a GtsVertex. : a GtsSurface or NULL. : a list of GtsFace.

Adds all the GtsFace belonging to (if not NULL) which share as a vertex and do not already belong to .

Returns: the new list of unique GtsFace belonging to which share as a vertex.

Definition at line 259 of file vertex.c.

References GTS_EDGE, GTS_FACE, gts_face_has_parent_surface(), GTS_IS_EDGE, GTS_IS_FACE, s, and _GtsVertex::segments.

Referenced by gts_vertex_gaussian_curvature(), gts_vertex_mean_curvature_normal(), and gts_vertex_principal_directions().

Here is the call graph for this function:

GSList* gts_vertex_fan_oriented ( GtsVertex v,
GtsSurface surface 
)

gts_vertex_fan_oriented: : a GtsVertex. : a GtsSurface.

Returns: a list of GtsEdge describing in counterclockwise order the boundary of the fan of summit , the faces of the fan belonging to .

Definition at line 495 of file vertex.c.

References edge_fan_list(), f, gts_face_has_parent_surface(), GTS_IS_EDGE, GTS_IS_FACE, GTS_TRIANGLE, gts_triangle_vertices_edges(), _GtsVertex::segments, and _GtsEdge::triangles.

Referenced by gts_delaunay_remove_vertex(), gts_vertex_gaussian_curvature(), and gts_vertex_mean_curvature_normal().

Here is the call graph for this function:

gboolean gts_vertex_gaussian_curvature ( GtsVertex v,
GtsSurface s,
gdouble *  Kg 
)

gts_vertex_gaussian_curvature: : a GtsVertex. : a GtsSurface. : the Discrete Gaussian Curvature approximation at .

Computes the Discrete Gaussian Curvature approximation at .

This approximation is from the paper: Discrete Differential-Geometry Operators for Triangulated 2-Manifolds Mark Meyer, Mathieu Desbrun, Peter Schroder, Alan H. Barr VisMath '02, Berlin (Germany) http://www-grail.usc.edu/pubs.html

Returns: TRUE if the operator could be evaluated, FALSE if the evaluation failed for some reason ( is boundary or is the endpoint of a non-manifold edge.)

Definition at line 214 of file curvature.c.

References angle_from_cotan(), f, FALSE, GTS_SEGMENT, gts_vertex_faces(), gts_vertex_fan_oriented(), gts_vertex_is_boundary(), M_PI, region_area(), and TRUE.

Here is the call graph for this function:

gboolean gts_vertex_is_boundary ( GtsVertex v,
GtsSurface surface 
)

gts_vertex_is_boundary: : a GtsVertex. : a GtsSurface or NULL.

Returns: TRUE if is used by a GtsEdge boundary of as determined by gts_edge_is_boundary(), FALSE otherwise.

Definition at line 331 of file vertex.c.

References FALSE, gts_edge_is_boundary(), GTS_IS_EDGE, _GtsVertex::segments, and TRUE.

Referenced by gts_edge_collapse_is_valid(), gts_vertex_gaussian_curvature(), and gts_vertex_mean_curvature_normal().

Here is the call graph for this function:

guint gts_vertex_is_contact ( GtsVertex v,
gboolean  sever 
)

gts_vertex_is_contact: : a GtsVertex. : if TRUE and if is a contact vertex between two or more sets of connected triangles replaces it with as many vertices, clones of .

Returns: the number of sets of connected triangles sharing as a contact vertex.

Definition at line 621 of file vertex.c.

References GTS_OBJECT, gts_object_clone(), GTS_VERTEX, gts_vertex_triangles(), replace_vertex(), and triangle_next().

Referenced by gts_psurface_new().

Here is the call graph for this function:

gboolean gts_vertex_is_unattached ( GtsVertex v)

gts_vertex_is_unattached: : a GtsVertex.

Returns: TRUE if is not the endpoint of any GtsSegment, FALSE otherwise.

Definition at line 149 of file vertex.c.

References FALSE, _GtsVertex::segments, and TRUE.

Referenced by cluster_destroy().

gboolean gts_vertex_mean_curvature_normal ( GtsVertex v,
GtsSurface s,
GtsVector  Kh 
)

gts_vertex_mean_curvature_normal: : a GtsVertex. : a GtsSurface. : the Mean Curvature Normal at .

Computes the Discrete Mean Curvature Normal approximation at . The mean curvature at is half the magnitude of the vector .

Note: the normal computed is not unit length, and may point either into or out of the surface, depending on the curvature at . It is the responsibility of the caller of the function to use the mean curvature normal appropriately.

This approximation is from the paper: Discrete Differential-Geometry Operators for Triangulated 2-Manifolds Mark Meyer, Mathieu Desbrun, Peter Schroder, Alan H. Barr VisMath '02, Berlin (Germany) http://www-grail.usc.edu/pubs.html

Returns: TRUE if the operator could be evaluated, FALSE if the evaluation failed for some reason ( is boundary or is the endpoint of a non-manifold edge.)

Definition at line 132 of file curvature.c.

References cotan(), f, FALSE, GTS_POINT, GTS_SEGMENT, gts_vertex_faces(), gts_vertex_fan_oriented(), gts_vertex_is_boundary(), region_area(), and TRUE.

Here is the call graph for this function:

GSList* gts_vertex_neighbors ( GtsVertex v,
GSList *  list,
GtsSurface surface 
)

gts_vertex_neighbors: : a GtsVertex. : a list of GtsVertex. : a GtsSurface or NULL.

Adds to all the GtsVertex connected to by a GtsSegment and not already in . If is not NULL only the vertices connected to by an edge belonging to are considered.

Returns: the new list of unique GtsVertex.

Definition at line 300 of file vertex.c.

References GTS_EDGE, gts_edge_has_parent_surface(), GTS_IS_EDGE, s, _GtsVertex::segments, _GtsSegment::v1, and _GtsSegment::v2.

Referenced by check_adj_pushing_vertex(), delaunay_check(), edge_shape_cost(), and gts_volume_optimized_vertex().

Here is the call graph for this function:

GtsVertex* gts_vertex_new ( GtsVertexClass klass,
gdouble  x,
gdouble  y,
gdouble  z 
)

gts_vertex_new: : a GtsVertexClass. : the x-coordinate of the vertex to create. : the y-coordinate of the vertex to create. : the y-coordinate of the vertex to create.

Returns: a new GtsVertex with , and as coordinates.

Definition at line 100 of file vertex.c.

References GTS_OBJECT_CLASS, gts_object_new(), GTS_POINT, gts_point_set(), and GTS_VERTEX.

Referenced by create_board_edge(), foreach_vertex_copy(), generate_icosahedron(), get_vertex(), get_vertex_bcl(), gts_cluster_new(), gts_iso_slice_fill(), gts_iso_slice_fill_cartesian(), gts_segment_midvertex(), gts_triangle_enclosing(), gts_volume_optimized_vertex(), insert_centre_point(), insert_constraint_edge(), insert_vertex(), new_temp_toporoutervertex(), read_lines(), rect_with_attachments(), split_edge(), unit_sphere_arc_midvertex(), and vertex_intersect().

Here is the call graph for this function:

GtsVertexClass* gts_vertex_normal_class ( void  )

Definition at line 737 of file vertex.c.

References GTS_OBJECT_CLASS, gts_object_class_new(), gts_vertex_class(), and gts_vertex_normal_class_init().

Here is the call graph for this function:

void gts_vertex_principal_curvatures ( gdouble  Kh,
gdouble  Kg,
gdouble *  K1,
gdouble *  K2 
)

gts_vertex_principal_curvatures: : mean curvature. : Gaussian curvature. : first principal curvature. : second principal curvature.

Computes the principal curvatures at a point given the mean and Gaussian curvatures at that point.

The mean curvature can be computed as one-half the magnitude of the vector computed by gts_vertex_mean_curvature_normal().

The Gaussian curvature can be computed with gts_vertex_gaussian_curvature().

Definition at line 278 of file curvature.c.

Referenced by gts_vertex_principal_directions().

void gts_vertex_principal_directions ( GtsVertex v,
GtsSurface s,
GtsVector  Kh,
gdouble  Kg,
GtsVector  e1,
GtsVector  e2 
)

gts_vertex_principal_directions: : a GtsVertex. : a GtsSurface. : mean curvature normal (a GtsVector). : Gaussian curvature (a gdouble). : first principal curvature direction (direction of largest curvature). : second principal curvature direction.

Computes the principal curvature directions at a point given and , the mean curvature normal and Gaussian curvatures at that point, computed with gts_vertex_mean_curvature_normal() and gts_vertex_gaussian_curvature(), respectively.

Note that this computation is very approximate and tends to be unstable. Smoothing of the surface or the principal directions may be necessary to achieve reasonable results.

Definition at line 335 of file curvature.c.

References angle_obtuse(), c, cotan(), eigenvector(), gts_edge_face_number(), GTS_FACE, gts_face_has_parent_surface(), GTS_IS_EDGE, GTS_IS_FACE, GTS_POINT, GTS_SEGMENT, GTS_TRIANGLE, gts_triangle_area(), gts_triangle_normal(), gts_triangle_vertex_opposite(), gts_vector_cross, gts_vector_init, gts_vector_norm, gts_vector_normalize, gts_vector_scalar, gts_vertex_faces(), gts_vertex_principal_curvatures(), linsolve(), N, _GtsVertex::segments, triangle_obtuse(), _GtsEdge::triangles, x, and y.

Here is the call graph for this function:

void gts_vertex_replace ( GtsVertex v,
GtsVertex with 
)

gts_vertex_replace: : a GtsVertex. : another GtsVertex.

Replaces vertex with vertex . and must be different. All the GtsSegment which have has one of their vertices are updated. The segments list of vertex is freed and ->segments is set to NULL.

Definition at line 121 of file vertex.c.

References s, _GtsVertex::segments, _GtsSegment::v1, and _GtsSegment::v2.

Referenced by edge_collapse(), and gts_vertices_merge().

GSList* gts_vertex_triangles ( GtsVertex v,
GSList *  list 
)

gts_vertex_triangles: : a GtsVertex. : a list of GtsTriangle.

Adds all the GtsTriangle which share as a vertex and do not already belong to .

Returns: the new list of unique GtsTriangle which share as a vertex.

Definition at line 224 of file vertex.c.

References GTS_EDGE, GTS_IS_EDGE, s, and _GtsVertex::segments.

Referenced by compute_candidate_points(), edge_volume_cost(), gts_delaunay_remove_vertex(), gts_edge_collapse_creates_fold(), gts_edge_is_contact(), gts_psurface_new(), gts_split_collapse(), gts_vertex_is_contact(), gts_volume_optimized_vertex(), remove_intersected_vertex(), and vertex_encroaches().

GSList* gts_vertices_from_segments ( GSList *  segments)

gts_vertices_from_segments: : a list of GtsSegment.

Returns: a list of GtsVertex, vertices of a GtsSegment in . Each element in the list is unique (no duplicates).

Definition at line 190 of file vertex.c.

References hash(), s, _GtsSegment::v1, and _GtsSegment::v2.

Here is the call graph for this function:

GList* gts_vertices_merge ( GList *  vertices,
gdouble  epsilon,
gboolean(*)(GtsVertex *, GtsVertex *)  check 
)

gts_vertices_merge: : a list of GtsVertex. : half the size of the bounding box to consider for each vertex. : function called for each pair of vertices about to be merged or NULL.

For each vertex v in look if there are any vertex of contained in a box centered on v of size 2*. If there are and if is not NULL and returns TRUE, replace them with v (using gts_vertex_replace()), destroy them and remove them from list. This is done efficiently using Kd-Trees.

Returns: the updated list of vertices.

Definition at line 363 of file vertex.c.

References check, FALSE, gts_allow_floating_vertices, gts_bbox_class(), gts_bbox_new(), gts_kdtree_destroy, gts_kdtree_new(), gts_kdtree_range(), GTS_OBJECT, gts_object_destroy(), GTS_POINT, gts_vertex_replace(), selected, TRUE, x, and y.

Here is the call graph for this function:

gdouble gts_volume_optimized_cost ( GtsEdge e,
GtsVolumeOptimizedParams params 
)
GtsVertex* gts_volume_optimized_vertex ( GtsEdge edge,
GtsVertexClass klass,
GtsVolumeOptimizedParams params 
)

gts_volume_optimized_vertex: : a GtsEdge. : a GtsVertexClass to be used for the new vertex. : a #GtsVolumeOptimizedParms.

Returns: a GtsVertex which can be used to replace for an edge collapse operation. The position of the vertex is optimized in order to minimize the changes in area and volume for the surface using . The volume enclosed by the surface is locally preserved. For more details see "Fast and memory efficient polygonal simplification" (1998) and "Evaluation of memoryless simplification" (1999) by Lindstrom and Turk.

Definition at line 236 of file vopt.c.

References boundary_preservation(), _GtsVolumeOptimizedParams::boundary_weight, c, f, gts_edge_is_boundary(), GTS_IS_EDGE, GTS_IS_FACE, gts_matrix3_inverse(), gts_matrix_compatible_row(), gts_matrix_destroy(), gts_matrix_new(), gts_matrix_print(), gts_matrix_quadratic_optimization(), gts_matrix_zero(), GTS_POINT, gts_point_distance2(), GTS_SEGMENT, gts_vector_print(), gts_vertex_neighbors(), gts_vertex_new(), gts_vertex_triangles(), n, _GtsVertex::segments, _GtsVolumeOptimizedParams::shape_weight, triangle_normal(), _GtsVolumeOptimizedParams::volume_weight, _GtsPoint::x, _GtsPoint::y, and _GtsPoint::z.

Referenced by gts_volume_optimized_cost().

Here is the call graph for this function:

GtsWGEdgeClass* gts_wgedge_class ( void  )

gts_wgedge_class:

Returns: the GtsWGEdgeClass.

Definition at line 704 of file graph.c.

References gts_gedge_class(), GTS_OBJECT_CLASS, gts_object_class_new(), wgedge_class_init(), and wgedge_init().

Referenced by gts_graph_bisection_new(), and pgraph_init().

Here is the call graph for this function:

GtsWGEdge* gts_wgedge_new ( GtsWGEdgeClass klass,
GtsGNode g1,
GtsGNode g2,
gfloat  weight 
)

gts_wgedge_new: : a GtsWGEdgeClass. : a GtsGNode. : another GtsGNode. : the weight of the new edge.

Returns: a new GtsWGEdge of weight linking and .

Definition at line 734 of file graph.c.

References GTS_GEDGE_CLASS, gts_gedge_new(), GTS_WGEDGE, and _GtsWGEdge::weight.

Referenced by gts_gnode_split_collapse().

Here is the call graph for this function:

GtsWGNodeClass* gts_wgnode_class ( void  )

gts_wgnode_class:

Returns: the GtsWGNodeClass.

Definition at line 306 of file graph.c.

References gts_gnode_class(), GTS_OBJECT_CLASS, gts_object_class_new(), wgnode_class_init(), and wgnode_init().

Referenced by gts_graph_bisection_new().

Here is the call graph for this function:

GtsWGNode* gts_wgnode_new ( GtsWGNodeClass klass,
gfloat  weight 
)

gts_wgnode_new: : a GtsWGNodeClass. : the weight of the GtsWGNode to create.

Returns: a new GtsWGNode of weight .

Definition at line 334 of file graph.c.

References GTS_GNODE_CLASS, gts_gnode_new(), GTS_WGNODE, n, and _GtsWGNode::weight.

Referenced by gts_pgraph_new().

Here is the call graph for this function:

GtsWGraphClass* gts_wgraph_class ( void  )

gts_wgraph_class:

Returns: the GtsWGraphClass.

Definition at line 1596 of file graph.c.

References gts_graph_class(), GTS_OBJECT_CLASS, gts_object_class_new(), wgraph_class_init(), and wgraph_init().

Referenced by wgraph_add(), and wgraph_remove().

Here is the call graph for this function:

gfloat gts_wgraph_weight_max ( GtsWGraph wg)

gts_wgraph_weight_max: : a GtsWGraph.

Returns: the maximum weight of any vertices belonging to .

Definition at line 1631 of file graph.c.

References GTS_CONTAINER, gts_container_foreach(), and weight_max().

Here is the call graph for this function:


Variable Documentation

GTS_C_VAR gboolean gts_allow_floating_edges

Definition at line 593 of file gts.h.

GTS_C_VAR gboolean gts_allow_floating_faces

Definition at line 746 of file gts.h.

GTS_C_VAR gboolean gts_allow_floating_gnodes

Definition at line 2125 of file gts.h.

GTS_C_VAR const guint gts_binary_age

Definition at line 53 of file gts.h.

GTS_C_VAR const guint gts_interface_age

Definition at line 52 of file gts.h.

GTS_C_VAR const guint gts_major_version

Definition at line 49 of file gts.h.

GTS_C_VAR const guint gts_micro_version

Definition at line 51 of file gts.h.

GTS_C_VAR const guint gts_minor_version

Definition at line 50 of file gts.h.