Statistics
| Revision:

root / branches / v2_0_0_prep / libraries / libFMap_geometries / src / org / gvsig / fmap / geom / primitive / Arc.java @ 38784

History | View | Annotate | Download (2.99 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 * 
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 * 
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 * 
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
19
 * MA  02110-1301, USA.
20
 * 
21
 */
22

    
23
/*
24
 * AUTHORS (In addition to CIT):
25
 * 2009 {Iver T.I.}   {Task}
26
 */
27

    
28
package org.gvsig.fmap.geom.primitive;
29

    
30
/**
31
 * <p>
32
 * This interface is equivalent to the GM_Arc specified in 
33
 * <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>.
34
 * A Arc is defined by 3 points, and consists of the arc of the circle determined by the 3 points, 
35
 * starting at the first, passing through the second and terminating at the third. 
36
 * If the 3 points are co-linear, then the arc shall be a 3-point line string, and will 
37
 * not be able to return values for center, radius, start angle and end angle. 
38
 * </p> 
39
 * @see <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>
40
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
41
 */
42
public interface Arc extends Curve {
43
                
44
        /**
45
         * Sets the three points to define an arc.
46
         * @param midPoint
47
         * The middle point of an arc.
48
         * @param startPoint
49
         * The start point of an arc.
50
         * @param endPoint
51
         * The end point of an arc.
52
         */
53
        void setPoints(Point midPoint, Point startPoint, Point endPoint);
54
        
55
        /**
56
         * Sets the values to define an arc.
57
         * @param center The center of the arc.
58
         * @param radius The radius.
59
         * @param startAngle The start angle of the arc (in radians)
60
         * @param angleExt The angular extent of the arc (in radians). 
61
         * 
62
         * The sign convention is: 
63
         * 
64
         * startAngle = 0 is "3 o'clock"; 
65
         * startAngle = (PI / 3) is "1 o'clock"; 
66
     * angleExt > 0 means "advancing clockwise"; 
67
     * angleExt < 0 means "advancing counterclockwise".
68
         */
69
        void setPoints (Point center, double radius, double startAngle, double angleExt);
70
        
71
        /**
72
         * Return the first point that has been used to create the arc.
73
         * @return
74
         * The first point of the arc.
75
         */
76
        Point getInitPoint();
77
                
78
        /**
79
         * Return the end point that has been used to create the arc.
80
         * @return
81
         * The end point of the arc.
82
         */
83
        Point getEndPoint();
84
        
85
        /**
86
         * Return the center point that has been used to create the arc.
87
         * @return
88
         * The center point of the arc.
89
         */
90
        Point getCenterPoint();
91
                
92
                
93
}