Package | Description |
---|---|
org.eclipse.gef4.geometry.convert.awt |
This package provides support for converting geometric objects to AWT.
|
org.eclipse.gef4.geometry.euclidean |
This package provides core abstractions to support calculations within
2-dimensional Euclidean space.
|
org.eclipse.gef4.geometry.internal.utils |
This package provides utility classes being used internally for geometric
calculations.
|
org.eclipse.gef4.geometry.planar |
This package provides support for geometric calculations based on shapes.
|
org.eclipse.gef4.geometry.projective |
This package provides core abstractions to support calculations within
2-dimensional projective vector space.
|
Modifier and Type | Method and Description |
---|---|
static Point |
AWT2Geometry.toPoint(java.awt.geom.Point2D p)
Converts an AWT
Point2D into a GEF4 Point . |
static Point[] |
AWT2Geometry.toPoints(java.awt.geom.Point2D[] pts)
Converts a given array of AWT
Point2D s into a an array of GEF4
Point s. |
Modifier and Type | Method and Description |
---|---|
static java.awt.geom.Point2D.Double |
Geometry2AWT.toAWTPoint(Point p)
|
static java.awt.geom.Point2D.Double[] |
Geometry2AWT.toAWTPoints(Point[] pts)
Converts a given array of GEF4
Point s into an array of AWT
Point2D s with double precision (
Point2D.Double ). |
Modifier and Type | Method and Description |
---|---|
Point |
Vector.toPoint()
|
Modifier and Type | Method and Description |
---|---|
static double |
Straight.getSignedDistanceCCW(Point p,
Point q,
Point r)
|
Constructor and Description |
---|
Straight(Point point1,
Point point2)
|
Vector(Point p)
|
Vector(Point start,
Point end)
|
Modifier and Type | Method and Description |
---|---|
static Point[] |
PointListUtils.toPointsArray(double[] coordinates)
Converts a given array of x/y coordinate values into an array of
Point s. |
static Point[] |
PointListUtils.toPointsArray(Line[] segmentsArray,
boolean open)
|
Modifier and Type | Method and Description |
---|---|
static double[] |
PointListUtils.toCoordinatesArray(Point[] points)
|
static Line[] |
PointListUtils.toSegmentsArray(Point[] points,
boolean close)
|
Modifier and Type | Method and Description |
---|---|
Point |
Point.clone()
Overwritten with public visibility as proposed in
Cloneable . |
Point |
AffineTransform.deltaTransform(Point pt)
Transforms the given
Point with this AffineTransform
without applying the translation components of the transformation matrix
of this AffineTransform . |
Point |
Line.get(double t) |
Point |
BezierCurve.get(double t)
Computes the
Point on this BezierCurve at parameter value
t, which is expected to lie in the parameter Interval
[0;1] . |
Point |
Rectangle.getBottom()
Returns a new Point representing the middle point of the bottom side of
this Rectangle.
|
Point |
Rectangle.getBottomLeft()
Returns a new Point representing the bottom left point of this Rectangle.
|
Point |
Rectangle.getBottomRight()
Returns a new Point representing the bottom right point of this
Rectangle.
|
Point |
CurvedPolygon.getCenter()
Returns an approximated center
Point of this
CurvedPolygon . |
Point |
AbstractRectangleBasedGeometry.getCenter()
Returns the center
Point of this
AbstractRectangleBasedGeometry . |
static Point |
Point.getCentroid(Point... points)
Computes the centroid of the given
Point s. |
static Point[] |
Point.getConvexHull(Point... points)
Computes the convex hull of the given set of
Point s using the
Graham scan algorithm. |
Point |
Point.getCopy() |
static Point[] |
Point.getCopy(Point... points)
Copies an array of points, by copying each point contained in the array.
|
Point |
QuadraticCurve.getCtrl()
Get the control point.
|
Point |
CubicCurve.getCtrl1()
Returns the first handle
Point . |
Point |
CubicCurve.getCtrl2()
Returns the second handle
Point . |
Point |
Point.getDifference(Point other)
|
Point |
Line.getIntersection(Line l)
Returns the single intersection point between this
Line and the
given one, in case it exists. |
Point[] |
Line.getIntersections(BezierCurve curve) |
Point[] |
BezierCurve.getIntersections(BezierCurve other)
Returns the
Point s of intersection of this and the given other
BezierCurve . |
Point[] |
Ellipse.getIntersections(Ellipse e2)
|
Point[] |
Polyline.getIntersections(ICurve c) |
Point[] |
PolyBezier.getIntersections(ICurve c) |
Point[] |
ICurve.getIntersections(ICurve c)
|
Point[] |
Ellipse.getIntersections(ICurve c)
|
Point[] |
BezierCurve.getIntersections(ICurve curve) |
Point[] |
Arc.getIntersections(ICurve c) |
Point[] |
Ellipse.getIntersections(Line line)
|
Point |
Rectangle.getLeft()
Returns a new Point representing the middle point of the left hand side
of this Rectangle.
|
Point |
AbstractRectangleBasedGeometry.getLocation()
Returns a
Point specifying the x and y coordinates of this
AbstractRectangleBasedGeometry . |
Point |
Point.getNegated()
Creates a Point with negated x and y values.
|
Point[] |
Region.getOutlineIntersections(ICurve c)
|
Point |
Polyline.getP1() |
Point |
PolyBezier.getP1() |
Point |
ICurve.getP1()
|
Point |
BezierCurve.getP1() |
Point |
Polyline.getP2() |
Point |
PolyBezier.getP2() |
Point |
ICurve.getP2()
|
Point |
BezierCurve.getP2() |
Point |
BezierCurve.getPoint(int i)
Returns the ith control
Point of this BezierCurve . |
Point[] |
Rectangle.getPoints()
|
Point[] |
Path.Segment.getPoints()
Returns a copy of the
Point s associated with this
Path.Segment . |
Point[] |
Line.getPoints()
|
Point[] |
BezierCurve.getPoints()
Returns the control
Point s of this BezierCurve . |
Point |
Polyline.getProjection(Point reference) |
Point |
PolyBezier.getProjection(Point reference) |
Point |
Line.getProjection(Point p) |
Point |
ICurve.getProjection(Point reference)
|
Point |
BezierCurve.getProjection(Point reference) |
Point |
Arc.getProjection(Point reference) |
static Point[] |
Point.getReverseCopy(Point... points)
Returns a copy of the given array of points, where the points are placed
in reversed order.
|
Point |
Rectangle.getRight()
Returns a new Point which represents the middle point of the right hand
side of this Rectangle.
|
Point |
Point.getScaled(double factor)
Creates a new Point from this Point by scaling by the specified amount.
|
Point |
Point.getScaled(double xFactor,
double yFactor)
Creates a new Point from this Point by scaling by the specified values.
|
Point |
Point.getScaled(double factorX,
double factorY,
Point center)
Returns a new
Point scaled by the given scale-factors. |
Point |
Rectangle.getTop()
Returns a new Point which represents the middle point of the top side of
this Rectangle.
|
Point |
Rectangle.getTopLeft()
Returns a new Point which represents the top left hand corner of this
Rectangle.
|
Point |
Rectangle.getTopRight()
Returns a new Point which represents the top right hand corner of this
Rectangle.
|
Point |
AffineTransform.getTransformed(Point ptSrc)
Transforms the given
Point with this AffineTransform by
multiplying the transformation matrix of this AffineTransform
with the given Point . |
Point[] |
AffineTransform.getTransformed(Point[] points)
Transforms the given array of
Point s with this
AffineTransform by multiplying the transformation matrix of this
AffineTransform individually with each of the given Point
s. |
Point |
Point.getTranslated(Dimension d)
Creates a new Point which is translated by the values of the input
Dimension.
|
Point |
Point.getTranslated(double x,
double y)
Creates a new Point which is translated by the specified x and y values
|
Point |
Point.getTranslated(Point p)
Creates a new Point which is translated by the values of the provided
Point.
|
Point |
Point.getTransposed()
Creates a new Point with the transposed values of this Point.
|
Point |
AffineTransform.inverseTransform(Point pt)
Inverse transforms the given
Point with this
AffineTransform . |
static Point |
Point.max(Point p1,
Point p2)
Creates a new Point representing the MAX of two provided Points.
|
static Point |
Point.min(Point p1,
Point p2)
Creates a new Point representing the MIN of two provided Points.
|
static Point |
Point.nearest(Point referencePoint,
Point... candidates)
Returns (one of) the candidate(s) with minimal distance to the given
reference point.
|
Point |
Point.negate()
Negates the x and y values of this Point.
|
Point |
Point.scale(double factor)
Scales this Point by the specified amount.
|
Point |
Point.scale(double xFactor,
double yFactor)
Scales this Point by the specified values.
|
Point |
Point.scale(double factorX,
double factorY,
Point center)
Scales this
Point by the given scale-factors. |
Point |
Point.setLocation(double x,
double y)
Sets the location of this Point to the provided x and y locations.
|
Point |
Point.setLocation(Point p)
Sets the location of this Point to the specified Point.
|
Point |
Point.setX(double x)
Sets the x value of this Point to the given value.
|
Point |
Point.setY(double y)
Sets the y value of this Point to the given value;
|
Point[] |
BezierCurve.toPoints(org.eclipse.gef4.geometry.planar.BezierCurve.Interval startInterval)
|
Point |
Point.translate(Dimension d)
Shifts this Point by the values of the Dimension along each axis, and
returns this for convenience.
|
Point |
Point.translate(double dx,
double dy)
Shifts this Point by the values supplied along each axes, and returns
this for convenience.
|
Point |
Point.translate(Point p)
Shifts the location of this Point by the location of the input Point
along each of the axes, and returns this for convenience.
|
Point |
Point.transpose()
Transposes this object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
RoundedRectangle.contains(Point p) |
boolean |
Rectangle.contains(Point p)
Returns whether the given point is within the boundaries of this
Rectangle.
|
boolean |
Polyline.contains(Point p) |
boolean |
Polygon.contains(Point p) |
boolean |
PolyBezier.contains(Point p) |
boolean |
Pie.contains(Point p) |
boolean |
Path.contains(Point p) |
boolean |
Line.contains(Point p) |
boolean |
IGeometry.contains(Point p)
|
boolean |
Ellipse.contains(Point p) |
boolean |
CurvedPolygon.contains(Point p) |
boolean |
BezierCurve.contains(Point p) |
boolean |
Arc.contains(Point p) |
Point |
AffineTransform.deltaTransform(Point pt)
Transforms the given
Point with this AffineTransform
without applying the translation components of the transformation matrix
of this AffineTransform . |
boolean |
Polyline.equals(Point... points)
Checks whether this
Polyline and the one that is indirectly given
via the sequence of points are regarded to be equal. |
boolean |
Polygon.equals(Point[] points)
Checks whether this
Polygon and the one that is indirectly given
via the given array of points are regarded to be equal. |
static Rectangle |
Point.getBounds(Point... points)
|
static Point |
Point.getCentroid(Point... points)
Computes the centroid of the given
Point s. |
static Point[] |
Point.getConvexHull(Point... points)
Computes the convex hull of the given set of
Point s using the
Graham scan algorithm. |
static Point[] |
Point.getCopy(Point... points)
Copies an array of points, by copying each point contained in the array.
|
Point |
Point.getDifference(Point other)
|
double |
Point.getDistance(Point p)
Calculates the distance from this Point to the one specified.
|
double |
BezierCurve.getParameterAt(Point p)
Returns the parameter value of this
BezierCurve for the given
Point . |
Point |
Polyline.getProjection(Point reference) |
Point |
PolyBezier.getProjection(Point reference) |
Point |
Line.getProjection(Point p) |
Point |
ICurve.getProjection(Point reference)
|
Point |
BezierCurve.getProjection(Point reference) |
Point |
Arc.getProjection(Point reference) |
static Point[] |
Point.getReverseCopy(Point... points)
Returns a copy of the given array of points, where the points are placed
in reversed order.
|
PolyBezier |
RoundedRectangle.getRotatedCCW(Angle angle,
Point center) |
Ring |
Ring.getRotatedCCW(Angle angle,
Point center) |
Ring |
Region.getRotatedCCW(Angle angle,
Point center) |
Polygon |
Rectangle.getRotatedCCW(Angle alpha,
Point center)
|
PolyBezier |
PolyBezier.getRotatedCCW(Angle angle,
Point center) |
Path |
Pie.getRotatedCCW(Angle angle,
Point center) |
T |
IRotatable.getRotatedCCW(Angle angle,
Point center)
|
PolyBezier |
Ellipse.getRotatedCCW(Angle angle,
Point center) |
CurvedPolygon |
CurvedPolygon.getRotatedCCW(Angle angle,
Point center) |
BezierCurve |
BezierCurve.getRotatedCCW(Angle angle,
Point center) |
PolyBezier |
Arc.getRotatedCCW(Angle angle,
Point center) |
PolyBezier |
RoundedRectangle.getRotatedCW(Angle angle,
Point center) |
Ring |
Ring.getRotatedCW(Angle angle,
Point center) |
Ring |
Region.getRotatedCW(Angle angle,
Point center) |
Polygon |
Rectangle.getRotatedCW(Angle alpha,
Point center)
|
PolyBezier |
PolyBezier.getRotatedCW(Angle angle,
Point center) |
Path |
Pie.getRotatedCW(Angle angle,
Point center) |
T |
IRotatable.getRotatedCW(Angle angle,
Point center)
|
PolyBezier |
Ellipse.getRotatedCW(Angle angle,
Point center) |
CurvedPolygon |
CurvedPolygon.getRotatedCW(Angle angle,
Point center) |
BezierCurve |
BezierCurve.getRotatedCW(Angle angle,
Point center) |
PolyBezier |
Arc.getRotatedCW(Angle angle,
Point center) |
Ring |
Ring.getScaled(double fx,
double fy,
Point center) |
Region |
Region.getScaled(double fx,
double fy,
Point center) |
PolyBezier |
PolyBezier.getScaled(double fx,
double fy,
Point center) |
Point |
Point.getScaled(double factorX,
double factorY,
Point center)
Returns a new
Point scaled by the given scale-factors. |
T |
IScalable.getScaled(double fx,
double fy,
Point center)
Scales a copy of the calling object by the given factors relative to the
given center
Point . |
CurvedPolygon |
CurvedPolygon.getScaled(double fx,
double fy,
Point center) |
BezierCurve |
BezierCurve.getScaled(double fx,
double fy,
Point center) |
T |
AbstractRectangleBasedGeometry.getScaled(double factorX,
double factorY,
Point center) |
Ring |
Ring.getScaled(double factor,
Point center) |
Region |
Region.getScaled(double factor,
Point center) |
PolyBezier |
PolyBezier.getScaled(double factor,
Point center) |
T |
IScalable.getScaled(double factor,
Point center)
Scales a copy of the calling object by the given factor relative to the
given center
Point . |
CurvedPolygon |
CurvedPolygon.getScaled(double factor,
Point center) |
BezierCurve |
BezierCurve.getScaled(double factor,
Point center) |
T |
AbstractRectangleBasedGeometry.getScaled(double factor,
Point center) |
Point |
AffineTransform.getTransformed(Point ptSrc)
Transforms the given
Point with this AffineTransform by
multiplying the transformation matrix of this AffineTransform
with the given Point . |
Point[] |
AffineTransform.getTransformed(Point[] points)
Transforms the given array of
Point s with this
AffineTransform by multiplying the transformation matrix of this
AffineTransform individually with each of the given Point
s. |
Ring |
Ring.getTranslated(Point d) |
Region |
Region.getTranslated(Point d) |
PolyBezier |
PolyBezier.getTranslated(Point d) |
Point |
Point.getTranslated(Point p)
Creates a new Point which is translated by the values of the provided
Point.
|
T |
ITranslatable.getTranslated(Point d)
Translates a copy of this object by the given
Point . |
CurvedPolygon |
CurvedPolygon.getTranslated(Point d) |
BezierCurve |
BezierCurve.getTranslated(Point d) |
T |
AbstractRectangleBasedGeometry.getTranslated(Point pt) |
Rectangle |
Rectangle.getUnioned(Point p)
Returns a new Rectangle which contains both this Rectangle and the Point
supplied as input.
|
static PolyBezier |
PolyBezier.interpolateCubic(Angle startAngle,
double startLength,
Angle endAngle,
double endLength,
double curveWidthCoefficient,
Point... wayPoints)
|
static PolyBezier |
PolyBezier.interpolateCubic(double curveWidthCoefficient,
Point... points)
|
static PolyBezier |
PolyBezier.interpolateCubic(Point... points) |
Point |
AffineTransform.inverseTransform(Point pt)
Inverse transforms the given
Point with this
AffineTransform . |
static Point |
Point.max(Point p1,
Point p2)
Creates a new Point representing the MAX of two provided Points.
|
static Point |
Point.min(Point p1,
Point p2)
Creates a new Point representing the MIN of two provided Points.
|
static Point |
Point.nearest(Point referencePoint,
Point... candidates)
Returns (one of) the candidate(s) with minimal distance to the given
reference point.
|
static Point |
Point.nearest(Point referencePoint,
Point... candidates)
Returns (one of) the candidate(s) with minimal distance to the given
reference point.
|
Ring |
Ring.rotateCCW(Angle angle,
Point center)
|
PolyBezier |
PolyBezier.rotateCCW(Angle angle,
Point center)
|
CurvedPolygon |
CurvedPolygon.rotateCCW(Angle angle,
Point center)
|
BezierCurve |
BezierCurve.rotateCCW(Angle angle,
Point center)
Directly rotates this
BezierCurve counter-clockwise (CCW) around
the given Point by the given Angle . |
static void |
Point.rotateCCW(Point[] points,
Angle angle,
double cx,
double cy)
|
Ring |
Ring.rotateCW(Angle angle,
Point center)
|
PolyBezier |
PolyBezier.rotateCW(Angle angle,
Point center)
|
CurvedPolygon |
CurvedPolygon.rotateCW(Angle angle,
Point center)
|
BezierCurve |
BezierCurve.rotateCW(Angle angle,
Point center)
|
static void |
Point.rotateCW(Point[] points,
Angle angle,
double cx,
double cy)
|
Ring |
Ring.scale(double fx,
double fy,
Point center) |
Region |
Region.scale(double fx,
double fy,
Point center) |
PolyBezier |
PolyBezier.scale(double fx,
double fy,
Point center) |
Point |
Point.scale(double factorX,
double factorY,
Point center)
Scales this
Point by the given scale-factors. |
T |
IScalable.scale(double fx,
double fy,
Point center)
Scales the calling object by the given factors relative to the given
center
Point . |
CurvedPolygon |
CurvedPolygon.scale(double fx,
double fy,
Point center) |
BezierCurve |
BezierCurve.scale(double fx,
double fy,
Point center) |
T |
AbstractRectangleBasedGeometry.scale(double fx,
double fy,
Point center) |
Ring |
Ring.scale(double factor,
Point center) |
Region |
Region.scale(double factor,
Point center) |
PolyBezier |
PolyBezier.scale(double factor,
Point center) |
T |
IScalable.scale(double factor,
Point center)
Scales the calling object by the given factor relative to the given
center
Point . |
CurvedPolygon |
CurvedPolygon.scale(double factor,
Point center) |
BezierCurve |
BezierCurve.scale(double factor,
Point center) |
T |
AbstractRectangleBasedGeometry.scale(double factor,
Point center) |
static void |
Point.scale(Point[] points,
double fx,
double fy,
double cx,
double cy)
|
T |
AbstractRectangleBasedGeometry.setBounds(Point loc,
Dimension size)
Sets the x, y, width, and height values of this
AbstractRectangleBasedGeometry to the respective values specified
by the passed-in Point and the passed-in Dimension . |
QuadraticCurve |
QuadraticCurve.setCtrl(Point ctrl)
Sets the curve's control point.
|
CubicCurve |
CubicCurve.setCtrl1(Point ctrl1)
|
CubicCurve |
CubicCurve.setCtrl2(Point ctrl2)
|
CubicCurve |
CubicCurve.setCurve(Point p1,
Point ctrl1,
Point ctrl2,
Point p2)
|
Line |
Line.setLine(Point p1,
Point p2)
Initializes this
Line with the start and end point coordinates
provided by the given points |
Point |
Point.setLocation(Point p)
Sets the location of this Point to the specified Point.
|
T |
AbstractRectangleBasedGeometry.setLocation(Point p)
Sets the x and y coordinates of this
AbstractRectangleBasedGeometry to the respective values of the
given Point . |
BezierCurve |
BezierCurve.setP1(Point p1)
|
BezierCurve |
BezierCurve.setP2(Point p2)
|
BezierCurve |
BezierCurve.setPoint(int i,
Point p)
Sets the ith control
Point of this BezierCurve . |
Ring |
Ring.translate(Point d) |
Region |
Region.translate(Point d) |
PolyBezier |
PolyBezier.translate(Point d) |
Point |
Point.translate(Point p)
Shifts the location of this Point by the location of the input Point
along each of the axes, and returns this for convenience.
|
T |
ITranslatable.translate(Point d)
Translates the object by the given
Point . |
CurvedPolygon |
CurvedPolygon.translate(Point d) |
BezierCurve |
BezierCurve.translate(Point d) |
T |
AbstractRectangleBasedGeometry.translate(Point p) |
static void |
Point.translate(Point[] points,
double dx,
double dy)
Translates an array of
Point s by translating each individual
point by a given x and y offset. |
Rectangle |
Rectangle.union(Point p)
|
Modifier and Type | Method and Description |
---|---|
protected java.util.Set<org.eclipse.gef4.geometry.planar.BezierCurve.IntervalPair> |
Line.getIntersectionIntervalPairs(BezierCurve other,
java.util.Set<Point> intersections) |
protected java.util.Set<org.eclipse.gef4.geometry.planar.BezierCurve.IntervalPair> |
BezierCurve.getIntersectionIntervalPairs(BezierCurve other,
java.util.Set<Point> intersections)
Computes
IntervalPair s which do reflect Point s of
intersection between this and the given other BezierCurve . |
protected java.util.Set<org.eclipse.gef4.geometry.planar.BezierCurve.IntervalPair> |
Line.getIntersectionIntervalPairs(Line other,
java.util.Set<Point> intersections)
Provides an optimized version of the
BezierCurve.getIntersectionIntervalPairs(BezierCurve, Set)
method. |
Constructor and Description |
---|
BezierCurve(Point... controlPoints)
Constructs a new
BezierCurve from the given control Point
s. |
CubicCurve(Point... points)
Constructs a new
CubicCurve from the given sequence of
Point s, which is expected to be in the order: start Point
, first and second handle Point s, and end Point . |
CubicCurve(Point start,
Point ctrl1,
Point ctrl2,
Point end)
Constructs a new
CubicCurve object from the given control
Point s. |
Line(Point... points)
|
Line(Point p1,
Point p2)
|
Point(Point p)
Constructs a Point at the same location as the given Point.
|
Polygon(Point... points)
|
Polyline(Point... points)
|
QuadraticCurve(Point... points)
Constructs a new
QuadraticCurve from the given sequence of
Point s formed by start-, control-, and end-point. |
QuadraticCurve(Point p1,
Point pCtrl,
Point p2)
Constructs a new QuadraticCurve object from the given points.
|
Rectangle(Point location,
Dimension size)
Constructs a new
Rectangle with the given location and size. |
Rectangle(Point p1,
Point p2)
|
Segment(int type,
Point... points)
Constructs a new
Path.Segment of the given type. |
Modifier and Type | Method and Description |
---|---|
Point |
Vector3D.toPoint()
|
Constructor and Description |
---|
Vector3D(Point p)
|
Copyright (c) 2014 itemis AG, and others. All rights reserved.