pcb 4.1.1
An interactive printed circuit board layout editor.
|
#include "gts.h"
Go to the source code of this file.
Functions | |
static void | segment_destroy (GtsObject *object) |
static void | segment_class_init (GtsObjectClass *klass) |
static void | segment_init (GtsSegment *segment) |
GtsSegmentClass * | gts_segment_class (void) |
GtsSegment * | gts_segment_new (GtsSegmentClass *klass, GtsVertex *v1, GtsVertex *v2) |
GtsSegment * | gts_segment_is_duplicate (GtsSegment *s) |
GtsIntersect | gts_segments_are_intersecting (GtsSegment *s1, GtsSegment *s2) |
GtsVertex * | gts_segment_midvertex (GtsSegment *s, GtsVertexClass *klass) |
GSList * | gts_segments_from_vertices (GSList *vertices) |
gboolean | gts_segment_is_ok (GtsSegment *s) |
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().
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.
static void segment_class_init | ( | GtsObjectClass * | klass | ) | [static] |
Definition at line 41 of file segment.c.
References _GtsObjectClass::destroy, and segment_destroy().
Referenced by gts_segment_class().
static void segment_destroy | ( | GtsObject * | object | ) | [static] |
Definition at line 22 of file segment.c.
References gts_allow_floating_vertices, GTS_OBJECT, GTS_OBJECT_CLASS, gts_object_destroy(), GTS_OBJECT_DESTROYED, GTS_SEGMENT, gts_segment_class(), _GtsVertex::segments, _GtsSegment::v1, and _GtsSegment::v2.
Referenced by segment_class_init().
static void segment_init | ( | GtsSegment * | segment | ) | [static] |
Definition at line 46 of file segment.c.
References _GtsSegment::v1, and _GtsSegment::v2.
Referenced by gts_segment_class().