/[zanavi_public1]/navit/navit/maptool/refine/point.h
ZANavi

Contents of /navit/navit/maptool/refine/point.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (show annotations) (download)
Mon Feb 4 17:41:59 2013 UTC (11 years, 1 month ago) by zoff99
File MIME type: text/plain
File size: 3724 byte(s)
new map version, lots of fixes and experimental new features
1 /*
2 * This file is a part of Poly2Tri-C
3 * (c) Barak Itkin <lightningismyname@gmail.com>
4 * http://code.google.com/p/poly2tri-c/
5 *
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without modification,
9 * are permitted provided that the following conditions are met:
10 *
11 * * Redistributions of source code must retain the above copyright notice,
12 * this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above copyright notice,
14 * this list of conditions and the following disclaimer in the documentation
15 * and/or other materials provided with the distribution.
16 * * Neither the name of Poly2Tri nor the names of its contributors may be
17 * used to endorse or promote products derived from this software without specific
18 * prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33 #ifndef __P2TC_REFINE_POINT_H__
34 #define __P2TC_REFINE_POINT_H__
35
36 #include <glib.h>
37 #include "vector2.h"
38 #include "triangulation.h"
39
40 /**
41 * @struct P2trPoint_
42 * A struct for a point in a triangular mesh
43 */
44 struct P2trPoint_
45 {
46 /** The 2D coordinates of the point */
47 P2trVector2 c;
48
49 /**
50 * A list of edges (@ref P2trEdge) which go out of this point (i.e.
51 * the point is their start point). The edges are sorted by ASCENDING
52 * angle, meaning they are sorted Counter Clockwise */
53 GList *outgoing_edges;
54
55 /** A count of references to the point */
56 guint refcount;
57
58 /** The triangular mesh containing this point */
59 P2trMesh *mesh;
60 };
61
62 P2trPoint* p2tr_point_new (const P2trVector2 *c);
63
64 P2trPoint* p2tr_point_new2 (gdouble x, gdouble y);
65
66 P2trPoint* p2tr_point_ref (P2trPoint *self);
67
68 void p2tr_point_unref (P2trPoint *self);
69
70 void p2tr_point_free (P2trPoint *self);
71
72 void p2tr_point_remove (P2trPoint *self);
73
74 P2trEdge* p2tr_point_has_edge_to (P2trPoint *start,
75 P2trPoint *end);
76
77 P2trEdge* p2tr_point_get_edge_to (P2trPoint *start,
78 P2trPoint *end,
79 gboolean do_ref);
80
81 void _p2tr_point_insert_edge (P2trPoint *self,
82 P2trEdge *e);
83
84 void _p2tr_point_remove_edge (P2trPoint *self,
85 P2trEdge *e);
86
87 P2trEdge* p2tr_point_edge_ccw (P2trPoint *self,
88 P2trEdge *e);
89
90 P2trEdge* p2tr_point_edge_cw (P2trPoint *self,
91 P2trEdge *e);
92
93 gboolean p2tr_point_is_fully_in_domain (P2trPoint *self);
94
95 gboolean p2tr_point_has_constrained_edge (P2trPoint *self);
96
97 P2trMesh* p2tr_point_get_mesh (P2trPoint *self);
98
99 #endif

   
Visit the ZANavi Wiki