org.gvsig.fmap.geom.primitive.impl
Class Circle2D

java.lang.Object
  extended by org.gvsig.fmap.geom.primitive.impl.AbstractPrimitive
      extended by org.gvsig.fmap.geom.primitive.impl.OrientablePrimitive2D
          extended by org.gvsig.fmap.geom.primitive.impl.OrientableSurface2D
              extended by org.gvsig.fmap.geom.primitive.impl.Surface2D
                  extended by org.gvsig.fmap.geom.primitive.impl.Circle2D
All Implemented Interfaces:
Shape, Serializable, Comparable, Geometry, Circle, FShape, OrientablePrimitive, OrientableSurface, Primitive, Surface
Direct Known Subclasses:
Circle2DZ

public class Circle2D
extends Surface2D
implements Circle

DOCUMENT ME!

Author:
Vicente Caballero Navarro
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.gvsig.fmap.geom.Geometry
Geometry.DIMENSIONS, Geometry.OPERATIONS, Geometry.SUBTYPES, Geometry.TYPES
 
Field Summary
 
Fields inherited from class org.gvsig.fmap.geom.primitive.impl.OrientablePrimitive2D
gp
 
Fields inherited from class org.gvsig.fmap.geom.primitive.impl.AbstractPrimitive
geometryType, geomManager, id, projection
 
Fields inherited from interface org.gvsig.fmap.geom.Geometry
BEST, E, EXTENDED_GEOMSUBTYPE_OFFSET, EXTENDED_GEOMTYPE_OFFSET, N, NE, NW, S, SE, SELECTHANDLER, STRETCHINGHANDLER, SW, W
 
Constructor Summary
Circle2D(GeometryType geometryType)
          The constructor with the GeometryType like and argument is used by the GeometryType#create() to create the geometry
 
Method Summary
 FShape cloneFShape()
          Creates and returns a shape equal and independent of this one.
 Point getCenter()
          Returns the center of the circle.
 double getRadious()
          Returns the radius of the circle
 Handler[] getSelectHandlers()
          Returns the handlers used to select the geometries.
 int getShapeType()
          Gets the geometry type of this shape.
 Handler[] getStretchingHandlers()
          Returns the handlers they utilized to stretch the geometries.
 boolean intersects(Rectangle2D r)
          El m�todo intersects de java.awt.Shape que define la intersecci�n entre una polil�nea y un Rectangle2D considera la polil�nea como un Shape gen�rico y se producen errores en la selecci�n de polil�neas.
 void setCoordinateAt(int index, int dimension, double value)
          Sets the value of a coordinate (direct position) in a concrete dimension
 void setGeneralPath(GeneralPathX generalPathX)
          Sets all the coordinates of the curve
 void setPoints(Point2D center, double radious)
           
 void setPoints(Point2D center, Point2D radious)
           
 void setPoints(Point2D p1, Point2D p2, Point2D p3)
           
 void setPoints(Point center, double radious)
          Sets the two values to define a circle.
 void setPoints(Point center, double radius, double initAngle, double angleExt)
           
 void setPoints(Point center, Point radious)
          Sets the two values to define a circle.
 void setPoints(Point p1, Point p2, Point p3)
          Sets the values to define a circle from three points.
 void transform(AffineTransform at)
          DOCUMENT ME!
 
Methods inherited from class org.gvsig.fmap.geom.primitive.impl.Surface2D
getSurfaceAppearance, setSurfaceAppearance
 
Methods inherited from class org.gvsig.fmap.geom.primitive.impl.OrientablePrimitive2D
addMoveToVertex, addVertex, addVertexes, closePrimitive, contains, contains, contains, contains, getBounds, getBounds2D, getCoordinateAt, getDimension, getEnvelope, getGeneralPath, getGeneralPathX, getNumVertices, getPathIterator, getPathIterator, getVertex, insertVertex, intersects, removeVertex, reProject, setVertex
 
Methods inherited from class org.gvsig.fmap.geom.primitive.impl.AbstractPrimitive
area, buffer, centroid, cloneGeometry, compareTo, contains, containsPoint, containsRectangle, convertToWKB, convertToWKT, convexHull, coveredBy, crosses, difference, disjoint, distance, equals, fastIntersects, getGeometryType, getHandlers, getId, getInternalShape, getShape, getShape, getSRS, getType, intersection, intersects, intersectsRectangle, invokeOperation, invokeOperation, isSimple, moveGeom, overlaps, perimeter, rotateGeom, scaleGeom, toString, touches, transform, union, within
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.gvsig.fmap.geom.primitive.Surface
getSurfaceAppearance, setSurfaceAppearance
 
Methods inherited from interface org.gvsig.fmap.geom.primitive.OrientablePrimitive
addMoveToVertex, addVertex, addVertexes, closePrimitive, getCoordinateAt, getNumVertices, getVertex, insertVertex, removeVertex, setVertex
 
Methods inherited from interface org.gvsig.fmap.geom.Geometry
area, buffer, centroid, cloneGeometry, contains, convertToWKB, convertToWKT, convexHull, coveredBy, crosses, difference, disjoint, distance, fastIntersects, getBounds2D, getDimension, getEnvelope, getGeneralPath, getGeometryType, getHandlers, getInternalShape, getPathIterator, getPathIterator, getShape, getShape, getType, intersection, intersects, invokeOperation, invokeOperation, isSimple, overlaps, perimeter, reProject, touches, union, within
 
