deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.geometry.standard.surfacepatches
Class DefaultTriangle

java.lang.Object
  extended by org.deegree.geometry.standard.surfacepatches.DefaultTriangle
All Implemented Interfaces:
PolygonPatch, SurfacePatch, Triangle

public class DefaultTriangle
extends Object
implements Triangle

Default implementation of Triangle.

Version:
$Revision:$, $Date:$
Author:
Markus Schneider , last edited by: $Author:$

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.deegree.geometry.primitive.patches.PolygonPatch
PolygonPatch.PolygonPatchType
 
Nested classes/interfaces inherited from interface org.deegree.geometry.primitive.patches.SurfacePatch
SurfacePatch.SurfacePatchType
 
Constructor Summary
DefaultTriangle(LinearRing exterior)
          Creates a new DefaultTriangle instance from the given parameters.
 
Method Summary
 Measure getArea(Unit requestedBaseUnit)
          Returns the area covered by the patch.
 List<LinearRing> getBoundaryRings()
          Returns the boundary rings (interior + exteriors)
 int getCoordinateDimension()
          Returns the coordinate dimension, i.e. the dimension of the space that the patch is embedded in.
 LinearRing getExteriorRing()
          Returns the sequence of control points as a LinearRing.
 List<Ring> getInteriorRings()
          Returns the interior rings (holes) of the patch.
 Point getPoint1()
          Returns the first of the three control points.
 Point getPoint2()
          Returns the second of the three control points.
 Point getPoint3()
          Returns the last of the three control points.
 PolygonPatch.PolygonPatchType getPolygonPatchType()
           
 SurfacePatch.SurfacePatchType getSurfacePatchType()
          Returns the type of surface patch.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTriangle

public DefaultTriangle(LinearRing exterior)
Creates a new DefaultTriangle instance from the given parameters.

Parameters:
exterior - ring that contains exactly four planar points, the first and last point must be identical
Method Detail

getExteriorRing

public LinearRing getExteriorRing()
Description copied from interface: Triangle
Returns the sequence of control points as a LinearRing.

Specified by:
getExteriorRing in interface PolygonPatch
Specified by:
getExteriorRing in interface Triangle
Returns:
the exterior ring

getPoint1

public Point getPoint1()
Description copied from interface: Triangle
Returns the first of the three control points.

Specified by:
getPoint1 in interface Triangle
Returns:
the first control point

getPoint2

public Point getPoint2()
Description copied from interface: Triangle
Returns the second of the three control points.

Specified by:
getPoint2 in interface Triangle
Returns:
the second control point

getPoint3

public Point getPoint3()
Description copied from interface: Triangle
Returns the last of the three control points.

Specified by:
getPoint3 in interface Triangle
Returns:
the third control point

getArea

public Measure getArea(Unit requestedBaseUnit)
Description copied from interface: SurfacePatch
Returns the area covered by the patch.

Specified by:
getArea in interface SurfacePatch
Returns:
area covered by the patch in the requested uom

getCoordinateDimension

public int getCoordinateDimension()
Description copied from interface: SurfacePatch
Returns the coordinate dimension, i.e. the dimension of the space that the patch is embedded in.

Specified by:
getCoordinateDimension in interface SurfacePatch
Returns:
the coordinate dimension

getInteriorRings

public List<Ring> getInteriorRings()
Description copied from interface: PolygonPatch
Returns the interior rings (holes) of the patch.

Specified by:
getInteriorRings in interface PolygonPatch
Returns:
the interior rings (holes) of the patch, list may be empty (but not null)

getBoundaryRings

public List<LinearRing> getBoundaryRings()
Description copied from interface: PolygonPatch
Returns the boundary rings (interior + exteriors)

Specified by:
getBoundaryRings in interface PolygonPatch
Specified by:
getBoundaryRings in interface Triangle
Returns:
the boundary rings, list may be empty (but not null)

getPolygonPatchType

public PolygonPatch.PolygonPatchType getPolygonPatchType()
Specified by:
getPolygonPatchType in interface PolygonPatch
Returns:
the type of this polygon patch.

getSurfacePatchType

public SurfacePatch.SurfacePatchType getSurfacePatchType()
Description copied from interface: SurfacePatch
Returns the type of surface patch.

Specified by:
getSurfacePatchType in interface SurfacePatch
Returns:
the type of surface patch

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>