pcb 4.1.1
An interactive printed circuit board layout editor.
|
#include "gts.h"
Go to the source code of this file.
#define edge_use_vertex | ( | e, | |
v | |||
) |
(GTS_SEGMENT(e)->v1 == v ||\ GTS_SEGMENT(e)->v2 == v)
Definition at line 408 of file edge.c.
Referenced by next_edge().
static void edge_class_init | ( | GtsObjectClass * | klass | ) | [static] |
Definition at line 48 of file edge.c.
References _GtsObjectClass::clone, _GtsObjectClass::destroy, edge_clone(), and edge_destroy().
Referenced by gts_edge_class().
Definition at line 40 of file edge.c.
References GTS_EDGE, gts_edge_class(), GTS_OBJECT_CLASS, and GTS_SEGMENT.
Referenced by edge_class_init().
static void edge_destroy | ( | GtsObject * | object | ) | [static] |
Definition at line 24 of file edge.c.
References edge, GTS_EDGE, gts_edge_class(), GTS_OBJECT_CLASS, gts_object_destroy(), and _GtsEdge::triangles.
Referenced by edge_class_init(), and gts_edge_remove().
static void edge_init | ( | GtsEdge * | edge | ) | [static] |
Definition at line 54 of file edge.c.
References _GtsEdge::triangles.
Referenced by gts_edge_class().
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().
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().
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().
void gts_edge_remove | ( | GtsEdge * | edge | ) |
Definition at line 99 of file edge.c.
References edge_destroy(), GTS_OBJECT, _GtsEdge::segment, _GtsVertex::segments, _GtsSegment::v1, and _GtsSegment::v2.
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.
static GtsEdge* next_edge | ( | GtsTriangle * | t, |
GtsEdge * | e1, | ||
GtsEdge * | e | ||
) | [static] |
Definition at line 411 of file edge.c.
References _GtsTriangle::e1, _GtsTriangle::e2, _GtsTriangle::e3, edge_use_vertex, and GTS_SEGMENT.
Referenced by gts_edge_is_contact(), and triangle_next().
Definition at line 431 of file edge.c.
References GTS_OBJECT, next_edge(), and _GtsEdge::triangles.
Referenced by gts_edge_is_contact().
static void triangle_vertices_edges | ( | GtsTriangle * | t, |
GtsEdge * | e, | ||
GtsVertex ** | v, | ||
GtsEdge ** | ee1, | ||
GtsEdge ** | ee2 | ||
) | [static] |
Definition at line 346 of file edge.c.
References _GtsTriangle::e1, _GtsTriangle::e2, _GtsTriangle::e3, and GTS_SEGMENT.
Referenced by gts_edge_belongs_to_tetrahedron().
gboolean gts_allow_floating_edges = FALSE |
Definition at line 22 of file edge.c.
Referenced by gts_delaunay_add_constraint(), gts_delaunay_remove_hull(), gts_edges_merge(), gts_psurface_new(), gts_surface_coarsen(), and triangle_destroy().