Class BezierCurve
- All Implemented Interfaces:
Serializable,Cloneable,ICurve,IGeometry,IRotatable<BezierCurve>,IScalable<BezierCurve>,ITranslatable<BezierCurve>
- Direct Known Subclasses:
CubicCurve,Line,QuadraticCurve
Instances of the BezierCurve class individually represent an
arbitrary Bezier curve. This is the base class of the special quadratic and
cubic Bezier curve classes (QuadraticCurve and CubicCurve).
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBezierCurve(double... controlPoints) Constructs a newBezierCurvefrom the given controlPointcoordinates.Constructs a newBezierCurvefrom the givenCubicCurve.BezierCurve(Point... controlPoints) Constructs a newBezierCurvefrom the given controlPoints.Constructs a newBezierCurvefrom the givenQuadraticCurve. -
Method Summary
Modifier and TypeMethodDescriptionclone()Overridden with public visibility as recommended withinCloneable.booleanTests if thisBezierCurvecontains the given otherBezierCurve.booleanbooleanget(double t) Computes thePointon thisBezierCurveat parameter value t, which is expected to lie in the parameterBezierCurve.Interval[0;1].getClipped(double s, double e) getCopy()Returns a new identical copy of thisIGeometry.Computes the hodograph, the first parametric derivative, of thisBezierCurve.Computes aBezierCurvewith a degree of one higher than thisBezierCurve's degree but of the same shape.Point[]getIntersections(BezierCurve other) Returns thePoints of intersection of this and the given otherBezierCurve.final Point[]getIntersections(ICurve curve) getOffset(double distance) Returns aPolyBezierthat represents an approximation of the refined offset of thisBezierCurvewhere cusps in the input curve are approximated by arc segments in the offset and local self-intersections in the offset are removed while global self-intersections and other singularities in the offset remain unprocessed.getOverlap(BezierCurve other) Returns aBezierCurvethat represents the overlap of thisBezierCurveand the given otherBezierCurve.final ICurve[]getP1()getP2()doubleReturns the parameter value of thisBezierCurvefor the givenPoint.getPoint(int i) Returns the ith controlPointof thisBezierCurve.Point[]Returns the controlPoints of thisBezierCurve.getProjection(Point reference) getRotatedCCW(Angle angle) getRotatedCCW(Angle angle, double cx, double cy) getRotatedCCW(Angle angle, Point center) getRotatedCW(Angle angle) getRotatedCW(Angle angle, double cx, double cy) getRotatedCW(Angle angle, Point center) getScaled(double factor) Scales a copy of the calling object by the given factor relative to its centerPoint.getScaled(double fx, double fy) Scales a copy of the calling object by the given factors relative to its centerPoint.getScaled(double factor, double cx, double cy) Scales a copy of the calling object by the given factor relative to the given centerPoint(cx, cy).getScaled(double fx, double fy, double cx, double cy) Scales a copy of the calling object by the given factors relative to the given centerPoint(cx, cy).Scales a copy of the calling object by the given factors relative to the given centerPoint.Scales a copy of the calling object by the given factor relative to the given centerPoint.getTranslated(double dx, double dy) Translates a copy of this object by the given values in x and y direction.Translates a copy of this object by the givenPoint.doublegetX1()Returns the startPoint's x coordinate.doublegetX2()Returns the endPoint's x coordinate.doublegetY1()Returns the startPoint's y coordinate.doublegetY2()Returns the endPoint's y coordinate.final inthashCode()booleanintersects(ICurve c) booleanoverlaps(BezierCurve other) Checks if thisBezierCurveand the given otherBezierCurveoverlap, i.e. an infinite set of intersectionPoints exists.final booleanDirectly rotates thisBezierCurvecounter-clockwise (CCW) around its centerPointby the givenAngle.Directly rotates thisBezierCurvecounter-clockwise (CCW) around thePointspecified by the given x and y coordinate values by the givenAngle.Directly rotates thisBezierCurvecounter-clockwise (CCW) around the givenPointby the givenAngle.Directly rotates thisBezierCurveclockwise (CW) around thePointspecified by the given x and y coordinate values by the givenAngle.scale(double factor) Scales the calling object by the given factor relative to its centerPoint.scale(double fx, double fy) Scales the calling object by the given factors relative to the given centerPoint.scale(double factor, double cx, double cy) Scales the calling object by the given factor relative to the given centerPoint(cx, cy).scale(double fx, double fy, double cx, double cy) Scales the calling object by the given factors relative to the given centerPoint(cx, cy).Scales the calling object by the given factors relative to the given centerPoint.Scales the calling object by the given factor relative to the given centerPoint.Sets the ith controlPointof thisBezierCurve.split(double t) Subdivides thisBezierCurveat the given parameter value t into two newBezierCurves.toBezier()Computes a list ofBezierCurves that approximate theICurve.toCubic()Returns a hard approximation of thisBezierCurveas aCubicCurve.toLine()Returns a hard approximation of thisBezierCurveas aLine.Line[]toLineStrip(double lineSimilarity) Computes an approximation of thisBezierCurveby a strip ofLines.Line[]toLineStrip(double lineSimilarity, org.eclipse.gef.geometry.planar.BezierCurve.Interval startInterval) Computes an approximation of thisBezierCurveby a strip ofLines.toPath()Point[]toPoints(org.eclipse.gef.geometry.planar.BezierCurve.Interval startInterval) Returns a hard approximation of thisBezierCurveas aQuadraticCurve.toString()booleantranslate(double dx, double dy) Translates the object by the given values in x and y direction.Translates the object by the givenPoint.
-
Constructor Details
-
BezierCurve
Constructs a newBezierCurvefrom the givenCubicCurve.- Parameters:
c- theCubicCurveof which the newBezierCurveis constructed from
-
BezierCurve
public BezierCurve(double... controlPoints) Constructs a newBezierCurvefrom the given controlPointcoordinates. The coordinates are expected to be in x, y order, i.e. x1, y1, x2, y2, x3, y3, ...- Parameters:
controlPoints- the controlPointcoordinates of the newBezierCurvein x, y order
-
BezierCurve
Constructs a newBezierCurvefrom the given controlPoints.- Parameters:
controlPoints- the controlPoints of the newBezierCurve
-
BezierCurve
Constructs a newBezierCurvefrom the givenQuadraticCurve.- Parameters:
c- theQuadraticCurveof which the newBezierCurveis constructed from
-
-
Method Details
-
contains
Tests if this
BezierCurvecontains the given otherBezierCurve.The other
BezierCurveis regarded to be contained by thisBezierCurveif its start and endPointlie on thisBezierCurveand an overlapping segment of the two curves can be detected.- Parameters:
o- theBezierCurvethat is checked to be contained by thisBezierCurve- Returns:
trueif the givenBezierCurveis contained by thisBezierCurve, otherwisefalse
-
contains
Description copied from interface:IGeometry -
equals
-
get
Computes thePointon thisBezierCurveat parameter value t, which is expected to lie in the parameterBezierCurve.Interval[0;1].- Parameters:
t- the parameter value for which thisBezierCurveis evaluated- Returns:
- the
Pointon thisBezierCurveat the given parameter value
-
getBounds
Description copied from interface:IGeometry -
getClipped
- Parameters:
s- the lower limit of the parameterBezierCurve.Intervalwhich is clipped out of thisBezierCurvee- the upper limit of the parameterBezierCurve.Intervalwhich is clipped out of thisBezierCurve- Returns:
- a new
BezierCurverepresenting thisBezierCurveon theBezierCurve.Interval[s;e]
-
getControlBounds
- Returns:
- a
Rectanglerepresenting the bounds of the controlPolygonof thisBezierCurve
-
getCopy
Description copied from interface:IGeometryReturns a new identical copy of thisIGeometry. -
getDerivative
Computes the hodograph, the first parametric derivative, of thisBezierCurve.- Returns:
- the hodograph of this
BezierCurve
-
getElevated
Computes aBezierCurvewith a degree of one higher than thisBezierCurve's degree but of the same shape.- Returns:
- a
BezierCurveof the same shape as thisBezierCurvebut with one more controlPoint
-
getIntersections
Returns thePoints of intersection of this and the given otherBezierCurve.- Parameters:
other- theBezierCurvewhich is searched forPoints of intersection with thisBezierCurve- Returns:
- the
Points of intersection of thisBezierCurveand the given otherBezierCurve
-
getIntersections
Description copied from interface:ICurve- Specified by:
getIntersectionsin interfaceICurve- Parameters:
curve- TheICurveto compute intersection points with.- Returns:
- The points of intersection.
-
getOffset
Returns aPolyBezierthat represents an approximation of the refined offset of thisBezierCurvewhere cusps in the input curve are approximated by arc segments in the offset and local self-intersections in the offset are removed while global self-intersections and other singularities in the offset remain unprocessed.- Parameters:
distance- The signed distance for which to compute a refined offset approximation.- Returns:
- A
PolyBezierrepresenting the refined offset of thisBezierCurvefor the given distance.
-
getOverlap
Returns a
BezierCurvethat represents the overlap of thisBezierCurveand the given otherBezierCurve. If no overlap exists,nullis returned. An overlap is identified by an infinite number of intersection points.- Parameters:
other- TheBezierCurveto which an overlap is computed.- Returns:
- a
BezierCurverepresenting the overlap of this and the given otherBezierCurveif an overlap exists, otherwisenull
-
getOverlaps
Description copied from interface:ICurve- Specified by:
getOverlapsin interfaceICurve- Parameters:
c- The curve to compute overlaps with.- Returns:
- The segments where both curves overlap.
-
getP1
Description copied from interface:ICurve -
getP2
Description copied from interface:ICurve -
getParameterAt
Returns the parameter value of thisBezierCurvefor the givenPoint. If the givenPointis not on thisBezierCurveanIllegalArgumentExceptionis thrown.- Parameters:
p- thePointfor which the parameter value on thisBezierCurveis to be found- Returns:
- the corresponding parameter value of the given
Pointon thisBezierCurve
-
getPoint
Returns the ith controlPointof thisBezierCurve. The startPointis at index0, the first handle-Pointis at index1, etc.- Parameters:
i- the index of the controlPointof thisBezierCurveto return- Returns:
- the ith control
Pointof thisBezierCurve
-
getPoints
Returns the controlPoints of thisBezierCurve.- Returns:
- the control
Points of thisBezierCurve
-
getProjection
Description copied from interface:ICurveReturns a projection of the given referencePointonto thisICurve, i.e. aPointon thisICurvethat is closest to the given referencePoint. Note, that- Specified by:
getProjectionin interfaceICurve- Parameters:
reference- The referencePointfor which to return the projection.- Returns:
- The projection of the given reference
Pointonto thisICurve.
-
getRotatedCCW
Description copied from interface:IRotatableRotates the calling object by specifiedAnglecounter-clock-wise (CCW) around its centerPoint. Does not necessarily return an object of the same type.- Specified by:
getRotatedCCWin interfaceIRotatable<BezierCurve>- Parameters:
angle- rotationAngle- Returns:
- an
IGeometryrepresenting the result of the rotation
-
getRotatedCCW
Description copied from interface:IRotatableRotates the calling object by the specifiedAnglecounter-clock-wise (CCW) around the specified centerPoint(cx, cy). Does not necessarily return an object of the same type.- Specified by:
getRotatedCCWin interfaceIRotatable<BezierCurve>- Parameters:
angle- rotationAnglecx- x-coordinate of the relativePointfor the rotationcy- y-coordinate of the relativePointfor the rotation- Returns:
- an
IGeometryrepresenting the result of the rotation
-
getRotatedCCW
Description copied from interface:IRotatableRotates the calling object by the specifiedAnglecounter-clock-wise (CCW) around the specified centerPoint. Does not necessarily return an object of the same type.- Specified by:
getRotatedCCWin interfaceIRotatable<BezierCurve>- Parameters:
angle- rotationAnglecenter- relativePointfor the rotation- Returns:
- an
IGeometryrepresenting the result of the rotation
-
getRotatedCW
Description copied from interface:IRotatableRotates the calling object by specifiedAngleclock-wise (CW) around its centerPoint. Does not necessarily return an object of the same type.- Specified by:
getRotatedCWin interfaceIRotatable<BezierCurve>- Parameters:
angle- rotationAngle- Returns:
- an
IGeometryrepresenting the result of the rotation
-
getRotatedCW
Description copied from interface:IRotatableRotates the calling object by the specifiedAngleclock-wise (CW) around the specified centerPoint(cx, cy). Does not necessarily return an object of the same type.- Specified by:
getRotatedCWin interfaceIRotatable<BezierCurve>- Parameters:
angle- rotationAnglecx- x-coordinate of the relativePointfor the rotationcy- y-coordinate of the relativePointfor the rotation- Returns:
- an
IGeometryrepresenting the result of the rotation
-
getRotatedCW
Description copied from interface:IRotatableRotates the calling object by the specifiedAngleclock-wise (CW) around the specified centerPoint. Does not necessarily return an object of the same type.- Specified by:
getRotatedCWin interfaceIRotatable<BezierCurve>- Parameters:
angle- rotationAnglecenter- relativePointfor the rotation- Returns:
- an
IGeometryrepresenting the result of the rotation
-
getScaled
Description copied from interface:IScalableScales a copy of the calling object by the given factor relative to its centerPoint.- Specified by:
getScaledin interfaceIScalable<BezierCurve>- Parameters:
factor- scale-factor- Returns:
- the new, scaled object
-
getScaled
Description copied from interface:IScalableScales a copy of the calling object by the given factors relative to its centerPoint.- Specified by:
getScaledin interfaceIScalable<BezierCurve>- Parameters:
fx- x-scale-factorfy- y-scale-factor- Returns:
- the new, scaled object
-
getScaled
Description copied from interface:IScalableScales a copy of the calling object by the given factor relative to the given centerPoint(cx, cy).- Specified by:
getScaledin interfaceIScalable<BezierCurve>- Parameters:
factor- scale-factorcx- x-coordinate of the relativePointfor the scalingcy- y-coordinate of the relativePointfor the scaling- Returns:
- the new, scaled object
-
getScaled
Description copied from interface:IScalableScales a copy of the calling object by the given factors relative to the given centerPoint(cx, cy).- Specified by:
getScaledin interfaceIScalable<BezierCurve>- Parameters:
fx- x-scale-factorfy- y-scale-factorcx- x-coordinate of the relativePointfor the scalingcy- y-coordinate of the relativePointfor the scaling- Returns:
- the new, scaled object
-
getScaled
Description copied from interface:IScalableScales a copy of the calling object by the given factors relative to the given centerPoint.- Specified by:
getScaledin interfaceIScalable<BezierCurve>- Parameters:
fx- x-scale-factorfy- y-scale-factorcenter- relativePointfor the scaling- Returns:
- the new, scaled object
-
getScaled
Description copied from interface:IScalableScales a copy of the calling object by the given factor relative to the given centerPoint.- Specified by:
getScaledin interfaceIScalable<BezierCurve>- Parameters:
factor- scale-factorcenter- relativePointfor the scaling- Returns:
- the new, scaled object
-
getTransformed
Default implementation returning a transformedPathrepresentation of thisIGeometry. Subclasses may override this method to return a more specific representation.- Specified by:
getTransformedin interfaceIGeometry- Parameters:
t- TheAffineTransformto be applied- Returns:
- a transformed
Pathrepresentation of thisIGeometry - See Also:
-
getTranslated
Description copied from interface:ITranslatableTranslates a copy of this object by the given values in x and y direction.- Specified by:
getTranslatedin interfaceITranslatable<BezierCurve>- Parameters:
dx- x-translationdy- y-translation- Returns:
- a new, translated object
-
getTranslated
Description copied from interface:ITranslatableTranslates a copy of this object by the givenPoint.- Specified by:
getTranslatedin interfaceITranslatable<BezierCurve>- Parameters:
d- translationPoint- Returns:
- a new, translated object
-
getX1
public double getX1()Description copied from interface:ICurveReturns the startPoint's x coordinate. -
getX2
public double getX2()Description copied from interface:ICurveReturns the endPoint's x coordinate. -
getY1
public double getY1()Description copied from interface:ICurveReturns the startPoint's y coordinate. -
getY2
public double getY2()Description copied from interface:ICurveReturns the endPoint's y coordinate. -
intersects
Description copied from interface:ICurveTests if thisICurveand the givenICurveintersect, i.e. whether a final set of intersection points exists. Two curves intersect if they touch (seeIGeometry.touches(IGeometry)) but do not overlap (seeICurve.overlaps(ICurve)).- Specified by:
intersectsin interfaceICurve- Parameters:
c- TheICurveto test for intersections.- Returns:
trueif they intersect,falseotherwise
-
overlaps
Checks if thisBezierCurveand the given otherBezierCurveoverlap, i.e. an infinite set of intersectionPoints exists.- Parameters:
other- theBezierCurveto check for an overlapping segment with thisBezierCurve- Returns:
trueif this and the given otherBezierCurveoverlap, otherwisefalse
-
overlaps
Description copied from interface:ICurveTests if thisICurveand the givenICurveoverlap, i.e. whether an infinite set of intersection points exists. Two curves overlap if they touch (seeIGeometry.touches(IGeometry)) but not intersect (seeICurve.intersects(ICurve)). -
rotateCCW
Directly rotates thisBezierCurvecounter-clockwise (CCW) around its centerPointby the givenAngle. Direct adaptation means, thatthisBezierCurveis modified in-place.- Parameters:
angle- the rotationAngle- Returns:
thisfor convenience
-
rotateCCW
Directly rotates thisBezierCurvecounter-clockwise (CCW) around thePointspecified by the given x and y coordinate values by the givenAngle. Direct adaptation means, thatthisBezierCurveis modified in-place. -
rotateCCW
Directly rotates thisBezierCurvecounter-clockwise (CCW) around the givenPointby the givenAngle. Direct adaptation means, thatthisBezierCurveis modified in-place. -
rotateCW
Directly rotates thisBezierCurveclockwise (CW) around its centerPointby the givenAngle. Direct adaptation means, thatthisBezierCurveis modified in-place.- Parameters:
angle- the rotationAngle- Returns:
thisfor convenience
-
rotateCW
Directly rotates thisBezierCurveclockwise (CW) around thePointspecified by the given x and y coordinate values by the givenAngle. Direct adaptation means, thatthisBezierCurveis modified in-place. -
rotateCW
Directly rotates thisBezierCurveclockwise (CW) around the givenPointby the givenAngle. Direct adaptation means, thatthisBezierCurveis modified in-place. -
scale
Description copied from interface:IScalableScales the calling object by the given factor relative to its centerPoint.- Specified by:
scalein interfaceIScalable<BezierCurve>- Parameters:
factor- scale-factor- Returns:
thisfor convenience
-
scale
Description copied from interface:IScalableScales the calling object by the given factors relative to the given centerPoint.- Specified by:
scalein interfaceIScalable<BezierCurve>- Parameters:
fx- x-scale-factorfy- y-scale-factor- Returns:
thisfor convenience
-
scale
Description copied from interface:IScalableScales the calling object by the given factor relative to the given centerPoint(cx, cy).- Specified by:
scalein interfaceIScalable<BezierCurve>- Parameters:
factor- scale-factorcx- x-coordinate of the relativePointfor the scalingcy- y-coordinate of the relativePointfor the scaling- Returns:
thisfor convenience
-
scale
Description copied from interface:IScalableScales the calling object by the given factors relative to the given centerPoint(cx, cy).- Specified by:
scalein interfaceIScalable<BezierCurve>- Parameters:
fx- x-scale-factorfy- y-scale-factorcx- x-coordinate of the relativePointfor the scalingcy- y-coordinate of the relativePointfor the scaling- Returns:
thisfor convenience
-
scale
Description copied from interface:IScalableScales the calling object by the given factors relative to the given centerPoint.- Specified by:
scalein interfaceIScalable<BezierCurve>- Parameters:
fx- x-scale-factorfy- y-scale-factorcenter- relativePointfor the scaling- Returns:
thisfor convenience
-
scale
Description copied from interface:IScalableScales the calling object by the given factor relative to the given centerPoint.- Specified by:
scalein interfaceIScalable<BezierCurve>- Parameters:
factor- scale-factorcenter- relativePointfor the scaling- Returns:
thisfor convenience
-
setP1
- Parameters:
p1- the new startPointof thisBezierCurve- Returns:
thisfor convenience
-
setP2
- Parameters:
p2- the new endPointof thisBezierCurve- Returns:
thisfor convenience
-
setPoint
Sets the ith controlPointof thisBezierCurve. The startPointis at index0, the first handle-Pointis at index1, etc.- Parameters:
i- the index of the controlPointof thisBezierCurveto setp- the new controlPointat the given index- Returns:
thisfor convenience
-
split
Subdivides thisBezierCurveat the given parameter value t into two newBezierCurves. The first one is theBezierCurveover the parameterBezierCurve.Interval[0;t]and the second one is theBezierCurveover the parameterBezierCurve.Interval[t;1].- Parameters:
t- the parameter value at which thisBezierCurveis subdivided- Returns:
- an array of two
BezierCurves, the left ([0;t]) and the right ([t;1])
-
toBezier
Description copied from interface:ICurveComputes a list ofBezierCurves that approximate theICurve. For example, aLineor aBezierCurvein general could return a list with the curve itself as its only element. But anEllipseor anArcmay return a list of consecutiveBezierCurves which approximate theICurve.- Specified by:
toBezierin interfaceICurve- Returns:
- a list of
BezierCurves that approximate theICurve
-
toCubic
Returns a hard approximation of thisBezierCurveas aCubicCurve. The newCubicCurveis constructed from the startPoint, the first two handlePoints and the endPointof thisBezierCurve. If thisBezierCurveis not of degree four or higher, i.e. it does not have four or more controlPoints (including start and endPoint),nullis returned.- Returns:
- a new
CubicCurvethat is constructed from the startPoint, the first two handlePoints and the endPointof thisBezierCurveornullif thisBezierCurvedoes not have at least four controlPoints
-
toLine
Returns a hard approximation of thisBezierCurveas aLine. TheLineis constructed from the start and endPointof thisBezierCurve.- Returns:
- a
Linefrom the startPointto the endPointof thisBezierCurveornullif thisBezierCurvedoes only have one controlPoint
-
toLineStrip
Computes an approximation of thisBezierCurveby a strip ofLines. For detailed information on how the approximation is computed, seetoLineStrip(double, Interval).- Parameters:
lineSimilarity- the threshold for the sum of the distances of the controlPoints to the baseline (toLine()) of thisBezierCurve- Returns:
- an approximation of this
BezierCurveby a strip ofLines - See Also:
-
toLineStrip
public Line[] toLineStrip(double lineSimilarity, org.eclipse.gef.geometry.planar.BezierCurve.Interval startInterval) Computes an approximation of this
BezierCurveby a strip ofLines.The
BezierCurveis recursively subdivided until it is "similar" to a straightLine. The similarity check computes the sum of the distances of the controlPoints to the baseline (toLine()) of thisBezierCurve. If this sum is smaller than the given lineSimilarity, theBezierCurveis assumed to be "similar" to a straight line.- Parameters:
lineSimilarity- the threshold for the sum of the distances of the control points to the baseline of thisBezierCurvestartInterval- theBezierCurve.Intervalof thisBezierCurvethat has to be approximated by a strip ofLines- Returns:
Linesegments approximating thisBezierCurve
-
toPath
- Specified by:
toPathin interfaceIGeometry- Returns:
- a
Pathapproximating thisBezierCurveusingLinesegments
-
toPoints
ComputesPoints on thisBezierCurveover the givenBezierCurve.Interval. Consecutive returnedPoints are required to beequalto each other.- Parameters:
startInterval- theBezierCurve.Intervalof thisBezierCurveto calculatePoints for- Returns:
Points on thisBezierCurveover the given parameterBezierCurve.Intervalwhere consecutivePoints areequalto each other
-
toQuadratic
Returns a hard approximation of thisBezierCurveas aQuadraticCurve. The newQuadraticCurveis constructed from the startPoint, the first handlePointand the endPointof thisBezierCurve. If thisBezierCurveis not of degree three or higher, i.e. it does not have three or more controlPoints (including start and endPoint),nullis returned.- Returns:
- a new
QuadraticCurvethat is constructed from the startPoint, the first handlePointand the endPointof thisBezierCurveornullif thisBezierCurvedoes not have at least three controlPoints
-
toString
-
translate
Description copied from interface:ITranslatableTranslates the object by the given values in x and y direction.- Specified by:
translatein interfaceITranslatable<BezierCurve>- Parameters:
dx- x-translationdy- y-translation- Returns:
thisfor convenience
-
translate
Description copied from interface:ITranslatableTranslates the object by the givenPoint.- Specified by:
translatein interfaceITranslatable<BezierCurve>- Parameters:
d- translationPoint- Returns:
thisfor convenience
-
clone
Overridden with public visibility as recommended withinCloneable. -
hashCode
public final int hashCode() -
touches
Description copied from interface:IGeometry
-