math.geom2d.circulinear
Class GenericCirculinearRing2D

Package class diagram package GenericCirculinearRing2D
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.circulinear.PolyCirculinearCurve2D<CirculinearElement2D>
                      extended by math.geom2d.circulinear.GenericCirculinearRing2D
All Implemented Interfaces:
Serializable, Cloneable, Iterable<CirculinearElement2D>, CirculinearBoundary2D, CirculinearContinuousCurve2D, CirculinearContour2D, CirculinearCurve2D, CirculinearRing2D, CirculinearShape2D, ContinuousCirculinearCurve2D, ContinuousCurve2D, Curve2D, Boundary2D, ContinuousBoundary2D, ContinuousOrientedCurve2D, OrientedCurve2D, Shape2D

public class GenericCirculinearRing2D
extends PolyCirculinearCurve2D<CirculinearElement2D>
implements CirculinearRing2D

A basic implementation of a CirculinearRing2D, which is supposed to be always bounded and closed.

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
GenericCirculinearRing2D()
           
GenericCirculinearRing2D(CirculinearElement2D[] curves)
           
GenericCirculinearRing2D(CirculinearElement2D[] curves, boolean closed)
          Deprecated. 
GenericCirculinearRing2D(Collection<? extends CirculinearElement2D> curves)
           
GenericCirculinearRing2D(Collection<? extends CirculinearElement2D> curves, boolean closed)
          Deprecated. 
GenericCirculinearRing2D(int size)
           
 
Method Summary
static GenericCirculinearRing2D create(CirculinearElement2D[] curves)
          Static factory for creating a new GenericCirculinearRing2D from an array of curves.
static
<T extends CirculinearElement2D>
GenericCirculinearRing2D
create(Collection<T> curves)
          Static factory for creating a new GenericCirculinearRing2D from a collection of curves.
 void fill(Graphics2D g2)
           
 Collection<? extends CirculinearContour2D> getBoundaryCurves()
          Returns the different continuous curves composing the boundary
 Collection<? extends GenericCirculinearRing2D> getContinuousCurves()
          Returns the collection of continuous curves which constitute this curve.
 CirculinearDomain2D getDomain()
          Returns the domain delimited by this boundary.
 CirculinearRing2D getParallel(double dist)
          Creates a new curve, formed by the points with parameterization: p(t) = c(t) + d*n(t)/|n(t)|, with p(t) being a point of the original curve, n(t) the normal of the curve, and |n| being the norm of n.
 GenericCirculinearRing2D getReverseCurve()
          Returns the curve with same trace on the plane with parametrization in reverse order.
 BoundaryPolyCurve2D<ContinuousOrientedCurve2D> transform(AffineTransform2D trans)
          Transforms each curve, and build a new CurveArray2D with the set of transformed curves.
 GenericCirculinearRing2D transform(CircleInversion2D inv)
          Transforms the shape by a circle inversion.
 
Methods inherited from class math.geom2d.circulinear.PolyCirculinearCurve2D
clip, getBuffer, getLength, getLength, getPosition, getSmoothPieces, getSubCurve
 
Methods inherited from class math.geom2d.domain.PolyOrientedCurve2D
getSignedDistance, getSignedDistance, getWindingAngle, isInside
 
Methods inherited from class math.geom2d.curve.PolyCurve2D
appendPath, draw, equals, getAsPolyline, getGeneralPath, getLeftTangent, getRightTangent, isClosed, setClosed, wrapCurve
 
Methods inherited from class math.geom2d.curve.CurveArray2D
addCurve, clearCurves, clone, contains, contains, containsCurve, getAsAWTShape, getBoundingBox, getCurve, getCurveIndex, getCurveNumber, getCurves, getDistance, getDistance, getFirstCurve, getFirstPoint, getGlobalPosition, getChildCurve, 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.circulinear.CirculinearContinuousCurve2D
clip, getSmoothPieces, getSubCurve
 
Methods inherited from interface math.geom2d.circulinear.CirculinearCurve2D
getLength, getLength, getPosition
 
Methods inherited from interface math.geom2d.circulinear.CirculinearShape2D
getBuffer
 
Methods inherited from interface math.geom2d.curve.ContinuousCurve2D
appendPath, getAsPolyline, getLeftTangent, getRightTangent, isClosed
 
Methods inherited from interface math.geom2d.domain.OrientedCurve2D
getSignedDistance, getSignedDistance, getWindingAngle
 
