1 #ifndef __P2TC_REFINE_EDGE_H__
2 #define __P2TC_REFINE_EDGE_H__
6 #include "triangulation.h"
10 * A struct for an edge in a triangular mesh
14 /** The end point of this mesh */
17 /** The edge going in the opposite direction from this edge */
20 /** Is this a constrained edge? */
23 /** The triangle where this edge goes clockwise along its outline */
27 * The angle of the direction of this edge. Although it can be
28 * computed anytime using atan2 on the vector of this edge, we cache
29 * it here since it's heavily used and the computation is expensive.
30 * The angle increases as we go CCW, and it's in the range [-PI,+PI]
35 * Is this edge a delaunay edge? This field is used by the refinement
36 * algorithm and should not be used elsewhere!
40 /** A count of references to the edge */
44 #define P2TR_EDGE_START(E) ((E)->mirror->end)
46 P2trEdge* p2tr_edge_new (P2trPoint *start,
48 gboolean constrained);
50 P2trEdge* p2tr_edge_ref (P2trEdge *self);
52 void p2tr_edge_unref (P2trEdge *self);
54 void p2tr_edge_free (P2trEdge *self);
56 void p2tr_edge_remove (P2trEdge *self);
58 P2trMesh* p2tr_edge_get_mesh (P2trEdge *self);
60 gboolean p2tr_edge_is_removed (P2trEdge *self);
62 gdouble p2tr_edge_get_length (P2trEdge* self);
64 gdouble p2tr_edge_get_length_squared (P2trEdge* self);
66 gdouble p2tr_edge_angle_between (P2trEdge *e1,