Package org.gvsig.fmap.geom.primitive
Interface Arc
- All Superinterfaces:
Cloneable,Comparable,Curve,Geometry,org.gvsig.tools.util.GetItem<Point>,org.gvsig.tools.util.IsEmpty,OrientableCurve,OrientablePrimitive,Primitive,Serializable,Shape,org.gvsig.tools.util.Size
This interface is equivalent to the GM_Arc specified in ISO 19107. A Arc is defined by 3 points, and consists of the arc of the circle determined by the 3 points, starting at the first, passing through the second and terminating at the third. If the 3 points are co-linear, then the arc shall be a 3-point line string, and will not be able to return values for center, radius, start angle and end angle.
- Author:
- Jorge Piera
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gvsig.fmap.geom.Geometry
Geometry.DIMENSIONS, Geometry.OPERATIONS, Geometry.SUBTYPES, Geometry.TYPES, Geometry.ValidationStatus -
Field Summary
Fields inherited from interface org.gvsig.fmap.geom.Geometry
BEST, E, EXTENDED_GEOMSUBTYPE_OFFSET, EXTENDED_GEOMTYPE_OFFSET, JOIN_STYLE_BEVEL, JOIN_STYLE_MITRE, JOIN_STYLE_ROUND, N, NE, NW, S, SE, SELECTHANDLER, STRETCHINGHANDLER, SW, W -
Method Summary
Modifier and TypeMethodDescriptionReturn the center of the arc, that is, the center of the ellipse/circle in which the arc is based.doubleReturns the counterclockwise angle formed by the horizontal line passing through the center, the center itself and the ending point.Return the end point that has been used to create the arc.Return the first point that has been used to create the arc.Return the middle point of the arc.doubleReturns the counterclockwise angle formed by the horizontal line passing through the center, the center itself and the starting point.voidSets the values to define an arc.voidSets the three points to define an arc.voidsetPointsStartEnd(Point center, double radius, double startAngle, double endAngle) Sets the values to define an arc.voidsetPointsStartExt(Point center, double radius, double startAngle, double angleExt) Sets the values to define an arc.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.gvsig.fmap.geom.Geometry
area, boundary, buffer, buffer, canBeReprojected, canBeTransformed, centroid, clone, cloneGeometry, closestPoints, contains, convertTo, convertToEWKB, convertToEWKB, convertToEWKBForcingType, convertToGeoJson, convertToHexEWKB, convertToHexEWKBQuietly, convertToHexWKB, convertToHexWKBQuietly, convertToWKB, convertToWKB, convertToWKBForcingType, convertToWKBQuietly, convertToWKT, convertToWKTQuietly, convexHull, coveredBy, covers, crosses, difference, disjoint, distance, ensureOrientation, equals, fastIntersects, fix, flip, force2D, forceSubtype, getBounds2D, getDimension, getEnvelope, getGeneralPath, getGeometryType, getHandlers, getInteriorPoint, getInternalShape, getPathIterator, getPathIterator, getProjection, getShape, getShape, getType, getValidationStatus, intersection, intersects, intersects, invokeOperation, invokeOperation, isCCW, isEmpty, isSimple, isValid, isWithinDistance, makeValid, move, offset, offset, out, overlaps, perimeter, reProject, rotate, scale, setProjection, setProjection, setProjectionIffNull, snapTo, toLines, toPoints, toPolygons, touches, transform, union, withinMethods inherited from interface org.gvsig.tools.util.GetItem
getMethods inherited from interface org.gvsig.tools.util.IsEmpty
isEmptyMethods inherited from interface org.gvsig.fmap.geom.primitive.OrientablePrimitive
addMoveToVertex, addVertex, addVertex, addVertex, closePrimitive, ensureCapacity, getCoordinateAt, getNumVertices, getVertex, insertVertex, removeVertex, setCoordinateAt, setGeneralPath, setVertexMethods inherited from interface java.awt.Shape
contains, contains, contains, contains, getBounds, intersectsMethods inherited from interface org.gvsig.tools.util.Size
size
-
Method Details
-
setPoints
Sets the three points to define an arc. These are three ordered points that belong to the arc (none of them is the center of the ellipse/circle). Therefore they must not be aligned.- Parameters:
startPoint- The start point of an arc.midPoint- The middle point of an arc.endPoint- The end point of an arc.- Throws:
IllegalArgumentException- if the three points are aligned or there is a repeated point.
-
setPoints
Sets the values to define an arc.- Parameters:
center- The center of the arc.radius- The radius.startAngle- The start angle of the arc (in radians)angleExt- The angular extent of the arc (in radians). The sign convention is: startAngle = 0 is "3 o'clock"; startAngle = (PI / 3) is "1 o'clock"; angleExt > 0 means "advancing clockwise"; angleExt < 0 means "advancing counterclockwise".
-
setPointsStartExt
Sets the values to define an arc.- Parameters:
center- The center of the arc.radius- The radius.startAngle- The start angle of the arc (in radians)angleExt- The angular extent of the arc (in radians). The sign convention is: startAngle = 0 is "3 o'clock"; startAngle = (PI / 3) is "1 o'clock"; angleExt > 0 means "advancing clockwise"; angleExt < 0 means "advancing counterclockwise".
-
setPointsStartEnd
Sets the values to define an arc. The arc will go from startAngle to endAngle clockwise. Angles will be normalized to ]-PI, PI] (-PI excluded) before creating the arc.- Parameters:
center- The center of the arc.radius- The radius.startAngle- The start angle of the arc (in radians)endAngle- The end angle of the arc (in radians).
-
getInitPoint
Point getInitPoint()Return the first point that has been used to create the arc.- Returns:
- The first point of the arc.
-
getEndPoint
Point getEndPoint()Return the end point that has been used to create the arc.- Returns:
- The end point of the arc.
-
getCenterPoint
Point getCenterPoint()Return the center of the arc, that is, the center of the ellipse/circle in which the arc is based.- Returns:
- The center of the arc.
-
getMiddlePoint
Point getMiddlePoint()Return the middle point of the arc.- Returns:
- The middle point of the arc.
-
getStartAngle
double getStartAngle()Returns the counterclockwise angle formed by the horizontal line passing through the center, the center itself and the starting point.- Returns:
-
getEndAngle
double getEndAngle()Returns the counterclockwise angle formed by the horizontal line passing through the center, the center itself and the ending point.- Returns:
-