math.geom2d.domain
Class BoundaryPolyCurve2D<T extends ContinuousOrientedCurve2D>

Package class diagram package BoundaryPolyCurve2D
java.lang.Object
  extended by math.geom2d.curve.CurveSet2D<T>
      extended by math.geom2d.curve.CurveArray2D<T>
          extended by math.geom2d.curve.PolyCurve2D<T>
              extended by math.geom2d.domain.PolyOrientedCurve2D<T>
                  extended by math.geom2d.domain.BoundaryPolyCurve2D<T>
All Implemented Interfaces:
Serializable, Cloneable, Iterable<T>, ContinuousCurve2D, Curve2D, Boundary2D, ContinuousBoundary2D, ContinuousOrientedCurve2D, OrientedCurve2D, Shape2D

public class BoundaryPolyCurve2D<T extends ContinuousOrientedCurve2D>
extends PolyOrientedCurve2D<T>
implements ContinuousBoundary2D

A single continuous oriented curve, which defines the boundary of a planar domain. The boundary curve is composed of several continuous and oriented curves linked together to form a continuous curve. The resulting boundary curve is either a closed curve, or an infinite curve at both ends.

Author:
dlegland
See Also:
Serialized Form

Field Summary
 
Fields inherited from class math.geom2d.curve.PolyCurve2D
closed
 
Fields inherited from class math.geom2d.curve.CurveSet2D
curves
 
Fields inherited from interface math.geom2d.Shape2D
ACCURACY
 
Constructor Summary
BoundaryPolyCurve2D()
           
BoundaryPolyCurve2D(Collection<? extends T> curves)
           
BoundaryPolyCurve2D(int n)
           
BoundaryPolyCurve2D(T[] curves)
           
 
Method Summary
static
<T extends ContinuousOrientedCurve2D>
BoundaryPolyCurve2D<T>
create(Collection<T> curves)
          Static factory for creating a new BoundaryPolyCurve2D from a collection of curves.
static
<T extends ContinuousOrientedCurve2D>
BoundaryPolyCurve2D<T>
create(T[] curves)
          Static factory for creating a new BoundaryPolyCurve2D from an array of curves.
 void fill(Graphics2D g2)
           
 Collection<? extends ContinuousBoundary2D> getBoundaryCurves()
          Returns a ArrayList containing only this.
 Domain2D getDomain()
          Returns the domain delimited by this boundary.
 BoundaryPolyCurve2D<? extends ContinuousOrientedCurve2D> getReverseCurve()
          Returns the curve with same trace on the plane with parametrization in reverse order.
 boolean isClosed()
          Override the isClosed() id the following way: return true if all curves are bounded.
 BoundaryPolyCurve2D<ContinuousOrientedCurve2D> transform(AffineTransform2D trans)
          Transforms each curve, and build a new CurveArray2D with the set of transformed curves.
 
Methods inherited from class math.geom2d.domain.PolyOrientedCurve2D
clip, getSignedDistance, getSignedDistance, getSubCurve, getWindingAngle, isInside
 
Methods inherited from class math.geom2d.curve.PolyCurve2D
appendPath, draw, equals, getAsPolyline, getContinuousCurves, getGeneralPath, getLeftTangent, getRightTangent, getSmoothPieces, setClosed, wrapCurve
 
Methods inherited from class math.geom2d.curve.CurveArray2D
addCurve, clearCurves, clone, contains, contains, containsCurve, getAsAWTShape, getBoundingBox, getChildCurve, getCurve, getCurveIndex, getCurveNumber, getCurves, getDistance, getDistance, getFirstCurve, getFirstPoint, getGlobalPosition, getIntersections, getLastCurve, getLastPoint, getLocalPosition, getPoint, getPosition, getSingularPoints, getT0, getT1, isBounded, isEmpty, isSingular, iterator, project, removeCurve
 
Methods inherited from class math.geom2d.curve.CurveSet2D
fromUnitSegment, toUnitSegment
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface math.geom2d.domain.Boundary2D
isInside
 
