Revision 42309 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.geometry/org.gvsig.fmap.geometry.api/src/main/java/org/gvsig/fmap/geom/primitive/Arc.java

View differences:

Arc.java
26 26

  
27 27
/**
28 28
 * <p>
29
 * This interface is equivalent to the GM_Arc specified in 
29
 * This interface is equivalent to the GM_Arc specified in
30 30
 * <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>.
31
 * A Arc is defined by 3 points, and consists of the arc of the circle determined by the 3 points, 
32
 * starting at the first, passing through the second and terminating at the third. 
33
 * If the 3 points are co-linear, then the arc shall be a 3-point line string, and will 
34
 * not be able to return values for center, radius, start angle and end angle. 
35
 * </p> 
31
 * A Arc is defined by 3 points, and consists of the arc of the circle determined by the 3 points,
32
 * starting at the first, passing through the second and terminating at the third.
33
 * If the 3 points are co-linear, then the arc shall be a 3-point line string, and will
34
 * not be able to return values for center, radius, start angle and end angle.
35
 * </p>
36 36
 * @see <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>
37 37
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
38 38
 */
39 39
public interface Arc extends Curve {
40
		
40

  
41 41
	/**
42 42
	 * Sets the three points to define an arc.
43 43
	 * These are three ordered points that belong to the arc
44 44
	 * (none of them is the center of the ellipse/circle). Therefore
45 45
	 * they must not be aligned.
46
	 * 
46
	 *
47 47
	 * @param startPoint
48 48
	 * The start point of an arc.
49 49
     * @param midPoint
......
52 52
	 * The end point of an arc.
53 53
	 * @exception IllegalArgumentException if the three points are aligned or
54 54
	 * there is a repeated point.
55
	 * 
55
	 *
56 56
	 */
57 57
	void setPoints(Point startPoint, Point midPoint, Point endPoint);
58
	
58

  
59 59
	/**
60 60
	 * Sets the values to define an arc.
61 61
	 * @param center The center of the arc.
62 62
	 * @param radius The radius.
63 63
	 * @param startAngle The start angle of the arc (in radians)
64
	 * @param angleExt The angular extent of the arc (in radians). 
65
	 * 
66
	 * The sign convention is: 
67
	 * 
68
	 * startAngle = 0 is "3 o'clock"; 
69
	 * startAngle = (PI / 3) is "1 o'clock"; 
70
     * angleExt > 0 means "advancing clockwise"; 
64
	 * @param angleExt The angular extent of the arc (in radians).
65
	 *
66
	 * The sign convention is:
67
	 *
68
	 * startAngle = 0 is "3 o'clock";
69
	 * startAngle = (PI / 3) is "1 o'clock";
70
     * angleExt > 0 means "advancing clockwise";
71 71
     * angleExt < 0 means "advancing counterclockwise".
72 72
	 */
73 73
	void setPoints (Point center, double radius, double startAngle, double angleExt);
......
77 77
     * @param center The center of the arc.
78 78
     * @param radius The radius.
79 79
     * @param startAngle The start angle of the arc (in radians)
80
     * @param angleExt The angular extent of the arc (in radians). 
81
     * 
82
     * The sign convention is: 
83
     * 
84
     * startAngle = 0 is "3 o'clock"; 
85
     * startAngle = (PI / 3) is "1 o'clock"; 
86
     * angleExt > 0 means "advancing clockwise"; 
80
     * @param angleExt The angular extent of the arc (in radians).
81
     *
82
     * The sign convention is:
83
     *
84
     * startAngle = 0 is "3 o'clock";
85
     * startAngle = (PI / 3) is "1 o'clock";
86
     * angleExt > 0 means "advancing clockwise";
87 87
     * angleExt < 0 means "advancing counterclockwise".
88 88
     */
89 89
    void setPointsStartExt (Point center, double radius, double startAngle, double angleExt);
90
    
90

  
91 91
    /**
92 92
     * Sets the values to define an arc. The arc will go from
93 93
     * startAngle to endAngle clockwise. Angles will be
94 94
     * normalized to ]-PI, PI] (-PI excluded) before creating
95
     * the arc. 
96
     * 
95
     * the arc.
96
     *
97 97
     * @param center The center of the arc.
98 98
     * @param radius The radius.
99 99
     * @param startAngle The start angle of the arc (in radians)
100
     * @param endAngle The end angle of the arc (in radians). 
101
     * 
100
     * @param endAngle The end angle of the arc (in radians).
101
     *
102 102
     */
103 103
    void setPointsStartEnd (Point center, double radius, double startAngle, double endAngle );
104
	
104

  
105 105
	/**
106 106
	 * Return the first point that has been used to create the arc.
107 107
	 * @return
108 108
	 * The first point of the arc.
109 109
	 */
110 110
	Point getInitPoint();
111
		
111

  
112 112
	/**
113 113
	 * Return the end point that has been used to create the arc.
114 114
	 * @return
115 115
	 * The end point of the arc.
116 116
	 */
117 117
	Point getEndPoint();
118
	
118

  
119 119
	/**
120 120
	 * Return the center of the arc, that is, the center of the ellipse/circle
121 121
	 * in which the arc is based.
122
	 * 
122
	 *
123 123
	 * @return The center of the arc.
124 124
	 */
125 125
	Point getCenterPoint();
126
		
127
		
126

  
127
	   /**
128
     * Return the middle point of the arc.
129
     *
130
     * @return The middle point of the arc.
131
     */
132
    Point getMiddlePoint();
133

  
134

  
128 135
}

Also available in: Unified diff