Methods inherited from interface java.awt.Shape
contains, contains, contains, contains, getBounds, intersects
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

Circle2D

public Circle2D(GeometryType geometryType)
The constructor with the GeometryType like and argument is used by the GeometryType#create() to create the geometry

Parameters:
type - The geometry type
Method Detail

getCenter

public Point getCenter()
Description copied from interface: Circle
Returns the center of the circle.

Specified by:
getCenter in interface Circle
Returns:
The center of the circle.

cloneFShape

public FShape cloneFShape()
Description copied from interface: FShape
Creates and returns a shape equal and independent of this one.

Specified by:
cloneFShape in interface FShape
Overrides:
cloneFShape in class Surface2D
Returns:
the new shape.

getShapeType

public int getShapeType()
Description copied from interface: FShape
Gets the geometry type of this shape.

Specified by:
getShapeType in interface FShape
Overrides:
getShapeType in class Surface2D
Returns:
int the geometry type of this shape.

transform

public void transform(AffineTransform at)
Description copied from class: OrientablePrimitive2D
DOCUMENT ME!

Specified by:
transform in interface Geometry
Specified by:
transform in interface FShape
Overrides:
transform in class OrientablePrimitive2D
Parameters:
at - DOCUMENT ME!
See Also:
AffineTransform

getStretchingHandlers

public Handler[] getStretchingHandlers()
Description copied from interface: FShape
Returns the handlers they utilized to stretch the geometries.

Specified by:
getStretchingHandlers in interface FShape
Overrides:
getStretchingHandlers in class OrientablePrimitive2D
Returns:
Handlers the handlers used to stretch the geometries

getSelectHandlers

public Handler[] getSelectHandlers()
Description copied from interface: FShape
Returns the handlers used to select the geometries.

Specified by:
getSelectHandlers in interface FShape
Overrides:
getSelectHandlers in class OrientablePrimitive2D
Returns:
Handlers the handlers used to select the geometries

intersects

public boolean intersects(Rectangle2D r)
Description copied from class: OrientablePrimitive2D
El m�todo intersects de java.awt.Shape que define la intersecci�n entre una polil�nea y un Rectangle2D considera la polil�nea como un Shape gen�rico y se producen errores en la selecci�n de polil�neas. Por este motivo se ha modificado este m�todo intersect() de FPolyline2D para que realize la intersecci�n estricta entre el Rectangle2D y la polil�nea en cuesti�n. El precio es un incremento de tiempo m�ximo del 50%.

Specified by:
intersects in interface Shape
Specified by:
intersects in interface Geometry
Overrides:
intersects in class Surface2D
Parameters:
r - Rect�ngulo.
Returns:
True si intersecta con el rectangulo que se pasa como par�metro.

setGeneralPath

public void setGeneralPath(GeneralPathX generalPathX)
Description copied from interface: OrientablePrimitive
Sets all the coordinates of the curve

Specified by:
setGeneralPath in interface OrientablePrimitive
Overrides:
setGeneralPath in class OrientablePrimitive2D
Parameters:
generalPathX - The generalPath that contains all the coordinates

setPoints

public void setPoints(Point center,
                      Point radious)
Description copied from interface: Circle
Sets the two values to define a circle.

Specified by:
setPoints in interface Circle
Overrides:
setPoints in class OrientablePrimitive2D
Parameters:
center - The center point of the circle.
radious - A point that is used to calculate the radius.

setPoints

public void setPoints(Point center,
                      double radious)
Description copied from interface: Circle
Sets the two values to define a circle.

Specified by:
setPoints in interface Circle
Parameters:
center - The center point of the circle.
radious - The radius of the circle.

setPoints

public void setPoints(Point p1,
                      Point p2,
                      Point p3)
Description copied from interface: Circle
Sets the values to define a circle from three points. The circle will be inside or the area defined by the three points.

Specified by:
setPoints in interface Circle
Parameters:
p1 - First point
p2 - Second point
p3 - Third point

setPoints

public void setPoints(Point2D center,
                      Point2D radious)

setPoints

public void setPoints(Point2D center,
                      double radious)

setPoints

public void setPoints(Point2D p1,
                      Point2D p2,
                      Point2D p3)

setCoordinateAt

public void setCoordinateAt(int index,
                            int dimension,
                            double value)
Description copied from interface: OrientablePrimitive
Sets the value of a coordinate (direct position) in a concrete dimension

Specified by:
setCoordinateAt in interface OrientablePrimitive
Overrides:
setCoordinateAt in class OrientablePrimitive2D
Parameters:
index - The index of the direct position to set
dimension - The dimension of the direct position
value - The value to set

setPoints

public void setPoints(Point center,
                      double radius,
                      double initAngle,
                      double angleExt)

getRadious

public double getRadious()
Description copied from interface: Circle
Returns the radius of the circle

Specified by:
getRadious in interface Circle
Returns:
The radius of the circle


Copyright © 2004-2012 gvSIG. All Rights Reserved.