Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "GEF/GEF4/Geometry/Examples"

< GEF‎ | GEF4‎ | Geometry
(Scaling/Rotation)
(Intersection)
 
Line 165: Line 165:
 
* '''package: org.eclipse.gef4.geometry.examples.intersection'''
 
* '''package: org.eclipse.gef4.geometry.examples.intersection'''
  
The [[#Intersection|Intersection]] demonstrate how intersections of [[GEF/GEF4/Geometry#IGeometry, ICurve, IShape, IMultiShape|geometries]] can be computed.
+
The [[#Intersection|Intersection]] examples demonstrate how intersections of [[GEF/GEF4/Geometry#IGeometry, ICurve, IShape, IMultiShape|geometries]] can be computed.
  
 
==== CubicCurvesIntersection ====
 
==== CubicCurvesIntersection ====

Latest revision as of 07:46, 9 June 2015

Examples (undeployed)

  • bundle: org.eclipse.gef4.geometry.examples

The examples provided by Examples demonstrate how to use the API provided by the Geometry module of GEF4 Geometry. They are not deployed on our update-sites and have to checked out in source (org.eclipse.gef4.geometry.examples) from our GEF4 Git repository. In order to have the example plug-in compile properly, all other required GEF4 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.gef4.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.gef4.geometry.examples via the context menu ('Run As' -> 'Java Application').


Touch/Containment

  • package: org.eclipse.gef4.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.

GEF4-Geometry-Examples-EllipseLineContainment.png

EllipsePolygonContainment

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

GEF4-Geometry-Examples-EllipsePolygonContainment.png

EllipseRectangleContainment

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

GEF4-Geometry-Examples-EllipseRectangleContainment.png

PolygonCubicCurveContainment

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

GEF4-Geometry-Examples-PolygonCubicCurveContainment.png

PolygonEllipseContainment

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

GEF4-Geometry-Examples-PolygonEllipseContainment.png

PolygonLineContainment

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

GEF4-Geometry-Examples-PolygonLineContainment.png

PolygonPolygonContainment

The PolygonPolygonContainment demonstrates touch/containment tests between Polygons.

GEF4-Geometry-Examples-PolygonPolygonContainment.png

PolygonPolylineContainment

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

GEF4-Geometry-Examples-PolygonPolylineContainment.png

PolygonRectangleContainment

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

GEF4-Geometry-Examples-PolygonRectangleContainment.png


Demos

The Demos demonstrate some advanced features of GEF4 Geometry.

BezierApproximationExample

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

GEF4-Geometry-Examples-BezierApproximationExample.png

CAGExample

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

GEF4-Geometry-Examples-CAGExample.png

ConvexHullExample

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

GEF4-Geometry-Examples-ConvexHullExample.png

CubicCurveDeCasteljauExample

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

GEF4-Geometry-Examples-CubicCurveDeCasteljauExample.png

CubicInterpolationExample

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

GEF4-Geometry-Examples-CubicInterpolationExample.png

CurvedPolygonExample

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

GEF4-Geometry-Examples-CurvedPolygonExample.png

RegionClippingExample

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

GEF4-Geometry-Examples-RegionClippingExample.png

RegionOutlineExample

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

GEF4-Geometry-Examples-RegionOutlineExample.png

RingClippingExample

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

GEF4-Geometry-Examples-RingClippingExample.png

RingOutlineExample

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

GEF4-Geometry-Examples-RingOutlineExample.png

TriangulationExample

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

GEF4-Geometry-Examples-TriangulationExample.png


Intersection

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

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

CubicCurvesIntersection

The CubicCurvesIntersection demonstrates intersection calculation for CubicCurves.

GEF4-Geometry-Examples-CubicCurvesIntersection.png

EllipseCubicCurveIntersection

The EllipseCubicCurveIntersection demonstrates intersection calculation between Ellipse and CubicCurve.

GEF4-Geometry-Examples-EllipseCubicCurveIntersection.png

EllipseEllipseIntersection

The EllipseEllipseIntersection demonstrates intersection calculation between Ellipses.

GEF4-Geometry-Examples-EllipseEllipseIntersection.png

EllipseLineIntersection

The EllipseLineIntersection demonstrates intersection calculation between Ellipse and Line.

GEF4-Geometry-Examples-EllipseLineIntersection.png

EllipsePolygonIntersection

The EllipsePolygonIntersection demonstrates intersection calculation between Ellipse and Polygon.

GEF4-Geometry-Examples-EllipsePolygonIntersection.png

EllipsePolylineIntersection

The EllipsePolylineIntersection demonstrates intersection calculation between Ellipse and Polyline.

GEF4-Geometry-Examples-EllipsePolylineIntersection.png

EllipseQuadraticCurveIntersection

The EllipseQuadraticCurveIntersection demonstrates intersection calculation between Ellipse and QuadraticCurve.

GEF4-Geometry-Examples-EllipseQuadraticCurveIntersection.png

EllipseRectangleIntersection

The EllipseRectangleIntersection demonstrates intersection calculation between Ellipse and Rectangle.

GEF4-Geometry-Examples-EllipseRectangleIntersection.png

PolygonCubicCurveIntersection

The PolygonCubicCurveIntersection demonstrates intersection calculation between Polygon and CubicCurve.

GEF4-Geometry-Examples-PolygonCubicCurveIntersection.png

PolygonEllipseIntersection

The PolygonEllipseIntersection demonstrates intersection calculation between Polygon and Ellipse.

GEF4-Geometry-Examples-PolygonEllipseIntersection.png

PolygonLineIntersection

The PolygonLineIntersection demonstrates intersection calculation between Polygon and Line.

GEF4-Geometry-Examples-PolygonLineIntersection.png

PolygonPolygonIntersection

The PolygonPolygonIntersection demonstrates intersection calculation between Polygons.

GEF4-Geometry-Examples-PolygonPolygonIntersection.png

PolygonPolylineIntersection

The PolygonPolylineIntersection demonstrates intersection calculation between Polygon and Polyline.

GEF4-Geometry-Examples-PolygonPolylineIntersection.png

PolygonQuadraticCurveIntersection

The PolygonQuadraticCurveIntersection demonstrates intersection calculation between Polygon and QuadraticCurve.

GEF4-Geometry-Examples-PolygonQuadraticCurveIntersection.png

PolygonRectangleIntersection

The PolygonRectangleIntersection demonstrates intersection calculation between Polygon and Rectangle.

GEF4-Geometry-Examples-PolygonRectangleIntersection.png

QuadraticCurvesIntersection

The QuadraticCurvesIntersection demonstrates intersection calculation between QuadraticCurves.

GEF4-Geometry-Examples-QuadraticCurvesIntersection.png


Scaling/Rotating

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

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

CubicCurveScaleRotate

The CubicCurveScaleRotate demonstrates rotating/scaling of CubicCurves.

GEF4-Geometry-Examples-CubicCurveScaleRotate.png

PolygonScaleRotate

The PolygonScaleRotate demonstrates rotating/scaling of Polygons.

GEF4-Geometry-Examples-PolygonScaleRotate.png

Back to the top