-
Notifications
You must be signed in to change notification settings - Fork 55
Geometry Examples
- bundle: org.eclipse.gef.geometry.examples
The examples provided by Examples demonstrate how to use the API provided by the Geometry module of Geometry. They are not deployed on our update-sites and have to checked out in source (org.eclipse.gef.geometry.examples) from our GEF Git repository. In order to have the example plug-in compile properly, all other required GEF bundles will either have to be installed (in a matching version) into your running eclipse platform (if this is used as target), added to a target definition (the target definitions contained in org.eclipse.gef.target may be augmented for this purpose), or checked out in source as well (see GEF Project Contributor Guide for details on how to obtain the sources and setup your workspace). Having prepared everything as outlined before, the standalone example might easily be started by launching one of the following example classes from org.eclipse.gef.geometry.examples via the context menu ('Run As' -> 'Java Application').
- package: org.eclipse.gef.geometry.examples.containment
The Touch/Containment examples demonstrate touch and containment detection of Ellipse and Polygon shapes with other geometries.
The EllipseLineContainment demonstrates touch/containment tests between Ellipse and Line.

The EllipsePolygonContainment demonstrates touch/containment tests between Ellipse and Polygon.

The EllipseRectangleContainment demonstrates touch/containment tests between Ellipse and Rectangle.

The PolygonCubicCurveContainment demonstrates touch/containment tests between Polygon and CubicCurve.

The PolygonEllipseContainment demonstrates touch/containment tests between Polygon and Ellipse.

The PolygonLineContainment demonstrates touch/containment tests between Polygon and Line.

The PolygonPolygonContainment demonstrates touch/containment tests between Polygons.

The PolygonPolylineContainment demonstrates touch/containment tests between Polygon and Polyline.

The PolygonRectangleContainment demonstrates touch/containment tests between Polygon and Rectangle.

The Demos demonstrate some advanced features of Geometry.
The BezierApproximationExample demonstrates how a BezierCurve can be approximated from a list of Points.

The CAGExample demonstrates how constructive-area-geometry (CAG) can be applied through Path representations.

The ConvexHullExample demonstrates how a convex hull Polygon can be computed from a set of Points.

The CubicCurveDeCasteljauExample demonstrates how a CubicCurve gets constructed using the De Casteljau algorithm.

The CubicInterpolationExample demonstrates how a CubicCurve can be interpolated from a set of Points using different width coefficients.

The CurvedPolygonExample demonstrates usage of a CurvedPolygon, including containment tests for Point.

The RegionClippingExample demonstrates how a Region can be used to compute clipping areas.

The RegionOutlineExample demonstrates how a Line-based outline can be computed from a Region.

The RingClippingExample demonstrates how demonstrates how a Ring can be used to compute clipping areas.

The RingOutlineExample demonstrates how a Line-based outline can be computed from a Ring.

The TriangulationExample demonstrates how a Polygon can be triangulated into further triangular Polygons.

- package: org.eclipse.gef.geometry.examples.intersection
The Intersection examples demonstrate how intersections of geometries can be computed.
The CubicCurvesIntersection demonstrates intersection calculation for CubicCurves.

The EllipseCubicCurveIntersection demonstrates intersection calculation between Ellipse and CubicCurve.

The EllipseEllipseIntersection demonstrates intersection calculation between Ellipses.

The EllipseLineIntersection demonstrates intersection calculation between Ellipse and Line.

The EllipsePolygonIntersection demonstrates intersection calculation between Ellipse and Polygon.

The EllipsePolylineIntersection demonstrates intersection calculation between Ellipse and Polyline.

The EllipseQuadraticCurveIntersection demonstrates intersection calculation between Ellipse and QuadraticCurve.

The EllipseRectangleIntersection demonstrates intersection calculation between Ellipse and Rectangle.

The PolygonCubicCurveIntersection demonstrates intersection calculation between Polygon and CubicCurve.

The PolygonEllipseIntersection demonstrates intersection calculation between Polygon and Ellipse.

The PolygonLineIntersection demonstrates intersection calculation between Polygon and Line.

The PolygonPolygonIntersection demonstrates intersection calculation between Polygons.

The PolygonPolylineIntersection demonstrates intersection calculation between Polygon and Polyline.

The PolygonQuadraticCurveIntersection demonstrates intersection calculation between Polygon and QuadraticCurve.

The PolygonRectangleIntersection demonstrates intersection calculation between Polygon and Rectangle.

The QuadraticCurvesIntersection demonstrates intersection calculation between QuadraticCurves.

- package: org.eclipse.gef.geometry.examples.scalerotate
The Scaling/Rotating examples demonstrate how to scale/rotate geometries.
The CubicCurveScaleRotate demonstrates rotating/scaling of CubicCurves.

The PolygonScaleRotate demonstrates rotating/scaling of Polygons.
