pcb 4.1.1
An interactive printed circuit board layout editor.
|
#include <stdio.h>
#include <glib.h>
Go to the source code of this file.
#define GTS_BBOX | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsBBox,\ gts_bbox_class ())
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 | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsBBoxClass,\ gts_bbox_class ())
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, | |
p | |||
) |
((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_CHECK_VERSION | ( | major, | |
minor, | |||
micro | |||
) |
(gts_major_version > (major) || \ (gts_major_version == (major) && gts_minor_version > (minor)) || \ (gts_major_version == (major) && gts_minor_version == (minor) && \ gts_micro_version >= (micro)))
#define GTS_CLUSTER | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsCluster,\ gts_cluster_class ())
Definition at line 1839 of file gts.h.
Referenced by cluster_destroy(), and gts_cluster_new().
#define GTS_CLUSTER_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsClusterClass,\ gts_cluster_class())
Definition at line 1842 of file gts.h.
Referenced by gts_cluster_add(), and gts_cluster_update().
#define GTS_CLUSTER_GRID | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsClusterGrid,\ gts_cluster_grid_class ())
Definition at line 1882 of file gts.h.
Referenced by cluster_grid_destroy(), and gts_cluster_grid_new().
#define GTS_CLUSTER_GRID_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsClusterGridClass,\ gts_cluster_grid_class())
#define GTS_COLOR_VERTEX | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsColorVertex,\ gts_color_vertex_class ())
#define GTS_COMMENTS "#!" |
Definition at line 61 of file gts.h.
Referenced by file_new().
#define GTS_CONSTRAINT | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsConstraint,\ gts_constraint_class ())
GTS_CONSTRAINT: : a descendant of GtsConstraint.
Casts to GtsConstraint.
#define GTS_CONSTRAINT_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsConstraintClass,\ gts_constraint_class ())
GTS_CONSTRAINT_CLASS: : a desscendant of GtsConstraintClass.
Casts to GtsConstraintClass.
#define GTS_CONTAINEE | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsContainee,\ gts_containee_class ())
Definition at line 1946 of file gts.h.
Referenced by add_unused(), bisection_children(), boundary_node1(), boundary_node2(), connect_edge(), create_node(), create_segment_edge(), gedge_destroy(), gts_containee_new(), gts_gedge_new(), gts_gnode_degree(), gts_gnode_foreach_edge(), gts_gnode_foreach_neighbor(), gts_gnode_move_cost(), gts_gnode_split_collapse(), gts_gnode_split_expand(), gts_graph_bfgg_bisection(), gts_graph_bisection_bkl_refine(), gts_graph_bisection_kl_refine(), gts_graph_bubble_partition(), gts_graph_ggg_bisection(), gts_graph_read(), gts_graph_read_jostle(), gts_graph_traverse_new(), match_neighbor(), neighbor_count(), node_cost(), partition_update(), restore_edge(), slist_containee_destroy(), sum_edge_cuts_weight(), and update_neighbors().
#define GTS_CONTAINEE_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsContaineeClass,\ gts_containee_class())
Definition at line 1949 of file gts.h.
Referenced by container_add(), container_remove(), gedge_class_init(), gnode_class_init(), gnode_remove_container(), gts_containee_is_contained(), gts_containee_replace(), remove_container(), and slist_containee_class_init().
#define GTS_CONTAINER | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsContainer,\ gts_container_class ())
Definition at line 2003 of file gts.h.
Referenced by add_unused(), bisection_children(), boundary_node1(), boundary_node2(), connect_edge(), container_clone(), container_destroy(), create_node(), create_segment_edge(), gedge_destroy(), gedge_is_contained(), gedge_remove_container(), gnode_split_destroy(), gts_container_new(), gts_gedge_new(), gts_gnode_degree(), gts_gnode_foreach_edge(), gts_gnode_foreach_neighbor(), gts_gnode_move_cost(), gts_gnode_split_collapse(), gts_gnode_split_expand(), gts_graph_bfgg_bisection(), gts_graph_bisection_bkl_refine(), gts_graph_bisection_check(), gts_graph_bisection_kl_refine(), gts_graph_bisection_new(), gts_graph_bubble_partition(), gts_graph_edges_cut(), gts_graph_edges_cut_weight(), gts_graph_foreach_edge(), gts_graph_ggg_bisection(), gts_graph_print_stats(), gts_graph_read(), gts_graph_read_jostle(), gts_graph_traverse_new(), gts_graph_weight(), gts_graph_write(), gts_graph_write_dot(), gts_pgraph_down(), gts_pgraph_new(), gts_surface_graph_surface(), gts_wgraph_weight_max(), match_neighbor(), maximal_matching(), neighbor_count(), node_cost(), partition_update(), restore_edge(), sum_edge_cuts_weight(), and update_neighbors().
#define GTS_CONTAINER_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsContainerClass,\ gts_container_class())
Definition at line 2006 of file gts.h.
Referenced by gts_container_add(), gts_container_foreach(), gts_container_remove(), gts_container_size(), hash_container_add(), hash_container_class_init(), hash_container_remove(), slist_container_add(), slist_container_class_init(), slist_container_remove(), wgraph_add(), wgraph_class_init(), and wgraph_remove().
#define GTS_EDGE | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsEdge,\ gts_edge_class ())
Definition at line 575 of file gts.h.
Referenced by cface_expand(), cface_new(), check_edge(), check_speccut(), compute_candidate_points(), edge_clone(), edge_collapse(), edge_destroy(), get_edge(), gts_cluster_grid_add_triangle(), gts_delaunay_add_vertex_to_face(), gts_edge_belongs_to_tetrahedron(), gts_edge_collapse_creates_fold(), gts_edge_is_duplicate(), gts_edge_new(), gts_edge_swap(), gts_edges_from_vertices(), gts_faces_from_edges(), gts_isosurface_slice(), gts_split_collapse(), gts_split_new(), gts_triangles_from_edges(), gts_vertex_faces(), gts_vertex_neighbors(), gts_vertex_triangles(), intersect_edges(), opposite_triangle(), quality_foreach_edge(), split_encroached(), swap_if_in_circle(), triangle_all_candidate_points_from_edge(), triangle_candidate_points_from_edge(), triangulate_loop(), triangulate_polygon(), unconstrain(), and write_edge_oogl_boundary().
#define GTS_EDGE_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsEdgeClass,\ gts_edge_class ())
Definition at line 578 of file gts.h.
Referenced by build_cdt(), check_speccut(), delaunay_create_from_vertices(), edge_inter_new(), insert_constraint_edge(), split_encroached(), and unconstrain().
#define GTS_FACE | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsFace,\ gts_face_class ())
Definition at line 728 of file gts.h.
Referenced by delaunay_check(), face_clone(), face_destroy(), find_closest(), gts_delaunay_remove_hull(), gts_edge_face_number(), gts_edge_has_any_parent_surface(), gts_edge_swap(), gts_face_foreach_neighbor(), gts_face_neighbor_number(), gts_face_neighbors(), gts_face_new(), gts_faces_from_edges(), gts_psurface_read_vertex(), gts_split_collapse(), gts_vertex_faces(), gts_vertex_principal_directions(), intersect_edges(), neighbor(), remove_intersected_vertex(), split_edge(), stats_foreach_face(), and traverse_manifold().
#define GTS_FACE_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsFaceClass,\ gts_face_class ())
#define GTS_FNODE | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsFNode,\ gts_fnode_class ())
Definition at line 2226 of file gts.h.
Referenced by add_to_surface(), fnode_write(), and gts_fnode_new().
#define GTS_FNODE_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsFNodeClass,\ gts_fnode_class())
#define GTS_GEDGE | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsGEdge,\ gts_gedge_class ())
Definition at line 2259 of file gts.h.
Referenced by gedge_destroy(), gedge_is_contained(), gedge_remove_container(), and gts_gedge_new().
#define GTS_GEDGE_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsGEdgeClass,\ gts_gedge_class())
Definition at line 2262 of file gts.h.
Referenced by graph_read(), gts_gedge_weight(), gts_pgedge_new(), gts_wgedge_new(), pgedge_class_init(), wgedge_class_init(), and write_dot_edge().
#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 | ) |
GTS_OBJECT_CAST (obj,\ GtsGNode,\ gts_gnode_class ())
Definition at line 2097 of file gts.h.
Referenced by create_segment_edge(), gts_gnode_new(), gts_graph_read(), gts_graph_read_jostle(), gts_pgraph_new(), wgraph_add(), and wgraph_remove().
#define GTS_GNODE_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsGNodeClass,\ gts_gnode_class())
Definition at line 2100 of file gts.h.
Referenced by graph_read(), gts_gnode_weight(), gts_ngnode_new(), gts_wgnode_new(), pnode_class_init(), wgnode_class_init(), and write_dot_node().
#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) |
Definition at line 2105 of file gts.h.
Referenced by boundary_node1(), boundary_node2(), gts_gnode_degree(), gts_gnode_foreach_edge(), gts_gnode_foreach_neighbor(), gts_gnode_move_cost(), gts_gnode_split_collapse(), gts_graph_bisection_kl_refine(), match_neighbor(), node_cost(), sum_edge_cuts_weight(), and update_neighbors().
#define GTS_GNODE_SPLIT | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsGNodeSplit,\ gts_gnode_split_class ())
Definition at line 2451 of file gts.h.
Referenced by gnode_split_destroy(), and gts_gnode_split_new().
#define GTS_GNODE_SPLIT_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsGNodeSplitClass,\ gts_gnode_split_class())
#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 | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsGraph,\ gts_graph_class ())
Definition at line 2352 of file gts.h.
Referenced by graph_read(), graph_write(), gts_graph_bisection_new(), gts_graph_bubble_partition(), gts_graph_new(), gts_graph_read(), gts_segments_graph_new(), and gts_surface_graph_new().
#define GTS_GRAPH_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsGraphClass,\ gts_graph_class())
Definition at line 2355 of file gts.h.
Referenced by gts_graph_bfgg_bisection(), gts_graph_ggg_bisection(), gts_graph_read(), gts_graph_weight(), and wgraph_class_init().
#define GTS_HASH_CONTAINER | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsHashContainer,\ gts_hash_container_class ())
Definition at line 2039 of file gts.h.
Referenced by hash_container_add(), hash_container_destroy(), hash_container_foreach(), hash_container_remove(), and hash_container_size().
#define GTS_HASH_CONTAINER_CLASS | ( | klass | ) |
#define GTS_HSPLIT | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsHSplit,\ gts_hsplit_class ())
Definition at line 1536 of file gts.h.
Referenced by gts_hsplit_collapse(), gts_hsplit_expand(), gts_hsplit_force_expand(), and gts_hsplit_new().
#define GTS_HSPLIT_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsHSplitClass,\ gts_hsplit_class ())
#define GTS_HSURFACE | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsHSurface,\ gts_hsurface_class ())
Definition at line 1570 of file gts.h.
Referenced by gts_hsurface_new(), and hsurface_destroy().
#define GTS_HSURFACE_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsHSurfaceClass,\ gts_hsurface_class ())
#define GTS_IS_BBOX | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_bbox_class ()))
GTS_IS_BBOX: : a GtsObject.
Evaluates to TRUE if is a GtsBBox, FALSE otherwise.
#define GTS_IS_CLUSTER | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_cluster_class ()))
#define GTS_IS_CLUSTER_GRID | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_cluster_grid_class ()))
#define GTS_IS_COLOR_VERTEX | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_color_vertex_class ()))
#define GTS_IS_CONSTRAINT | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_constraint_class ()))
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 | ) |
(gts_object_is_from_class (obj,\ gts_containee_class ()))
#define GTS_IS_CONTAINER | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_container_class ()))
#define GTS_IS_EDGE | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_edge_class ()))
Definition at line 573 of file gts.h.
Referenced by edge_boundary_cost(), get_edge(), gts_delaunay_add_vertex_to_face(), gts_edge_belongs_to_tetrahedron(), gts_edge_collapse_creates_fold(), gts_edge_collapse_is_valid(), gts_edge_is_duplicate(), gts_edge_swap(), gts_edges_from_vertices(), gts_vertex_faces(), gts_vertex_fan_oriented(), gts_vertex_is_boundary(), gts_vertex_neighbors(), gts_vertex_principal_directions(), gts_vertex_triangles(), gts_volume_optimized_vertex(), pgedge_write(), stats_foreach_vertex(), swap_if_in_circle(), triangulate_loop(), triangulate_polygon(), update_2nd_closest_neighbors(), and vertex_normal_attributes().
#define GTS_IS_FACE | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_face_class ()))
Definition at line 726 of file gts.h.
Referenced by cface_new(), check_orientation(), create_edge(), edge_fan_list(), edge_volume_cost(), gts_delaunay_remove_vertex(), gts_edge_face_number(), gts_edge_has_any_parent_surface(), gts_edge_has_parent_surface(), gts_edge_is_boundary(), gts_edge_is_encroached(), gts_edge_manifold_faces(), gts_edge_swap(), gts_face_foreach_neighbor(), gts_face_neighbor_number(), gts_face_neighbors(), gts_faces_from_edges(), gts_split_collapse(), gts_vertex_faces(), gts_vertex_fan_oriented(), gts_vertex_principal_directions(), gts_volume_optimized_vertex(), neighbor(), next_compatible_face(), orientable_foreach_edge(), remove_intersected_vertex(), remove_triangles(), split_edge(), triangle_is_incompatible(), and vertex_encroaches().
#define GTS_IS_FNODE | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_fnode_class ()))
Definition at line 2232 of file gts.h.
Referenced by add_to_surface().
#define GTS_IS_GEDGE | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_gedge_class ()))
#define GTS_IS_GNODE | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_gnode_class ()))
Definition at line 2103 of file gts.h.
Referenced by gts_gnode_split_new().
#define GTS_IS_GNODE_SPLIT | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_gnode_split_class ()))
Definition at line 2457 of file gts.h.
Referenced by gts_gnode_split_new().
#define GTS_IS_GRAPH | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_graph_class ()))
#define GTS_IS_HASH_CONTAINER | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_hash_container_class ()))
#define GTS_IS_HSPLIT | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_hsplit_class ()))
Definition at line 1534 of file gts.h.
Referenced by gts_hsplit_collapse(), and gts_hsplit_expand().
#define GTS_IS_HSURFACE | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_hsurface_class ()))
#define GTS_IS_LIST_FACE | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_list_face_class ()))
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 | ) |
(gts_object_is_from_class (obj,\ gts_nedge_class ()))
Definition at line 1797 of file gts.h.
Referenced by intersects(), and pgedge_write().
#define GTS_IS_NFACE | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_nface_class ()))
Definition at line 1820 of file gts.h.
Referenced by intersects().
#define GTS_IS_NGNODE | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_ngnode_class ()))
#define GTS_IS_NVERTEX | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_nvertex_class ()))
Definition at line 1774 of file gts.h.
Referenced by intersects(), and pnode_write().
#define GTS_IS_OBJECT | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_object_class ()))
#define GTS_IS_PGEDGE | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_pgedge_class ()))
#define GTS_IS_PGRAPH | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_pgraph_class ()))
#define GTS_IS_PNODE | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_pnode_class ()))
#define GTS_IS_POINT | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_point_class ()))
#define GTS_IS_PSURFACE | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_psurface_class ()))
#define GTS_IS_SEGMENT | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_segment_class ()))
#define GTS_IS_SLIST_CONTAINEE | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_slist_containee_class ()))
#define GTS_IS_SLIST_CONTAINER | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_slist_container_class ()))
#define GTS_IS_SPLIT | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_split_class ()))
Definition at line 1418 of file gts.h.
Referenced by gts_hsurface_new(), gts_psurface_write(), gts_split_height(), gts_split_new(), split_depth_traverse_post_order(), split_depth_traverse_pre_order(), split_traverse_post_order(), and split_traverse_pre_order().
#define GTS_IS_SURFACE | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_surface_class ()))
#define GTS_IS_SURFACE_INTER | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_surface_inter_class ()))
GTS_IS_SURFACE_INTER: : a GtsObject.
Evaluates to TRUE if is a GtsSurfaceInter, FALSE otherwise.
#define GTS_IS_TRIANGLE | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_triangle_class ()))
Definition at line 634 of file gts.h.
Referenced by vertex_normal_attributes().
#define GTS_IS_VERTEX | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_vertex_class ()))
Definition at line 431 of file gts.h.
Referenced by gts_split_new().
#define GTS_IS_VERTEX_NORMAL | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_vertex_normal_class ()))
Definition at line 499 of file gts.h.
Referenced by vertex_normal_attributes().
#define GTS_IS_WGEDGE | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_wgedge_class ()))
#define GTS_IS_WGNODE | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_wgnode_class ()))
#define GTS_IS_WGRAPH | ( | obj | ) |
(gts_object_is_from_class (obj,\ gts_wgraph_class ()))
#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 | ) |
GTS_OBJECT_CAST (obj,\ GtsListFace,\ gts_list_face_class ())
Definition at line 1666 of file gts.h.
Referenced by gts_delaunay_add_vertex_to_face(), gts_list_face_destroy(), and swap_if_in_circle().
#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 | ) |
GTS_OBJECT_CAST (obj,\ GtsNEdge,\ gts_nedge_class ())
Definition at line 1791 of file gts.h.
Referenced by intersects(), nedge_read(), nedge_write(), pgedge_write(), and segment_triangle_intersection().
#define GTS_NEDGE_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsNEdgeClass,\ gts_nedge_class())
#define GTS_NFACE | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsNFace,\ gts_nface_class ())
Definition at line 1814 of file gts.h.
Referenced by intersects(), nface_read(), nface_write(), and segment_triangle_intersection().
#define GTS_NFACE_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsNFaceClass,\ gts_nface_class())
#define GTS_NGNODE | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsNGNode,\ gts_ngnode_class ())
Definition at line 2142 of file gts.h.
Referenced by gts_ngnode_new().
#define GTS_NGNODE_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsNGNodeClass,\ gts_ngnode_class())
#define GTS_NVERTEX | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsNVertex,\ gts_nvertex_class ())
Definition at line 1768 of file gts.h.
Referenced by intersects(), nvertex_read(), nvertex_write(), and pnode_write().
#define GTS_NVERTEX_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsNVertexClass,\ gts_nvertex_class())
#define GTS_OBJECT | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsObject,\ gts_object_class ())
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_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsObjectClass,\ gts_object_class())
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)) |
#define GTS_OBJECT_DESTROYED | ( | obj | ) | ((GTS_OBJECT_FLAGS (obj) & GTS_DESTROYED) != 0) |
Definition at line 225 of file gts.h.
Referenced by destroy_foreach_face(), foreach_face_remove(), gnode_remove_container(), gts_surface_remove_face(), segment_destroy(), and triangle_destroy().
#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 |
#define GTS_PGEDGE | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsPGEdge,\ gts_pgedge_class ())
Definition at line 2291 of file gts.h.
Referenced by gts_pgedge_new(), and pgedge_write().
#define GTS_PGEDGE_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsPGEdgeClass,\ gts_pgedge_class())
#define GTS_PGRAPH | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsPGraph,\ gts_pgraph_class ())
Definition at line 2493 of file gts.h.
Referenced by gts_pgraph_new(), and pgraph_destroy().
#define GTS_PGRAPH_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsPGraphClass,\ gts_pgraph_class())
#define GTS_PNODE | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsPNode,\ gts_pnode_class ())
Definition at line 2198 of file gts.h.
Referenced by gts_pnode_new(), and pnode_write().
#define GTS_PNODE_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsPNodeClass,\ gts_pnode_class())
#define GTS_POINT | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsPoint,\ gts_point_class ())
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_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsPointClass,\ gts_point_class ())
Definition at line 344 of file gts.h.
Referenced by gts_delaunay_refine(), gts_psurface_write(), gts_surface_read(), gts_surface_write(), intersects(), point_read(), point_write(), surface_read(), surface_write(), and write_vertex().
#define gts_point_is_in_rectangle | ( | p, | |
p1, | |||
p2 | |||
) |
#define GTS_PSURFACE | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsPSurface,\ gts_psurface_class ())
Definition at line 1476 of file gts.h.
Referenced by gts_psurface_new(), gts_psurface_open(), and psurface_destroy().
#define GTS_PSURFACE_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsPSurfaceClass,\ gts_psurface_class ())
#define GTS_PSURFACE_IS_CLOSED | ( | ps | ) | (!(ps)->vertices) |
Definition at line 1482 of file gts.h.
Referenced by gts_psurface_add_vertex(), gts_psurface_close(), gts_psurface_foreach_vertex(), gts_psurface_get_vertex_number(), gts_psurface_read_vertex(), gts_psurface_remove_vertex(), gts_psurface_set_vertex_number(), gts_psurface_write(), and psurface_destroy().
#define GTS_SEGMENT | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsSegment,\ gts_segment_class ())
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 | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsSegmentClass,\ gts_segment_class ())
Definition at line 531 of file gts.h.
Referenced by gts_edge_new().
#define gts_segment_connect | ( | s, | |
e1, | |||
e2 | |||
) |
#define gts_segments_are_identical | ( | s1, | |
s2 | |||
) |
#define gts_segments_touch | ( | s1, | |
s2 | |||
) |
((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 | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsSListContainee,\ gts_slist_containee_class ())
Definition at line 1977 of file gts.h.
Referenced by gnode_remove_container(), gnode_split_destroy(), slist_containee_add_container(), slist_containee_destroy(), slist_containee_foreach(), slist_containee_is_contained(), and slist_containee_remove_container().
#define GTS_SLIST_CONTAINEE_CLASS | ( | klass | ) |
#define GTS_SLIST_CONTAINER | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsSListContainer,\ gts_slist_container_class ())
Definition at line 2066 of file gts.h.
Referenced by boundary_node1(), boundary_node2(), edge_foreach_node(), gts_gnode_degree(), gts_gnode_foreach_edge(), gts_gnode_foreach_neighbor(), gts_gnode_move_cost(), gts_gnode_split_collapse(), gts_gnode_split_expand(), gts_graph_bisection_kl_refine(), match_neighbor(), node_cost(), restore_edge(), slist_container_add(), slist_container_destroy(), slist_container_foreach(), slist_container_remove(), slist_container_size(), sum_edge_cuts_weight(), and update_neighbors().
#define GTS_SLIST_CONTAINER_CLASS | ( | klass | ) |
#define GTS_SPLIT | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsSplit,\ gts_split_class ())
Definition at line 1420 of file gts.h.
Referenced by gts_hsplit_collapse(), gts_hsplit_expand(), gts_hsplit_force_expand(), gts_hsurface_new(), gts_psurface_read_vertex(), gts_psurface_write(), gts_split_height(), gts_split_new(), split_depth_traverse_post_order(), split_depth_traverse_pre_order(), split_destroy(), split_traverse_post_order(), and split_traverse_pre_order().
#define GTS_SPLIT_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsSplitClass,\ gts_split_class ())
#define GTS_SPLIT_V1 | ( | vs | ) |
(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 | ) |
(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 | ) |
GTS_OBJECT_CAST (obj,\ GtsSurface,\ gts_surface_class ())
Definition at line 1086 of file gts.h.
Referenced by gts_surface_new(), surface_destroy(), and surface_write().
#define GTS_SURFACE_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsSurfaceClass,\ gts_surface_class ())
Definition at line 1089 of file gts.h.
Referenced by foreach_face_remove(), gts_surface_add_face(), gts_surface_graph_surface(), gts_surface_is_self_intersecting(), gts_surface_remove_face(), heap_surface_add_face(), heap_surface_remove_face(), traverse_boundary(), and traverse_remaining().
#define GTS_SURFACE_INTER | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsSurfaceInter,\ gts_surface_inter_class ())
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 | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsSurfaceInterClass,\ gts_surface_inter_class ())
GTS_SURFACE_INTER_CLASS: : a descendant of GtsSurfaceInterClass.
Casts to GtsSurfaceInterClass.
#define GTS_TRIANGLE | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsTriangle,\ gts_triangle_class ())
Definition at line 636 of file gts.h.
Referenced by angle_obtuse(), boundary_cost(), boundary_preservation(), cface_expand(), compute_candidate_points(), edge_fan_list(), find_closest(), gts_delaunay_add_vertex_to_face(), gts_delaunay_refine(), gts_delaunay_remove_hull(), gts_edge_is_encroached(), gts_edge_swap(), gts_face_foreach_neighbor(), gts_face_is_compatible(), gts_face_neighbor_number(), gts_face_neighbors(), gts_face_new(), gts_point_is_inside_surface(), gts_point_locate(), gts_triangle_new(), gts_vertex_fan_oriented(), gts_vertex_principal_directions(), intersect_edges(), neighbor(), next_compatible_face(), opposite_triangle(), orientable_foreach_edge(), point_locate(), region_area(), remove_intersected_edge(), sum_area(), swap_if_in_circle(), tessellate_face(), traverse_boundary(), traverse_remaining(), triangle_destroy(), triangle_obtuse(), triangulate_loop(), vertex_normal_attributes(), and walk_faces().
#define GTS_TRIANGLE_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsTriangleClass,\ gts_triangle_class ())
#define gts_triangle_vertex | ( | t | ) |
(GTS_SEGMENT (GTS_TRIANGLE (t)->e1)->v1 ==\ GTS_SEGMENT (GTS_TRIANGLE (t)->e2)->v1 || \ GTS_SEGMENT (GTS_TRIANGLE (t)->e1)->v2 ==\ GTS_SEGMENT (GTS_TRIANGLE (t)->e2)->v1 ? \ GTS_SEGMENT (GTS_TRIANGLE (t)->e2)->v2 :\ GTS_SEGMENT (GTS_TRIANGLE (t)->e2)->v1)
Definition at line 664 of file gts.h.
Referenced by add_edge_inter(), gts_bbox_overlaps_triangle(), gts_bbox_triangle(), gts_segment_triangle_intersection(), gts_triangle_interpolate_height(), gts_triangle_perimeter(), triangle_barycenter(), triangle_point_orientation(), triangle_use_vertices(), and vertex_foreach_face().
#define gts_vector_cross | ( | C, | |
A, | |||
B | |||
) |
((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 | |||
) |
Definition at line 774 of file gts.h.
Referenced by angle_from_cotan(), angle_obtuse(), cotan(), gts_bb_tree_segment_distance(), gts_bb_tree_triangle_distance(), gts_point_triangle_closest(), gts_point_triangle_distance2(), gts_vertex_principal_directions(), points_are_folded(), and vertex_normal_attributes().
#define gts_vector_norm | ( | v | ) |
(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 | ) |
{\ 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_vector_scalar | ( | v1, | |
v2 | |||
) |
((v1)[0]*(v2)[0] +\ (v1)[1]*(v2)[1] +\ (v1)[2]*(v2)[2])
Definition at line 777 of file gts.h.
Referenced by angle_from_cotan(), angle_obtuse(), cotan(), gts_bb_tree_segment_distance(), gts_bb_tree_triangle_distance(), gts_matrix_compatible_row(), gts_matrix_quadratic_optimization(), gts_point_triangle_closest(), gts_point_triangle_distance2(), gts_vertex_principal_directions(), and points_are_folded().
#define GTS_VERTEX | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsVertex,\ gts_vertex_class ())
Definition at line 433 of file gts.h.
Referenced by build_cdt(), candidate_vertices(), check_adj_pushing_vertex(), check_speccut(), compute_candidate_points(), delete_route(), flow_from_edge_to_edge(), gts_delaunay_refine(), gts_edges_from_vertices(), gts_psurface_write(), gts_segments_from_vertices(), gts_surface_read(), gts_vertex_is_contact(), gts_vertex_new(), intersects(), polygon_in_circle(), space_edge(), triangle_all_candidate_points_from_edge(), triangle_all_candidate_points_from_vertex(), triangle_candidate_points_from_edge(), triangle_candidate_points_from_vertex(), triangle_interior_capacity(), vertex_clone(), vertex_destroy(), and vertices_routing_conflicts().
#define GTS_VERTEX_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsVertexClass,\ gts_vertex_class ())
Definition at line 436 of file gts.h.
Referenced by build_cdt(), create_board_edge(), delaunay_create_from_vertices(), insert_centre_point(), insert_constraint_edge(), insert_vertex(), new_temp_toporoutervertex(), read_lines(), rect_with_attachments(), and vertex_intersect().
#define GTS_VERTEX_NORMAL | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsVertexNormal,\ gts_vertex_normal_class ())
Definition at line 496 of file gts.h.
Referenced by vertex_normal_attributes().
#define GTS_WGEDGE | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsWGEdge,\ gts_wgedge_class ())
Definition at line 2321 of file gts.h.
Referenced by gts_wgedge_new(), and wgedge_weight().
#define GTS_WGEDGE_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsWGEdgeClass,\ gts_wgedge_class())
#define GTS_WGNODE | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsWGNode,\ gts_wgnode_class ())
Definition at line 2170 of file gts.h.
Referenced by gts_wgnode_new(), and wgnode_weight().
#define GTS_WGNODE_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsWGNodeClass,\ gts_wgnode_class())
#define GTS_WGRAPH | ( | obj | ) |
GTS_OBJECT_CAST (obj,\ GtsWGraph,\ gts_wgraph_class ())
Definition at line 2410 of file gts.h.
Referenced by gts_graph_recursive_bisection(), recursive_bisection(), wgraph_add(), wgraph_remove(), and wgraph_weight().
#define GTS_WGRAPH_CLASS | ( | klass | ) |
GTS_OBJECT_CLASS_CAST (klass,\ GtsWGraphClass,\ gts_wgraph_class())
typedef void(* GtsArgGetFunc)(GtsObject *obj) |
typedef void(* GtsArgSetFunc)(GtsObject *obj) |
typedef struct _GtsBBoxClass GtsBBoxClass |
typedef GtsPoint*(* GtsBBoxClosestFunc)(GtsPoint *p, gpointer bounded) |
typedef gdouble(* GtsBBoxDistFunc)(GtsPoint *p, gpointer bounded) |
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().
typedef struct _GtsCartesianGrid GtsCartesianGrid |
typedef struct _GtsCluster GtsCluster |
typedef struct _GtsClusterClass GtsClusterClass |
typedef struct _GtsClusterGrid GtsClusterGrid |
typedef struct _GtsClusterGridClass GtsClusterGridClass |
typedef struct _GtsClusterId GtsClusterId |
typedef GtsVertex*(* GtsCoarsenFunc)(GtsEdge *e, GtsVertexClass *klass, gpointer data) |
typedef struct _GtsColorVertex GtsColorVertex |
typedef struct _GtsConstraint GtsConstraint |
typedef struct _GtsConstraintClass GtsConstraintClass |
typedef struct _GtsContainee GtsContainee |
typedef struct _GtsContaineeClass GtsContaineeClass |
typedef struct _GtsContainer GtsContainer |
typedef struct _GtsContainerClass GtsContainerClass |
typedef struct _GtsEdgeClass GtsEdgeClass |
typedef struct _GtsEHeapPair GtsEHeapPair |
typedef gboolean(* GtsEncroachFunc)(GtsVertex *v, GtsEdge *e, GtsSurface *s, gpointer data) |
typedef struct _GtsFaceClass GtsFaceClass |
typedef struct _GtsFileVariable GtsFileVariable |
typedef struct _GtsFNodeClass GtsFNodeClass |
typedef struct _GtsGEdgeClass GtsGEdgeClass |
typedef struct _GtsGNodeClass GtsGNodeClass |
typedef struct _GtsGNodeSplit GtsGNodeSplit |
typedef struct _GtsGNodeSplitClass GtsGNodeSplitClass |
typedef struct _GtsGraphBisection GtsGraphBisection |
typedef struct _GtsGraphClass GtsGraphClass |
typedef struct _GtsGraphTraverse GtsGraphTraverse |
typedef struct _GtsGridPlane GtsGridPlane |
typedef struct _GtsHashContainer GtsHashContainer |
typedef struct _GtsHashContainerClass GtsHashContainerClass |
typedef struct _GtsHSplit GtsHSplit |
typedef struct _GtsHSplitClass GtsHSplitClass |
typedef struct _GtsHSurface GtsHSurface |
typedef struct _GtsHSurfaceClass GtsHSurfaceClass |
typedef void(* GtsIsoCartesianFunc)(gdouble **a, GtsCartesianGrid g, guint i, gpointer data) |
typedef struct _GtsIsoSlice GtsIsoSlice |
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.
typedef struct _GtsListFace GtsListFace |
typedef GtsVector4 GtsMatrix |
typedef struct _GtsNEdgeClass GtsNEdgeClass |
typedef struct _GtsNFaceClass GtsNFaceClass |
typedef struct _GtsNGNode GtsNGNode |
typedef struct _GtsNGNodeClass GtsNGNodeClass |
typedef struct _GtsNVertex GtsNVertex |
typedef struct _GtsNVertexClass GtsNVertexClass |
typedef struct _GtsObject GtsObject |
typedef struct _GtsObjectClass GtsObjectClass |
typedef struct _GtsObjectClassInfo GtsObjectClassInfo |
typedef void(* GtsObjectClassInitFunc)(GtsObjectClass *objclass) |
typedef void(* GtsObjectInitFunc)(GtsObject *obj) |
typedef struct _GtsPGEdge GtsPGEdge |
typedef struct _GtsPGEdgeClass GtsPGEdgeClass |
typedef struct _GtsPGraph GtsPGraph |
typedef struct _GtsPGraphClass GtsPGraphClass |
typedef struct _GtsPNodeClass GtsPNodeClass |
typedef struct _GtsPointClass GtsPointClass |
typedef struct _GtsPSurface GtsPSurface |
typedef struct _GtsPSurfaceClass GtsPSurfaceClass |
typedef GtsVertex*(* GtsRefineFunc)(GtsEdge *e, GtsVertexClass *klass, gpointer data) |
typedef struct _GtsSegment GtsSegment |
typedef struct _GtsSegmentClass GtsSegmentClass |
typedef struct _GtsSListContainee GtsSListContainee |
typedef struct _GtsSListContaineeClass GtsSListContaineeClass |
typedef struct _GtsSListContainer GtsSListContainer |
typedef struct _GtsSListContainerClass GtsSListContainerClass |
typedef struct _GtsSplitCFace GtsSplitCFace |
typedef struct _GtsSplitClass GtsSplitClass |
typedef gboolean(* GtsSplitTraverseFunc)(GtsSplit *vs, gpointer data) |
typedef gboolean(* GtsStopFunc)(gdouble cost, guint nedge, gpointer data) |
typedef struct _GtsSurface GtsSurface |
typedef struct _GtsSurfaceClass GtsSurfaceClass |
typedef struct _GtsSurfaceInter GtsSurfaceInter |
typedef struct _GtsSurfaceInterClass GtsSurfaceInterClass |
typedef struct _GtsSurfaceQualityStats GtsSurfaceQualityStats |
typedef struct _GtsSurfaceStats GtsSurfaceStats |
typedef struct _GtsSurfaceTraverse GtsSurfaceTraverse |
typedef struct _GtsTriangle GtsTriangle |
typedef struct _GtsTriangleClass GtsTriangleClass |
typedef gdouble GtsVector4[4] |
typedef struct _GtsVertex GtsVertex |
typedef struct _GtsVertexClass GtsVertexClass |
typedef struct _GtsVertexNormal GtsVertexNormal |
typedef struct _GtsVolumeOptimizedParams GtsVolumeOptimizedParams |
typedef struct _GtsWGEdge GtsWGEdge |
typedef struct _GtsWGEdgeClass GtsWGEdgeClass |
typedef struct _GtsWGNode GtsWGNode |
typedef struct _GtsWGNodeClass GtsWGNodeClass |
typedef struct _GtsWGraph GtsWGraph |
typedef struct _GtsWGraphClass GtsWGraphClass |
enum GtsBooleanOperation |
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.
enum GtsIntersect |
enum GtsObjectFlags |
enum GtsTokenType |
enum GtsTraverseType |
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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.
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.
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().
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().
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().
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().
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().
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.
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().
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.
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().
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().
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.
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.
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().
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().
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().
gboolean gts_containee_is_contained | ( | GtsContainee * | item, |
GtsContainer * | c | ||
) |
Definition at line 63 of file container.c.
References c, FALSE, GTS_CONTAINEE_CLASS, and GTS_OBJECT.
Referenced by bisection_children(), boundary_node1(), boundary_node2(), gts_gnode_degree(), gts_gnode_foreach_edge(), gts_gnode_foreach_neighbor(), gts_gnode_move_cost(), gts_gnode_split_expand(), gts_graph_bisection_bkl_refine(), gts_graph_bisection_kl_refine(), gts_graph_traverse_new(), match_neighbor(), neighbor_count(), node_cost(), sum_edge_cuts_weight(), and update_neighbors().
GtsContainee* gts_containee_new | ( | GtsContaineeClass * | klass | ) |
Definition at line 54 of file container.c.
References GTS_CONTAINEE, GTS_OBJECT_CLASS, and gts_object_new().
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.
void gts_container_add | ( | GtsContainer * | c, |
GtsContainee * | item | ||
) |
Definition at line 271 of file container.c.
References add(), GTS_CONTAINER_CLASS, and GTS_OBJECT.
Referenced by add_unused(), bisection_children(), connect_edge(), container_clone_add(), create_node(), create_segment_edge(), gts_containee_replace(), gts_gedge_new(), gts_gnode_split_collapse(), gts_gnode_split_expand(), gts_graph_bfgg_bisection(), gts_graph_bisection_bkl_refine(), gts_graph_bisection_kl_refine(), gts_graph_bubble_partition(), gts_graph_ggg_bisection(), gts_graph_read(), gts_graph_read_jostle(), partition_update(), and restore_edge().
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().
void gts_container_foreach | ( | GtsContainer * | c, |
GtsFunc | func, | ||
gpointer | data | ||
) |
Definition at line 291 of file container.c.
References GTS_CONTAINER_CLASS, and GTS_OBJECT.
Referenced by container_clone(), container_destroy(), gts_gnode_split_collapse(), gts_gnode_split_expand(), gts_graph_bfgg_bisection(), gts_graph_bisection_bkl_refine(), gts_graph_bisection_check(), gts_graph_bisection_kl_refine(), gts_graph_bubble_partition(), gts_graph_edges_cut(), gts_graph_edges_cut_weight(), gts_graph_foreach_edge(), gts_graph_ggg_bisection(), gts_graph_print_stats(), gts_graph_traverse_new(), gts_graph_write(), gts_graph_write_dot(), gts_surface_graph_surface(), gts_wgraph_weight_max(), and maximal_matching().
GtsContainer* gts_container_new | ( | GtsContainerClass * | klass | ) |
Definition at line 262 of file container.c.
References GTS_CONTAINER, GTS_OBJECT_CLASS, and gts_object_new().
void gts_container_remove | ( | GtsContainer * | c, |
GtsContainee * | item | ||
) |
Definition at line 281 of file container.c.
References GTS_CONTAINER_CLASS, and GTS_OBJECT.
Referenced by bisection_children(), gedge_destroy(), gedge_remove_container(), gts_containee_replace(), gts_gnode_split_collapse(), gts_gnode_split_expand(), gts_graph_bisection_bkl_refine(), gts_graph_bisection_kl_refine(), and slist_containee_destroy().
guint gts_container_size | ( | GtsContainer * | c | ) |
Definition at line 302 of file container.c.
References c, GTS_CONTAINER_CLASS, and GTS_OBJECT.
Referenced by gnode_split_destroy(), gts_gnode_split_collapse(), gts_gnode_split_expand(), gts_graph_bfgg_bisection(), gts_graph_bisection_new(), gts_graph_ggg_bisection(), gts_graph_print_stats(), gts_graph_weight(), gts_graph_write(), gts_pgraph_down(), and gts_pgraph_new().
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().
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().
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().
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().
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().
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().
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.
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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.
GtsEdge* gts_edge_new | ( | GtsEdgeClass * | klass, |
GtsVertex * | v1, | ||
GtsVertex * | v2 | ||
) |
gts_edge_new: : a GtsEdgeClass. : a GtsVertex. : a GtsVertex.
Returns: a new GtsEdge linking and .
Definition at line 93 of file edge.c.
References GTS_EDGE, GTS_SEGMENT_CLASS, and gts_segment_new().
Referenced by cface_expand(), cface_new(), check_speccut(), connect_interior_loop(), create_edges(), edge_inter_new(), foreach_edge_copy(), generate_icosahedron(), get_edge(), gts_cluster_grid_add_triangle(), gts_delaunay_add_vertex_to_face(), gts_edge_swap(), gts_isosurface_slice(), gts_split_expand(), gts_surface_read(), gts_triangle_enclosing(), insert_constraint_edge(), midvertex_insertion(), split_encroached(), surface_read(), swap_if_in_circle(), tessellate_face(), triangulate_loop(), triangulate_polygon(), and unconstrain().
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().
void gts_edge_swap | ( | GtsEdge * | e, |
GtsSurface * | s | ||
) |
gts_edge_swap: : a GtsEdge. : a GtsSurface.
Performs an "edge swap" on the two triangles sharing and belonging to .
Definition at line 495 of file edge.c.
References _GtsSurface::edge_class, f, _GtsSurface::face_class, GTS_EDGE, gts_edge_face_number(), gts_edge_new(), GTS_FACE, gts_face_has_parent_surface(), gts_face_new(), GTS_IS_EDGE, GTS_IS_FACE, GTS_OBJECT, gts_object_destroy(), GTS_SEGMENT, gts_surface_add_face(), gts_surface_remove_face(), GTS_TRIANGLE, gts_triangle_is_duplicate(), gts_triangle_vertices_edges(), gts_vertices_are_connected(), and _GtsEdge::triangles.
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.
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.
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().
void gts_eheap_destroy | ( | GtsEHeap * | heap | ) |
gts_eheap_destroy: : a GtsEHeap.
Free all the memory allocated for .
Definition at line 252 of file eheap.c.
References _GtsEHeap::elts, and TRUE.
Referenced by gts_delaunay_refine(), 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(), heap_destroy(), hsurface_destroy(), and route().
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().
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().
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().
GtsEHeap* gts_eheap_new | ( | GtsKeyFunc | key_func, |
gpointer | data | ||
) |
gts_eheap_new: : a GtsKeyFunc or NULL. : user data to be passed to .
Returns: a new GtsEHeap using as key.
Definition at line 35 of file eheap.c.
References _GtsEHeap::data, _GtsEHeap::elts, FALSE, _GtsEHeap::frozen, _GtsEHeap::func, and _GtsEHeap::randomized.
Referenced by gts_delaunay_refine(), gts_graph_bfgg_bisection(), gts_graph_bisection_bkl_refine(), gts_graph_bisection_kl_refine(), gts_graph_ggg_bisection(), gts_hsurface_new(), gts_psurface_new(), gts_surface_coarsen(), gts_surface_refine(), heap_new(), and route().
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().
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().
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().
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().
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().
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().
gboolean gts_face_has_parent_surface | ( | GtsFace * | f, |
GtsSurface * | s | ||
) |
gts_face_has_parent_surface: : a GtsFace. : a GtsSurface.
Returns: TRUE if belongs to , FALSE otherwise.
Definition at line 111 of file face.c.
References FALSE, _GtsFace::surfaces, and TRUE.
Referenced by check_orientation(), create_edge(), edge_fan_list(), gts_delaunay_remove_vertex(), gts_edge_face_number(), gts_edge_has_parent_surface(), gts_edge_is_boundary(), gts_edge_is_encroached(), gts_edge_manifold_faces(), gts_edge_swap(), gts_face_foreach_neighbor(), gts_face_neighbor_number(), gts_face_neighbors(), gts_faces_from_edges(), gts_point_locate(), gts_surface_inter_boolean(), gts_surface_traverse_new(), gts_vertex_faces(), gts_vertex_fan_oriented(), gts_vertex_principal_directions(), neighbor(), next_compatible_face(), non_manifold_edges(), orientable_foreach_edge(), remove_intersected_vertex(), remove_triangles(), split_edge(), triangle_is_incompatible(), and vertex_encroaches().
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().
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.
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.
GtsFace* gts_face_new | ( | GtsFaceClass * | klass, |
GtsEdge * | e1, | ||
GtsEdge * | e2, | ||
GtsEdge * | e3 | ||
) |
gts_face_new: : a GtsFaceClass. : a GtsEdge. : a GtsEdge. : a GtsEdge.
Returns: a new GtsFace using , and as edges.
Definition at line 93 of file face.c.
References f, GTS_FACE, GTS_OBJECT_CLASS, gts_object_new(), GTS_TRIANGLE, and gts_triangle_set().
Referenced by add_face(), add_face_bcl(), build_cdt(), delaunay_create_from_vertices(), foreach_face_copy(), generate_icosahedron(), gts_cluster_grid_add_triangle(), gts_delaunay_add_vertex_to_face(), gts_edge_swap(), gts_isosurface_slice(), gts_surface_read(), midvertex_insertion(), surface_read(), swap_if_in_circle(), tessellate_face(), triangulate_loop(), and triangulate_polygon().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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.
void gts_file_next_token | ( | GtsFile * | f | ) |
gts_file_next_token: : a GtsFile.
Reads next token from and updates its and fields.
Definition at line 295 of file gts/misc.c.
References c, char_in_string(), _GtsFile::curline, _GtsFile::curpos, _GtsFile::delimiters, FALSE, GTS_ERROR, gts_file_getc_scope(), GTS_FLOAT, GTS_INT, GTS_NONE, GTS_STRING, _GtsFile::line, _GtsFile::next_token, _GtsFile::pos, _GtsFile::token, _GtsFile::tokens, TRUE, and _GtsFile::type.
Referenced by graph_read(), gts_file_assign_next(), gts_file_assign_start(), gts_file_first_token_after(), gts_file_new(), gts_file_new_from_string(), gts_graph_read(), gts_graph_read_jostle(), gts_psurface_read_vertex(), gts_surface_read(), nedge_read(), nface_read(), nvertex_read(), point_read(), and surface_read().
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, | ||
... | |||
) |
Definition at line 588 of file gts/misc.c.
References args, gts_file_verror(), GTS_NONE, _GtsFileVariable::line, _GtsFile::line, _GtsFileVariable::name, _GtsFileVariable::pos, _GtsFile::pos, _GtsFileVariable::set, and _GtsFileVariable::type.
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().
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().
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().
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().
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().
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 | ) |
gts_gnode_class:
Returns: the GtsGNodeClass.
Definition at line 54 of file graph.c.
References gnode_class_init(), gnode_init(), GTS_OBJECT_CLASS, gts_object_class_new(), and gts_slist_container_class().
Referenced by gnode_remove_container(), graph_init(), graph_read(), gts_fnode_class(), gts_graph_read(), gts_ngnode_class(), gts_pnode_class(), and gts_wgnode_class().
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().
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.
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().
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().
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().
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().
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().
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().
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().
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().
GtsGraphBisection* gts_graph_bfgg_bisection | ( | GtsGraph * | g, |
guint | ntry | ||
) |
gts_graph_bfgg_bisection: : a GtsGraph. : the number of randomly selected initial seeds.
An implementation of a "Breadth-First Graph Growing" algorithm.
randomly chosen seeds are used and the best partition is retained.
Returns: a new GtsGraphBisection of .
Definition at line 607 of file partition.c.
References add_seed(), add_unused(), _GtsGraphBisection::bg1, _GtsGraphBisection::bg2, boundary_node1(), boundary_node2(), degree_cost(), _GtsGraph::edge_class, _GtsGraphBisection::g, _GtsGraphBisection::g1, _GtsGraphBisection::g2, GTS_BREADTH_FIRST, GTS_CONTAINEE, GTS_CONTAINER, gts_container_add(), gts_container_foreach(), gts_container_size(), gts_eheap_destroy(), gts_eheap_freeze(), gts_eheap_new(), gts_eheap_remove_top(), gts_eheap_thaw(), gts_gnode_weight(), GTS_GRAPH_CLASS, gts_graph_edges_cut_weight(), gts_graph_new(), gts_graph_traverse_destroy(), gts_graph_traverse_new(), gts_graph_traverse_next(), gts_graph_weight(), GTS_OBJECT, gts_object_destroy(), n, _GtsGraph::node_class, and TRUE.
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().
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().
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().
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().
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().
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.
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().
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().
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().
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().
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().
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().
GtsGraphBisection* gts_graph_ggg_bisection | ( | GtsGraph * | g, |
guint | ntry | ||
) |
gts_graph_ggg_bisection: : a GtsGraph. : the number of randomly selected initial seeds.
An implementation of the "Greedy Graph Growing" algorithm of Karypis and Kumar (1997).
randomly chosen seeds are used and the best partition is retained.
Returns: a new GtsGraphBisection of .
Definition at line 495 of file partition.c.
References add_neighbor(), add_seed(), add_unused(), _GtsGraphBisection::bg1, _GtsGraphBisection::bg2, boundary_node1(), boundary_node2(), degree_cost(), _GtsGraph::edge_class, FALSE, _GtsGraphBisection::g, _GtsGraphBisection::g1, _GtsGraphBisection::g2, GTS_CONTAINEE, GTS_CONTAINER, gts_container_add(), gts_container_foreach(), gts_container_size(), gts_eheap_destroy(), gts_eheap_freeze(), gts_eheap_new(), gts_eheap_remove_top(), gts_eheap_thaw(), gts_gnode_foreach_neighbor(), gts_gnode_weight(), GTS_GRAPH_CLASS, gts_graph_edges_cut_weight(), gts_graph_new(), gts_graph_weight(), GTS_OBJECT, gts_object_destroy(), n, _GtsGraph::node_class, node_cost(), and TRUE.
Referenced by gts_graph_bisection_new().
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().
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().
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().
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().
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().
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().
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().
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().
gts_graph_read: : a GtsFile.
Reads a graph from a file.
Returns: the new GtsGraph or NULL if an error occured (in which case the field of is set).
Definition at line 1374 of file graph.c.
References _GtsGraph::edge_class, FALSE, fp, _GtsGraph::graph_class, gts_allow_floating_gnodes, GTS_CONTAINEE, GTS_CONTAINER, gts_container_add(), GTS_ERROR, gts_file_error(), gts_file_first_token_after(), gts_file_next_token(), gts_gedge_class(), gts_gedge_new(), GTS_GNODE, gts_gnode_class(), GTS_GRAPH, GTS_GRAPH_CLASS, gts_graph_class(), GTS_INT, GTS_OBJECT, GTS_OBJECT_CLASS, gts_object_class_from_name(), gts_object_class_is_from_class(), gts_object_destroy(), gts_object_new(), GTS_STRING, n, _GtsGraph::node_class, _GtsObjectClass::read, _GtsFile::token, TRUE, and _GtsFile::type.
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.
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().
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().
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().
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().
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().
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().
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().
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().
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.
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.
GtsHashContainerClass* gts_hash_container_class | ( | void | ) |
Definition at line 384 of file container.c.
References gts_container_class(), GTS_OBJECT_CLASS, gts_object_class_new(), hash_container_class_init(), and hash_container_init().
Referenced by gts_graph_class(), hash_container_add(), hash_container_destroy(), and hash_container_remove().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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.
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.
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.
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().
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().
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.
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().
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().
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.
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().
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.
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.
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.
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().
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().
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().
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.
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().
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.
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_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.
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().
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.
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.
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().
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().
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().
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().
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().
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().
GtsObjectClass* gts_object_class | ( | void | ) |
gts_object_class:
Returns: the GtsObjectClass.
Definition at line 127 of file object.c.
References gts_object_class_new(), object_class_init(), and object_init().
Referenced by cface_class(), gts_bbox_class(), gts_cluster_class(), gts_cluster_grid_class(), gts_containee_class(), gts_gnode_split_class(), gts_hsurface_class(), gts_pgraph_class(), gts_point_class(), gts_psurface_class(), gts_segment_class(), gts_split_class(), gts_surface_class(), gts_surface_inter_class(), and gts_triangle_class().
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().
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().
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().
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().
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().
GtsObject* gts_object_new | ( | GtsObjectClass * | klass | ) |
gts_object_new: : a GtsObjectClass.
Returns: a new initialized object of class .
Definition at line 231 of file object.c.
References gts_object_init(), _GtsObjectClass::info, _GtsObjectClassInfo::name, and _GtsObjectClassInfo::object_size.
Referenced by gts_bb_tree_segment_distance(), gts_bb_tree_triangle_distance(), gts_bbox_new(), gts_cluster_grid_new(), gts_cluster_new(), gts_containee_new(), gts_container_new(), gts_face_new(), gts_fnode_new(), gts_gedge_new(), gts_gnode_new(), gts_gnode_split_new(), gts_graph_bubble_partition(), gts_graph_new(), gts_graph_read(), gts_hsplit_new(), gts_hsurface_new(), gts_pgraph_new(), gts_pnode_new(), gts_point_locate(), gts_point_new(), gts_point_triangle_closest(), gts_psurface_new(), gts_psurface_open(), gts_psurface_read_vertex(), gts_segment_new(), gts_segment_triangle_intersection(), gts_segments_graph_new(), gts_split_new(), gts_surface_graph_new(), gts_surface_new(), gts_surface_read(), gts_triangle_new(), gts_vertex_new(), surface_inter_new(), surface_read(), and toporouter_arc_new().
void gts_object_reset_reserved | ( | GtsObject * | object | ) |
gts_object_reset_reserved: : a GtsObject.
Reset the reserved field of .
Definition at line 305 of file object.c.
Referenced by free_glist(), gts_delaunay_conform(), gts_delaunay_refine(), gts_edge_is_contact(), gts_graph_bisection_bkl_refine(), gts_graph_bisection_kl_refine(), gts_graph_bubble_partition(), gts_graph_write(), gts_graph_write_dot(), gts_psurface_close(), gts_psurface_new(), gts_psurface_write(), gts_surface_coarsen(), gts_surface_copy(), gts_surface_graph_new(), gts_surface_inter_boolean(), gts_surface_inter_check(), gts_surface_traverse_destroy(), gts_surface_write_oogl(), gts_surface_write_vtk(), and maximal_matching().
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().
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().
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().
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().
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().
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().
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().
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.
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().
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().
GtsPointClass* gts_point_class | ( | void | ) |
gts_point_class:
Returns: the GtsPointClass.
Definition at line 93 of file point.c.
References gts_object_class(), gts_object_class_new(), and point_class_init().
Referenced by cluster_find(), gts_bb_tree_segment_distance(), gts_bb_tree_triangle_distance(), gts_point_is_inside_surface(), gts_point_locate(), gts_point_triangle_closest(), gts_vertex_class(), midpoint(), self_intersecting(), toporouter_bbox_locate(), and triangulate_face().
gts_point_distance: : a GtsPoint. : another GtsPoint.
Returns: the Euclidean distance between and .
Definition at line 161 of file point.c.
References _GtsPoint::x, _GtsPoint::y, and _GtsPoint::z.
Referenced by calculate_arc_to_arc(), calculate_term_to_arc(), candidate_vertices(), edge_capacity(), edge_min_spacing(), gts_triangle_perimeter(), oproute_calculate_tof(), path_score(), pathvertex_arcing_through_constraint(), quality_foreach_edge(), simple_h_cost(), space_edge(), spread_edge(), surface_distance_foreach_boundary(), triangle_candidate_points_from_edge(), and triangle_candidate_points_from_vertex().
gts_point_distance2: : a GtsPoint. : another GtsPoint.
Returns: the square of the Euclidean distance between and .
Definition at line 177 of file point.c.
References _GtsPoint::x, _GtsPoint::y, and _GtsPoint::z.
Referenced by edge_closest_vertex(), edge_length2(), edge_length2_inverse(), edge_min_spacing(), edge_shape_cost(), gts_bb_tree_point_closest(), gts_point_segment_closest(), gts_point_segment_distance2(), gts_point_triangle_closest(), gts_volume_optimized_cost(), gts_volume_optimized_vertex(), region_area(), routing_edge_insert(), and triangle_interior_capacity().
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().
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.
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.
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().
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.
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().
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().
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().
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().
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().
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.
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().
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().
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().
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().
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.
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().
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().
void gts_predicates_init | ( | ) |
Definition at line 382 of file predicates.c.
References ccwerrboundA, ccwerrboundB, ccwerrboundC, check, FPU_RESTORE, FPU_ROUND_DOUBLE, iccerrboundA, iccerrboundB, iccerrboundC, isperrboundA, isperrboundB, isperrboundC, o3derrboundA, o3derrboundB, o3derrboundC, resulterrbound, and splitter.
Referenced by toporouter_new().
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().
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().
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().
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.
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.
GtsSplit* gts_psurface_read_vertex | ( | GtsPSurface * | ps, |
GtsFile * | fp | ||
) |
gts_psurface_read_vertex: : a GtsPSurface prealably created with gts_psurface_open(). : a GtsFile.
Reads in one vertex split operation from and performs the expansion.
If an error occurs while reading the file, the field of is set.
Returns: the newly created GtsSplit or NULL if no vertex split could be read from .
Definition at line 1615 of file split.c.
References _GtsSplitCFace::a1, _GtsSplitCFace::a2, cface_class(), _GtsSplit::cfaces, _GtsSurface::edge_class, _GtsSplitCFace::f, f, _GtsSurface::face_class, _GtsPSurface::faces, FALSE, _CFace::flags, fp, GTS_ERROR, GTS_FACE, gts_file_error(), gts_file_first_token_after(), gts_file_next_token(), GTS_INT, GTS_NONE, GTS_OBJECT, GTS_OBJECT_CLASS, gts_object_destroy(), gts_object_new(), GTS_PSURFACE_IS_CLOSED, GTS_SPLIT, gts_split_expand(), _GtsSplit::ncf, _CFace::parent_split, _GtsPSurface::pos, _GtsObject::reserved, _GtsPSurface::s, _GtsPSurface::split, _GtsPSurface::split_class, _CFace::t, _GtsFile::token, _GtsFile::type, _GtsSplit::v, _GtsSplit::v1, _GtsSplit::v2, _GtsSurface::vertex_class, and _GtsPSurface::vertices.
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().
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.
void gts_psurface_write | ( | GtsPSurface * | ps, |
FILE * | fptr | ||
) |
gts_psurface_write: : a GtsPSurface. : a file pointer.
Writes to a GTS progressive surface description.
Definition at line 1271 of file split.c.
References _GtsSplitCFace::a1, _GtsSplitCFace::a2, CFACE, _GtsSplit::cfaces, _GtsSurface::edge_class, _GtsSplitCFace::f, _GtsSurface::face_class, FALSE, _CFace::flags, GTS_IS_SPLIT, GTS_OBJECT, GTS_OBJECT_CLASS, gts_object_reset_reserved(), GTS_POINT_CLASS, GTS_PSURFACE_IS_CLOSED, gts_psurface_remove_vertex(), GTS_SPLIT, gts_split_expand(), gts_surface_foreach_face(), gts_surface_foreach_vertex(), gts_surface_write(), GTS_VERTEX, hash(), index_face(), index_object(), _GtsSplit::ncf, _GtsPSurface::pos, _GtsPSurface::s, _GtsPSurface::split, _CFace::t, _GtsSplit::v, _GtsSplit::v1, _GtsSplit::v2, and _GtsSurface::vertex_class.
void gts_range_add_value | ( | GtsRange * | r, |
gdouble | val | ||
) |
gts_range_add_value: : a GtsRange. : a value to add to .
Adds to .
Definition at line 465 of file surface.c.
References _GtsRange::max, _GtsRange::min, min, _GtsRange::n, _GtsRange::sum, and _GtsRange::sum2.
Referenced by compute_degree(), gts_bb_tree_segment_distance(), gts_bb_tree_triangle_distance(), gts_graph_partition_print_stats(), quality_foreach_edge(), quality_foreach_face(), stats_foreach_edge(), stats_foreach_vertex(), and update_cluster().
void gts_range_init | ( | GtsRange * | r | ) |
gts_range_init: : a GtsRange.
Initializes a GtsRange.
Definition at line 432 of file surface.c.
References _GtsRange::max, _GtsRange::min, _GtsRange::n, _GtsRange::sum, and _GtsRange::sum2.
Referenced by gts_bb_tree_segment_distance(), gts_bb_tree_surface_boundary_distance(), gts_bb_tree_surface_distance(), gts_bb_tree_triangle_distance(), gts_cluster_grid_update(), gts_graph_partition_print_stats(), gts_graph_print_stats(), gts_surface_quality_stats(), and gts_surface_stats().
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().
void gts_range_update | ( | GtsRange * | r | ) |
gts_range_update: : a GtsRange.
Updates the fields of .
Definition at line 482 of file surface.c.
References _GtsRange::max, _GtsRange::mean, _GtsRange::min, _GtsRange::n, _GtsRange::stddev, _GtsRange::sum, and _GtsRange::sum2.
Referenced by gts_bb_tree_segment_distance(), gts_bb_tree_triangle_distance(), gts_cluster_grid_update(), gts_graph_partition_print_stats(), gts_graph_print_stats(), gts_surface_quality_stats(), and gts_surface_stats().
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().
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.
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().
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().
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.
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().
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.
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().
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().
GtsSListContainerClass* gts_slist_container_class | ( | void | ) |
Definition at line 474 of file container.c.
References gts_container_class(), GTS_OBJECT_CLASS, gts_object_class_new(), slist_container_class_init(), and slist_container_init().
Referenced by gts_gnode_class(), slist_container_add(), slist_container_destroy(), and slist_container_remove().
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().
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().
void gts_split_expand | ( | GtsSplit * | vs, |
GtsSurface * | s, | ||
GtsEdgeClass * | klass | ||
) |
gts_split_expand: : a GtsSplit. : a GtsSurface. : a GtsEdgeClass.
Expands the vertex split adding the newly created faces to . Any new edge will be of class .
Definition at line 776 of file split.c.
References _GtsSplitCFace::a1, _GtsSplitCFace::a2, CFACE, cface_expand(), _GtsSplit::cfaces, _GtsSplitCFace::f, FALSE, gts_allow_floating_vertices, gts_edge_new(), GTS_OBJECT, GTS_SEGMENT, GTS_SPLIT_V1, GTS_SPLIT_V2, gts_surface_add_face(), _GtsSplit::ncf, _GtsVertex::segments, _GtsEdge::triangles, TRUE, and _GtsSplit::v.
Referenced by gts_hsplit_expand(), gts_hsurface_new(), gts_psurface_add_vertex(), gts_psurface_read_vertex(), gts_psurface_write(), and gts_split_collapse().
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().
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().
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().
void gts_surface_add_face | ( | GtsSurface * | s, |
GtsFace * | f | ||
) |
gts_surface_add_face: : a GtsSurface. : a GtsFace.
Adds face to surface .
Definition at line 148 of file surface.c.
References add_face(), _GtsSurface::faces, FALSE, GTS_OBJECT, GTS_SURFACE_CLASS, _GtsSurface::keep_faces, and _GtsFace::surfaces.
Referenced by add_face(), add_face_bcl(), add_intersecting(), add_to_surface(), build_cdt(), delaunay_create_from_vertices(), foreach_face_copy(), generate_icosahedron(), gts_cluster_grid_add_triangle(), gts_delaunay_add_vertex_to_face(), gts_edge_swap(), gts_isosurface_slice(), gts_split_expand(), gts_surface_read(), intersect_edges(), merge_foreach_face(), midvertex_insertion(), surface_read(), swap_if_in_circle(), tessellate_face(), traverse_manifold(), triangulate_loop(), triangulate_polygon(), and walk_faces().
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().
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().
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().
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().
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().
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.
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.
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.
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().
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.
void gts_surface_foreach_edge | ( | GtsSurface * | s, |
GtsFunc | func, | ||
gpointer | data | ||
) |
gts_surface_foreach_edge: : a GtsSurface. : a GtsFunc. : user data to be passed to .
Calls once for each edge of .
Definition at line 1032 of file surface.c.
References edge_foreach_face(), _GtsSurface::faces, FALSE, _GtsSurface::keep_faces, and TRUE.
Referenced by gts_bb_tree_surface_boundary_distance(), gts_delaunay_conform(), gts_psurface_new(), gts_surface_boundary(), gts_surface_coarsen(), gts_surface_copy(), gts_surface_distance(), gts_surface_edge_number(), gts_surface_graph_new(), gts_surface_inter_check(), gts_surface_inter_new(), gts_surface_intersection(), gts_surface_is_closed(), gts_surface_is_manifold(), gts_surface_is_orientable(), gts_surface_quality_stats(), gts_surface_refine(), gts_surface_split(), gts_surface_stats(), gts_surface_write(), gts_surface_write_oogl_boundary(), toporouter_draw_surface(), traverse_boundary(), and traverse_remaining().
void gts_surface_foreach_face | ( | GtsSurface * | s, |
GtsFunc | func, | ||
gpointer | data | ||
) |
gts_surface_foreach_face: : a GtsSurface. : a GtsFunc. : user data to be passed to .
Calls once for each face of .
Definition at line 1079 of file surface.c.
References _GtsSurface::faces, FALSE, foreach_face(), _GtsSurface::keep_faces, and TRUE.
Referenced by build_cdt(), gts_bb_tree_surface(), gts_bb_tree_surface_distance(), gts_delaunay_check(), gts_delaunay_refine(), gts_psurface_new(), gts_psurface_write(), gts_surface_area(), gts_surface_center_of_area(), gts_surface_center_of_mass(), gts_surface_copy(), gts_surface_distance(), gts_surface_graph_new(), gts_surface_inter_boolean(), gts_surface_inter_new(), gts_surface_intersection(), gts_surface_merge(), gts_surface_quality_stats(), gts_surface_split(), gts_surface_stats(), gts_surface_tessellate(), gts_surface_traverse_destroy(), gts_surface_volume(), gts_surface_write(), gts_surface_write_oogl(), gts_surface_write_vtk(), map_new(), surface_destroy(), and triangulate_face().
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.
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().
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().
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.
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().
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.
void gts_surface_inter_boolean | ( | GtsSurfaceInter * | si, |
GtsSurface * | surface, | ||
GtsBooleanOperation | op | ||
) |
gts_surface_inter_boolean: : a GtsSurfaceInter. : a GtsSurface. : a GtsBooleanOperation.
Adds to the part of the surface described by and .
Definition at line 1847 of file boolean.c.
References _GtsSurfaceInter::edges, GTS_1_IN_2, GTS_1_OUT_2, GTS_2_IN_1, GTS_2_OUT_1, gts_edge_is_boundary(), gts_face_has_parent_surface(), GTS_OBJECT, gts_object_reset_reserved(), gts_surface_foreach_face(), mark_edge(), _GtsSurfaceInter::s1, _GtsSurfaceInter::s2, triangle_orientation(), _GtsEdge::triangles, and walk_faces().
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.
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().
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.
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().
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.
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.
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.
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.
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().
GtsSurface* gts_surface_new | ( | GtsSurfaceClass * | klass, |
GtsFaceClass * | face_class, | ||
GtsEdgeClass * | edge_class, | ||
GtsVertexClass * | vertex_class | ||
) |
gts_surface_new: : a GtsSurfaceClass. : a GtsFaceClass. : a GtsEdgeClass. : a GtsVertexClass.
Returns: a new empty GtsSurface.
Definition at line 126 of file surface.c.
References _GtsSurface::edge_class, _GtsSurface::face_class, GTS_OBJECT_CLASS, gts_object_new(), GTS_SURFACE, s, and _GtsSurface::vertex_class.
Referenced by build_cdt(), delaunay_create_from_vertices(), gts_surface_graph_surface(), gts_surface_inter_new(), gts_surface_is_self_intersecting(), surface_inter_new(), traverse_boundary(), traverse_remaining(), and triangulate_face().
void gts_surface_print_stats | ( | GtsSurface * | s, |
FILE * | fptr | ||
) |
gts_surface_print_stats: : a GtsSurface. : a file pointer.
Writes in the file pointed to by the statistics for surface .
Definition at line 639 of file surface.c.
References _GtsSurfaceQualityStats::edge_length, _GtsSurfaceStats::edges_per_vertex, _GtsSurfaceQualityStats::face_area, _GtsSurfaceQualityStats::face_quality, _GtsSurfaceStats::faces_per_edge, gts_range_print(), gts_surface_quality_stats(), gts_surface_stats(), _GtsRange::n, _GtsSurfaceStats::n_boundary_edges, _GtsSurfaceStats::n_duplicate_edges, _GtsSurfaceStats::n_duplicate_faces, _GtsSurfaceStats::n_faces, _GtsSurfaceStats::n_incompatible_faces, and _GtsSurfaceStats::n_non_manifold_edges.
Referenced by build_cdt().
void gts_surface_quality_stats | ( | GtsSurface * | s, |
GtsSurfaceQualityStats * | stats | ||
) |
gts_surface_quality_stats: : a GtsSurface. : a GtsSurfaceQualityStats.
Fills with quality statistics relevant to surface .
Definition at line 612 of file surface.c.
References _GtsSurfaceQualityStats::edge_angle, _GtsSurfaceQualityStats::edge_length, _GtsSurfaceQualityStats::face_area, _GtsSurfaceQualityStats::face_quality, gts_range_init(), gts_range_update(), gts_surface_foreach_edge(), gts_surface_foreach_face(), _GtsSurfaceQualityStats::parent, quality_foreach_edge(), quality_foreach_face(), and s.
Referenced by gts_surface_print_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.
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.
void gts_surface_remove_face | ( | GtsSurface * | s, |
GtsFace * | f | ||
) |
gts_surface_remove_face: : a GtsSurface. : a GtsFace.
Removes face from surface .
Definition at line 178 of file surface.c.
References _GtsSurface::faces, FALSE, gts_allow_floating_faces, GTS_OBJECT, gts_object_destroy(), GTS_OBJECT_DESTROYED, GTS_SURFACE_CLASS, _GtsSurface::keep_faces, and _GtsFace::surfaces.
Referenced by cface_new(), face_destroy(), gts_delaunay_add_vertex_to_face(), gts_delaunay_remove_hull(), gts_delaunay_remove_vertex(), gts_edge_swap(), remove_intersected_vertex(), remove_triangles(), swap_if_in_circle(), traverse_boundary(), and traverse_remaining().
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().
void gts_surface_stats | ( | GtsSurface * | s, |
GtsSurfaceStats * | stats | ||
) |
gts_surface_stats: : a GtsSurface. : a GtsSurfaceStats.
Fills with the statistics relevant to surface .
Definition at line 556 of file surface.c.
References _GtsSurfaceStats::edges_per_vertex, _GtsSurfaceStats::faces_per_edge, gts_range_init(), gts_range_update(), gts_surface_foreach_edge(), gts_surface_foreach_face(), gts_surface_foreach_vertex(), _GtsSurfaceStats::n_boundary_edges, _GtsSurfaceStats::n_duplicate_edges, _GtsSurfaceStats::n_duplicate_faces, _GtsSurfaceStats::n_faces, _GtsSurfaceStats::n_incompatible_faces, _GtsSurfaceStats::n_non_manifold_edges, _GtsSurfaceStats::parent, s, stats_foreach_edge(), stats_foreach_face(), and stats_foreach_vertex().
Referenced by gts_surface_print_stats(), gts_surface_write(), gts_surface_write_oogl(), and gts_surface_write_vtk().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
GtsEdge* gts_triangle_edge_opposite | ( | GtsTriangle * | t, |
GtsVertex * | v | ||
) |
gts_triangle_edge_opposite: : a GtsTriangle. : a GtsVertex of .
Returns: the edge of opposite or NULL if is not a vertice of .
Definition at line 197 of file triangle.c.
References _GtsTriangle::e1, _GtsTriangle::e2, _GtsTriangle::e3, GTS_SEGMENT, _GtsSegment::v1, and _GtsSegment::v2.
Referenced by angle_obtuse(), flow_from_edge_to_edge(), gts_edge_collapse_creates_fold(), region_area(), remove_intersected_vertex(), triangle_all_candidate_points_from_vertex(), triangle_candidate_points_from_vertex(), triangle_interior_capacity(), triangle_obtuse(), and vertex_encroaches().
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().
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.
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.
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().
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().
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().
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().
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().
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 | ( | GtsTriangle * | t, |
GtsVertex ** | v1, | ||
GtsVertex ** | v2, | ||
GtsVertex ** | v3 | ||
) |
gts_triangle_vertices: : a GtsTriangle. : a pointer on a GtsVertex. : a pointer on a GtsVertex. : a pointer on a GtsVertex.
Fills , and with the oriented set of vertices, summits of .
Definition at line 812 of file triangle.c.
References _GtsTriangle::e1, _GtsTriangle::e2, and GTS_SEGMENT.
Referenced by build_cdt(), center_of_area_foreach_face(), center_of_mass_foreach_face(), delaunay_check(), delaunay_create_from_vertices(), find_neighbor_backward(), find_neighbor_forward(), gts_bb_tree_triangle_distance(), gts_point_in_triangle_circle(), gts_point_is_in_triangle(), gts_surface_strip(), gts_triangle_circumcircle_center(), intersection_orientation(), ray_intersects_triangle(), remove_intersected_vertex(), vertex_normal_attributes(), volume_foreach_face(), write_face_oogl(), and write_face_vtk().
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().
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().
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().
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 | ) |
void gts_vector4_print | ( | GtsVector4 | v, |
FILE * | fptr | ||
) |
gts_vector4_print: : a GtsVector4. : a file descriptor.
Print to file .
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().
GtsVertexClass* gts_vertex_class | ( | void | ) |
gts_vertex_class:
Returns: the GtsVertexClass.
Definition at line 70 of file vertex.c.
References GTS_OBJECT_CLASS, gts_object_class_new(), gts_point_class(), vertex_class_init(), and vertex_init().
Referenced by gts_color_vertex_class(), gts_nvertex_class(), gts_triangle_enclosing(), gts_vertex_normal_class(), gts_volume_optimized_cost(), surface_init(), toporouter_vertex_class(), vertex_clone(), and vertex_destroy().
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().
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().
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.
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().
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().
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.
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().
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().
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().
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.
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().
GtsSegment* gts_vertices_are_connected | ( | GtsVertex * | v1, |
GtsVertex * | v2 | ||
) |
gts_vertices_are_connected: : a GtsVertex. : another GtsVertex.
Returns: if and are the vertices of the same GtsSegment this segment else NULL.
Definition at line 165 of file vertex.c.
References FALSE, s, _GtsVertex::segments, _GtsSegment::v1, and _GtsSegment::v2.
Referenced by cface_expand(), cface_new(), compute_candidate_points(), delete_route(), get_edge(), gts_cluster_grid_add_triangle(), gts_delaunay_add_vertex_to_face(), gts_edge_belongs_to_tetrahedron(), gts_edge_swap(), gts_isosurface_slice(), gts_split_collapse(), gts_split_new(), new_ear(), swap_if_in_circle(), triangle_all_candidate_points_from_edge(), triangle_candidate_points_from_edge(), triangle_candidate_points_from_vertex(), triangulate_polygon(), and vertices_routing_conflicts().
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.
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.
gdouble gts_volume_optimized_cost | ( | GtsEdge * | e, |
GtsVolumeOptimizedParams * | params | ||
) |
gts_volume_optimized_cost: : a GtsEdge. : a GtsVolumeOptimizedParams.
Returns: the cost for the collapse of as minimized by the function gts_volume_optimized_vertex().
Definition at line 501 of file vopt.c.
References _GtsVolumeOptimizedParams::boundary_weight, edge_boundary_cost(), edge_shape_cost(), edge_volume_cost(), GTS_OBJECT, gts_object_destroy(), GTS_POINT, gts_point_distance2(), GTS_SEGMENT, gts_vertex_class(), gts_volume_optimized_vertex(), _GtsVolumeOptimizedParams::shape_weight, and _GtsVolumeOptimizedParams::volume_weight.
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().
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().
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().
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().
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().
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().
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().
GTS_C_VAR gboolean gts_allow_floating_edges |
GTS_C_VAR gboolean gts_allow_floating_faces |
GTS_C_VAR gboolean gts_allow_floating_gnodes |
GTS_C_VAR gboolean gts_allow_floating_vertices |
Definition at line 454 of file gts.h.
Referenced by build_cdt(), delaunay_create_from_vertices(), gts_split_collapse(), gts_split_expand(), gts_surface_read(), gts_vertices_merge(), segment_destroy(), split_destroy(), surface_read(), and unconstrain().
GTS_C_VAR const guint gts_binary_age |
GTS_C_VAR const guint gts_interface_age |
GTS_C_VAR const guint gts_major_version |
GTS_C_VAR const guint gts_micro_version |
GTS_C_VAR const guint gts_minor_version |