public class PolyOrientedCurve2D<T extends ContinuousOrientedCurve2D> extends PolyCurve2D<T> implements ContinuousOrientedCurve2D
closed
curves
Constructor and Description |
---|
PolyOrientedCurve2D() |
PolyOrientedCurve2D(Collection<? extends T> curves) |
PolyOrientedCurve2D(Collection<? extends T> curves,
boolean closed) |
PolyOrientedCurve2D(int size) |
PolyOrientedCurve2D(T[] curves) |
PolyOrientedCurve2D(T[] curves,
boolean closed) |
Modifier and Type | Method and Description |
---|---|
CurveSet2D<? extends ContinuousOrientedCurve2D> |
clip(Box2D box)
Clip the PolyCurve2D by a box.
|
PolyOrientedCurve2D<? extends ContinuousOrientedCurve2D> |
getReverseCurve()
Returns the curve with same trace on the plane with parametrization in
reverse order.
|
double |
getSignedDistance(double x,
double y)
The same as getSignedDistance(Point2D), but by passing 2 double as
arguments.
|
double |
getSignedDistance(Point2D p)
Get the signed distance of the curve to the given point: this distance is
positive if the point lies outside the shape, and is negative if the
point lies inside the shape.
|
PolyOrientedCurve2D<? extends ContinuousOrientedCurve2D> |
getSubCurve(double t0,
double t1)
Return an instance of PolyOrientedCurve2D.
|
double |
getWindingAngle(Point2D point)
Return the angle portion that the curve turn around the given point.
|
boolean |
isInside(Point2D point)
Returns true if the point is 'inside' the domain bounded by the curve.
|
PolyOrientedCurve2D<?> |
transform(AffineTransform2D trans)
Transforms each curve, and build a new CurveArray2D with the set of
transformed curves.
|
appendPath, draw, equals, getAsPolyline, getContinuousCurves, getGeneralPath, getLeftTangent, getRightTangent, getSmoothPieces, isClosed, setClosed, wrapCurve
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
fromUnitSegment, toUnitSegment
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appendPath, getAsPolyline, getLeftTangent, getRightTangent, getSmoothPieces, isClosed
clone, draw, getAsAWTShape, getContinuousCurves, getFirstPoint, getIntersections, getLastPoint, getPoint, getPosition, getSingularPoints, getT0, getT1, isSingular, project
contains, contains, getBoundingBox, getDistance, getDistance, isBounded, isEmpty
public PolyOrientedCurve2D()
public PolyOrientedCurve2D(int size)
public PolyOrientedCurve2D(T[] curves)
public PolyOrientedCurve2D(T[] curves, boolean closed)
public PolyOrientedCurve2D(Collection<? extends T> curves)
public PolyOrientedCurve2D(Collection<? extends T> curves, boolean closed)
public double getWindingAngle(Point2D point)
OrientedCurve2D
getWindingAngle
in interface OrientedCurve2D
point
- a point of the planepublic double getSignedDistance(Point2D p)
OrientedCurve2D
getSignedDistance
in interface OrientedCurve2D
p
- a point of the planepublic double getSignedDistance(double x, double y)
OrientedCurve2D
getSignedDistance
in interface OrientedCurve2D
x
- x-coord of a pointy
- y-coord of a pointpublic boolean isInside(Point2D point)
OrientedCurve2D
isInside
in interface OrientedCurve2D
point
- a point in the planepublic PolyOrientedCurve2D<? extends ContinuousOrientedCurve2D> getReverseCurve()
Curve2D
getReverseCurve
in interface ContinuousCurve2D
getReverseCurve
in interface Curve2D
getReverseCurve
in interface ContinuousOrientedCurve2D
getReverseCurve
in interface OrientedCurve2D
getReverseCurve
in class PolyCurve2D<T extends ContinuousOrientedCurve2D>
public PolyOrientedCurve2D<? extends ContinuousOrientedCurve2D> getSubCurve(double t0, double t1)
getSubCurve
in interface ContinuousCurve2D
getSubCurve
in interface Curve2D
getSubCurve
in interface ContinuousOrientedCurve2D
getSubCurve
in class PolyCurve2D<T extends ContinuousOrientedCurve2D>
t0
- position of the start of the sub-curvet1
- position of the end of the sub-curvepublic CurveSet2D<? extends ContinuousOrientedCurve2D> clip(Box2D box)
clip
in interface ContinuousCurve2D
clip
in interface Curve2D
clip
in interface ContinuousOrientedCurve2D
clip
in interface OrientedCurve2D
clip
in interface Shape2D
clip
in class PolyCurve2D<T extends ContinuousOrientedCurve2D>
box
- the clipping boxpublic PolyOrientedCurve2D<?> transform(AffineTransform2D trans)
CurveArray2D
transform
in interface ContinuousCurve2D
transform
in interface Curve2D
transform
in interface ContinuousOrientedCurve2D
transform
in interface OrientedCurve2D
transform
in interface Shape2D
transform
in class PolyCurve2D<T extends ContinuousOrientedCurve2D>
trans
- an affine transformCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.