Skip to content

Geometry Examples

mwienand edited this page Aug 4, 2016 · 7 revisions

Examples (undeployed)

  • 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').


Touch/Containment

  • package: org.eclipse.gef.geometry.examples.containment

The Touch/Containment examples demonstrate touch and containment detection of Ellipse and Polygon shapes with other geometries.

EllipseLineContainment

The EllipseLineContainment demonstrates touch/containment tests between Ellipse and Line.

EllipsePolygonContainment

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

EllipseRectangleContainment

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

PolygonCubicCurveContainment

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

PolygonEllipseContainment

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

PolygonLineContainment

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

PolygonPolygonContainment

The PolygonPolygonContainment demonstrates touch/containment tests between Polygons.

PolygonPolylineContainment

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

PolygonRectangleContainment

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


Demos

The Demos demonstrate some advanced features of Geometry.

BezierApproximationExample

The BezierApproximationExample demonstrates how a BezierCurve can be approximated from a list of Points.

CAGExample

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

ConvexHullExample

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

CubicCurveDeCasteljauExample

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

CubicInterpolationExample

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

CurvedPolygonExample

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

RegionClippingExample

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

RegionOutlineExample

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

RingClippingExample

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

RingOutlineExample

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

TriangulationExample

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


Intersection

  • package: org.eclipse.gef.geometry.examples.intersection

The Intersection examples demonstrate how intersections of geometries can be computed.

CubicCurvesIntersection

The CubicCurvesIntersection demonstrates intersection calculation for CubicCurves.

EllipseCubicCurveIntersection

The EllipseCubicCurveIntersection demonstrates intersection calculation between Ellipse and CubicCurve.

EllipseEllipseIntersection

The EllipseEllipseIntersection demonstrates intersection calculation between Ellipses.

EllipseLineIntersection

The EllipseLineIntersection demonstrates intersection calculation between Ellipse and Line.

EllipsePolygonIntersection

The EllipsePolygonIntersection demonstrates intersection calculation between Ellipse and Polygon.

EllipsePolylineIntersection

The EllipsePolylineIntersection demonstrates intersection calculation between Ellipse and Polyline.

EllipseQuadraticCurveIntersection

The EllipseQuadraticCurveIntersection demonstrates intersection calculation between Ellipse and QuadraticCurve.

EllipseRectangleIntersection

The EllipseRectangleIntersection demonstrates intersection calculation between Ellipse and Rectangle.

PolygonCubicCurveIntersection

The PolygonCubicCurveIntersection demonstrates intersection calculation between Polygon and CubicCurve.

PolygonEllipseIntersection

The PolygonEllipseIntersection demonstrates intersection calculation between Polygon and Ellipse.

PolygonLineIntersection

The PolygonLineIntersection demonstrates intersection calculation between Polygon and Line.

PolygonPolygonIntersection

The PolygonPolygonIntersection demonstrates intersection calculation between Polygons.

PolygonPolylineIntersection

The PolygonPolylineIntersection demonstrates intersection calculation between Polygon and Polyline.

PolygonQuadraticCurveIntersection

The PolygonQuadraticCurveIntersection demonstrates intersection calculation between Polygon and QuadraticCurve.

PolygonRectangleIntersection

The PolygonRectangleIntersection demonstrates intersection calculation between Polygon and Rectangle.

QuadraticCurvesIntersection

The QuadraticCurvesIntersection demonstrates intersection calculation between QuadraticCurves.


Scaling/Rotating

  • package: org.eclipse.gef.geometry.examples.scalerotate

The Scaling/Rotating examples demonstrate how to scale/rotate geometries.

CubicCurveScaleRotate

The CubicCurveScaleRotate demonstrates rotating/scaling of CubicCurves.

PolygonScaleRotate

The PolygonScaleRotate demonstrates rotating/scaling of Polygons.

Clone this wiki locally