math.geom2d.circulinear
Class CirculinearBoundarySet2D<T extends CirculinearContour2D>

Package class diagram package CirculinearBoundarySet2D
java.lang.Object
  extended by math.geom2d.curve.CurveSet2D<T>
      extended by math.geom2d.curve.CurveArray2D<T>
          extended by math.geom2d.domain.BoundarySet2D<T>
              extended by math.geom2d.circulinear.CirculinearBoundarySet2D<T>
All Implemented Interfaces:
Serializable, Cloneable, Iterable<T>, CirculinearBoundary2D, CirculinearCurve2D, CirculinearShape2D, Curve2D, Boundary2D, OrientedCurve2D, Shape2D

public class CirculinearBoundarySet2D<T extends CirculinearContour2D>
extends BoundarySet2D<T>
implements CirculinearBoundary2D

A circulinear boundary which is composed of several CirculinearRing2D.

Author:
dlegland
See Also:
Serialized Form

Field Summary
 
Fields inherited from class math.geom2d.curve.CurveSet2D
curves
 
Fields inherited from interface math.geom2d.Shape2D
ACCURACY
 
Constructor Summary
CirculinearBoundarySet2D()
          Empty constructor.
CirculinearBoundarySet2D(Collection<? extends T> curves)
          Constructor from a collection of curves.
CirculinearBoundarySet2D(int n)
          Empty constructor.
CirculinearBoundarySet2D(T curve)
          Constructor from a collection of curves.
CirculinearBoundarySet2D(T[] curves)
          Constructor from an array of curves.
 
Method Summary
 CirculinearCurveSet2D<? extends CirculinearContinuousCurve2D> clip(Box2D box)
          Clip the curve by a box.
 CirculinearDomain2D getBuffer(double dist)
          Computes the buffer of the shape, formed by the set of points located at a distance from the shape that is lower or equal to d.
 Collection<? extends CirculinearContour2D> getContinuousCurves()
          Returns the collection of continuous curves which constitute this curve.
 double getLength()
           
 double getLength(double pos)
           
 CirculinearCurve2D getParallel(double d)
          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.
 double getPosition(double length)
           
 CirculinearBoundarySet2D<? extends CirculinearContour2D> getReverseCurve()
          Returns the curve with same trace on the plane with parametrization in reverse order.
 CirculinearCurveSet2D<? extends CirculinearContinuousCurve2D> getSubCurve(double t0, double t1)
          Return an instance of CurveArray2D.
 CirculinearBoundarySet2D<? extends CirculinearContour2D> transform(CircleInversion2D inv)
          Transforms the shape by a circle inversion.
 
Methods inherited from class math.geom2d.domain.BoundarySet2D
create, create, fill, getBoundaryCurves, getDomain, getSignedDistance, getSignedDistance, getWindingAngle, isInside, transform
 
Methods inherited from class math.geom2d.curve.CurveArray2D
addCurve, clearCurves, clone, contains, contains, containsCurve, draw, equals, getAsAWTShape, getBoundingBox, getChildCurve, getCurve, getCurveIndex, getCurveNumber, getCurves, getDistance, getDistance, getFirstCurve, getFirstPoint, getGeneralPath, 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
fill, getBoundaryCurves, getDomain, isInside, transform
 
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
 

Constructor Detail

CirculinearBoundarySet2D

public CirculinearBoundarySet2D()
Empty constructor. Initializes an empty array of curves.


CirculinearBoundarySet2D

public CirculinearBoundarySet2D(int n)
Empty constructor. Initializes an empty array of curves, with a given size for allocating memory.


CirculinearBoundarySet2D

public CirculinearBoundarySet2D(T[] curves)
Constructor from an array of curves.

Parameters:
curves - the array of curves in the set

CirculinearBoundarySet2D

public CirculinearBoundarySet2D(T curve)
Constructor from a collection of curves. The curves are added to the inner collection of curves.

Parameters:
curves - the collection of curves to add to the set

CirculinearBoundarySet2D

public CirculinearBoundarySet2D(Collection<? extends T> curves)
Constructor from a collection of curves. The curves are added to the inner collection of curves.

Parameters:
curves - the collection of curves to add to the set
Method Detail

getLength

public double getLength()
Specified by:
getLength in interface CirculinearCurve2D
Returns:
the length of the curve

getLength

public double getLength(double pos)
Specified by:
getLength in interface CirculinearCurve2D
Returns:
the length from the beginning to the position given by pos

getPosition

public double getPosition(double length)
Specified by:
getPosition in interface CirculinearCurve2D
Returns:
the position located at distance 'length' from the origin

getBuffer

public CirculinearDomain2D getBuffer(double dist)
Description copied from interface: CirculinearShape2D
Computes the buffer of the shape, formed by the set of points located at a distance from the shape that is lower or equal to d.

Specified by:
getBuffer in interface CirculinearShape2D
Parameters:
dist - the maximal distance between a point of the buffer and the shape
Returns:
the buffer of the shape

getParallel

public CirculinearCurve2D getParallel(double d)
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 CirculinearCurve2D
Parameters:
d - the distance between the original curve and he parallel curve.
Returns:
the parallel curve

transform

public CirculinearBoundarySet2D<? extends CirculinearContour2D> 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 CirculinearCurve2D
Specified by:
transform in interface CirculinearShape2D
Parameters:
inv - the circle inversion
Returns:
the transformed shape

getContinuousCurves

public Collection<? extends CirculinearContour2D> 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 CurveArray2D<T extends CirculinearContour2D>
Returns:
a collection of continuous curves.

clip

public CirculinearCurveSet2D<? extends CirculinearContinuousCurve2D> clip(Box2D box)
Description copied from class: BoundarySet2D
Clip the curve by a box. The result is an instance of CurveSet2D, which contains only instances of ContinuousOrientedCurve2D. If the curve is not clipped, the result is an instance of CurveSet2D which contains 0 curves.

Specified by:
clip in interface CirculinearBoundary2D
Specified by:
clip in interface CirculinearCurve2D
Specified by:
clip in interface Curve2D
Specified by:
clip in interface OrientedCurve2D
Specified by:
clip in interface Shape2D
Overrides:
clip in class BoundarySet2D<T extends CirculinearContour2D>
Parameters:
box - the clipping box
Returns:
the clipped shape

getReverseCurve

public CirculinearBoundarySet2D<? extends CirculinearContour2D> 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 CirculinearCurve2D
Specified by:
getReverseCurve in interface Curve2D
Specified by:
getReverseCurve in interface Boundary2D
Specified by:
getReverseCurve in interface OrientedCurve2D
Overrides:
getReverseCurve in class BoundarySet2D<T extends CirculinearContour2D>

getSubCurve

public CirculinearCurveSet2D<? extends CirculinearContinuousCurve2D> getSubCurve(double t0,
                                                                                 double t1)
Description copied from class: CurveArray2D
Return an instance of CurveArray2D.

Specified by:
getSubCurve in interface CirculinearCurve2D
Specified by:
getSubCurve in interface Curve2D
Overrides:
getSubCurve in class BoundarySet2D<T extends CirculinearContour2D>
Parameters:
t0 - position of the start of the sub-curve
t1 - position of the end of the sub-curve
Returns:
the portion of original curve comprised between t0 and t1.


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