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

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
All Implemented Interfaces:
Shape, Serializable, Comparable, Geometry, FShape, OrientablePrimitive, OrientableSurface, Primitive, Surface
Direct Known Subclasses:
Circle2D, Ellipse2D, Surface2DZ

public class Surface2D
extends OrientableSurface2D
implements Surface

Pol�gono 2D.

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
Surface2D(GeometryType geomType)
          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.
 int getShapeType()
          Gets the geometry type of this shape.
 SurfaceAppearance getSurfaceAppearance()
          Gets surface appearance
 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 setSurfaceAppearance(SurfaceAppearance app)
          Sets the appearance of the Surface
 
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, getSelectHandlers, getStretchingHandlers, getVertex, insertVertex, intersects, removeVertex, reProject, setCoordinateAt, setGeneralPath, setPoints, setVertex, transform
 
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.OrientablePrimitive
addMoveToVertex, addVertex, addVertexes, closePrimitive, getCoordinateAt, getNumVertices, getVertex, insertVertex, removeVertex, setCoordinateAt, setGeneralPath, 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, transform, 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

Surface2D

public Surface2D(GeometryType geomType)
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

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 AbstractPrimitive
Returns:
int the geometry type of this shape.

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
Returns:
the new shape.

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 OrientablePrimitive2D
Parameters:
r - Rect�ngulo.
Returns:
True si intersecta con el rectangulo que se pasa como par�metro.

getSurfaceAppearance

public SurfaceAppearance getSurfaceAppearance()
Description copied from interface: Surface
Gets surface appearance

Specified by:
getSurfaceAppearance in interface Surface
Returns:
the surface appearance

setSurfaceAppearance

public void setSurfaceAppearance(SurfaceAppearance app)
Description copied from interface: Surface
Sets the appearance of the Surface

Specified by:
setSurfaceAppearance in interface Surface
Parameters:
app - The appearance of the surface


Copyright © 2004-2012 gvSIG. All Rights Reserved.