Methods inherited from interface math.geom2d.curve.Curve2D
clone, draw, getAsAWTShape, getFirstPoint, getIntersections, getLastPoint, getPoint, getPosition, getSingularPoints, getT0, getT1, isSingular, project
 
Methods inherited from interface math.geom2d.Shape2D
contains, contains, getBoundingBox, getDistance, getDistance, isBounded, isEmpty
 
Methods inherited from interface math.geom2d.circulinear.CirculinearBoundary2D
clip
 
Methods inherited from interface math.geom2d.domain.Boundary2D
isInside
 

Constructor Detail

GenericCirculinearRing2D

public GenericCirculinearRing2D()

GenericCirculinearRing2D

public GenericCirculinearRing2D(int size)

GenericCirculinearRing2D

public GenericCirculinearRing2D(CirculinearElement2D[] curves)

GenericCirculinearRing2D

@Deprecated
public GenericCirculinearRing2D(CirculinearElement2D[] curves,
                                           boolean closed)
Deprecated. 


GenericCirculinearRing2D

public GenericCirculinearRing2D(Collection<? extends CirculinearElement2D> curves)

GenericCirculinearRing2D

@Deprecated
public GenericCirculinearRing2D(Collection<? extends CirculinearElement2D> curves,
                                           boolean closed)
Deprecated. 

Method Detail

create

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

Since:
0.8.1

create

public static GenericCirculinearRing2D create(CirculinearElement2D[] curves)
Static factory for creating a new GenericCirculinearRing2D from an array of curves.

Since:
0.8.1

getParallel

public CirculinearRing2D getParallel(double dist)
Description copied from interface: CirculinearCurve2D
Creates a new curve, formed by the points with parameterization: p(t) = c(t) + d*n(t)/|n(t)|, with p(t) being a point of the original curve, n(t) the normal of the curve, and |n| being the norm of n.
In the case of a continuous curve formed by several smooth circulinear elements, the parallels of contiguous elements are joined by a circle arc.

Specified by:
getParallel in interface CirculinearContinuousCurve2D
Specified by:
getParallel in interface CirculinearContour2D
Specified by:
getParallel in interface CirculinearCurve2D
Specified by:
getParallel in interface ContinuousCirculinearCurve2D
Overrides:
getParallel in class PolyCirculinearCurve2D<CirculinearElement2D>
Parameters:
dist - the distance between the original curve and he parallel curve.
Returns:
the parallel curve

getContinuousCurves

public Collection<? extends GenericCirculinearRing2D> getContinuousCurves()
Description copied from interface: Curve2D
Returns the collection of continuous curves which constitute this curve.

Specified by:
getContinuousCurves in interface CirculinearBoundary2D
Specified by:
getContinuousCurves in interface CirculinearCurve2D
Specified by:
getContinuousCurves in interface Curve2D
Overrides:
getContinuousCurves in class PolyCirculinearCurve2D<CirculinearElement2D>
Returns:
a collection of continuous curves.

transform

public GenericCirculinearRing2D transform(CircleInversion2D inv)
Description copied from interface: CirculinearShape2D
Transforms the shape by a circle inversion. The result is still an instance a CirculinearShape2D.

Specified by:
transform in interface CirculinearBoundary2D
Specified by:
transform in interface CirculinearContinuousCurve2D
Specified by:
transform in interface CirculinearContour2D
Specified by:
transform in interface CirculinearCurve2D
Specified by:
transform in interface CirculinearShape2D
Specified by:
transform in interface ContinuousCirculinearCurve2D
Overrides:
transform in class PolyCirculinearCurve2D<CirculinearElement2D>
Parameters:
inv - the circle inversion
Returns:
the transformed shape

fill

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

getBoundaryCurves

public Collection<? extends CirculinearContour2D> getBoundaryCurves()
Description copied from interface: Boundary2D
Returns the different continuous curves composing the boundary

Specified by:
getBoundaryCurves in interface Boundary2D

getDomain

public CirculinearDomain2D 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

getReverseCurve

public GenericCirculinearRing2D 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 CirculinearBoundary2D
Specified by:
getReverseCurve in interface CirculinearContinuousCurve2D
Specified by:
getReverseCurve in interface CirculinearContour2D
Specified by:
getReverseCurve in interface CirculinearCurve2D
Specified by:
getReverseCurve in interface ContinuousCirculinearCurve2D
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 PolyCirculinearCurve2D<CirculinearElement2D>

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<CirculinearElement2D>
Parameters:
trans - an affine transform
Returns:
the transformed shape


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