Methods inherited from interface math.geom2d.domain.ContinuousOrientedCurve2D
clip, getSubCurve
 
Methods inherited from interface math.geom2d.curve.ContinuousCurve2D
appendPath, getAsPolyline, getLeftTangent, getRightTangent, getSmoothPieces
 
Methods inherited from interface math.geom2d.domain.OrientedCurve2D
getSignedDistance, getSignedDistance, getWindingAngle
 
Methods inherited from interface math.geom2d.curve.Curve2D
clone, draw, getAsAWTShape, getContinuousCurves, getFirstPoint, getIntersections, getLastPoint, getPoint, getPosition, getSingularPoints, getT0, getT1, isSingular, project
 
Methods inherited from interface math.geom2d.Shape2D
contains, contains, getBoundingBox, getDistance, getDistance, isBounded, isEmpty
 

Constructor Detail

BoundaryPolyCurve2D

public BoundaryPolyCurve2D()

BoundaryPolyCurve2D

public BoundaryPolyCurve2D(int n)

BoundaryPolyCurve2D

public BoundaryPolyCurve2D(T[] curves)

BoundaryPolyCurve2D

public BoundaryPolyCurve2D(Collection<? extends T> curves)
Method Detail

create

public static <T extends ContinuousOrientedCurve2D> BoundaryPolyCurve2D<T> create(Collection<T> curves)
Static factory for creating a new BoundaryPolyCurve2D from a collection of curves.

Since:
0.8.1

create

public static <T extends ContinuousOrientedCurve2D> BoundaryPolyCurve2D<T> create(T[] curves)
Static factory for creating a new BoundaryPolyCurve2D from an array of curves.

Since:
0.8.1

isClosed

public boolean isClosed()
Override the isClosed() id the following way: return true if all curves are bounded. If at least one curve is unbounded, return false.

Specified by:
isClosed in interface ContinuousCurve2D
Overrides:
isClosed in class PolyCurve2D<T extends ContinuousOrientedCurve2D>

getBoundaryCurves

public Collection<? extends ContinuousBoundary2D> getBoundaryCurves()
Returns a ArrayList containing only this.

Specified by:
getBoundaryCurves in interface Boundary2D

getDomain

public Domain2D getDomain()
Description copied from interface: Boundary2D
Returns the domain delimited by this boundary.

Specified by:
getDomain in interface Boundary2D
Returns:
the domain delimited by this boundary

fill

public void fill(Graphics2D g2)
Specified by:
fill in interface Boundary2D

getReverseCurve

public BoundaryPolyCurve2D<? extends ContinuousOrientedCurve2D> getReverseCurve()
Description copied from interface: Curve2D
Returns the curve with same trace on the plane with parametrization in reverse order.

Specified by:
getReverseCurve in interface ContinuousCurve2D
Specified by:
getReverseCurve in interface Curve2D
Specified by:
getReverseCurve in interface Boundary2D
Specified by:
getReverseCurve in interface ContinuousBoundary2D
Specified by:
getReverseCurve in interface ContinuousOrientedCurve2D
Specified by:
getReverseCurve in interface OrientedCurve2D
Overrides:
getReverseCurve in class PolyOrientedCurve2D<T extends ContinuousOrientedCurve2D>

transform

public BoundaryPolyCurve2D<ContinuousOrientedCurve2D> transform(AffineTransform2D trans)
Description copied from class: CurveArray2D
Transforms each curve, and build a new CurveArray2D with the set of transformed curves.

Specified by:
transform in interface ContinuousCurve2D
Specified by:
transform in interface Curve2D
Specified by:
transform in interface Boundary2D
Specified by:
transform in interface ContinuousBoundary2D
Specified by:
transform in interface ContinuousOrientedCurve2D
Specified by:
transform in interface OrientedCurve2D
Specified by:
transform in interface Shape2D
Overrides:
transform in class PolyOrientedCurve2D<T extends ContinuousOrientedCurve2D>
Parameters:
trans - an affine transform
Returns:
the transformed shape


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.