test_class.file: display/renderbasic/src/test/java/org/openscience/cdk/renderer/generators/standard/ConvexHullTest.java
test_class.identifier: ConvexHullTest
test_case.body: @Test
      public void testPointsOf() throws Exception {
          Rectangle2D rect = new Rectangle2D.Double(-5, -5, 10, 10);
          List<Point2D> points = ConvexHull.pointsOf(rect);
          assertThat(points.size(), is(4));
          assertThat(points.get(0).getX(), closeTo(-5, 0.01));
          assertThat(points.get(0).getY(), closeTo(-5, 0.01));
          assertThat(points.get(1).getX(), closeTo(5, 0.01));
          assertThat(points.get(1).getY(), closeTo(-5, 0.01));
          assertThat(points.get(2).getX(), closeTo(5, 0.01));
          assertThat(points.get(2).getY(), closeTo(5, 0.01));
          assertThat(points.get(3).getX(), closeTo(-5, 0.01));
          assertThat(points.get(3).getY(), closeTo(5, 0.01));
      }
test_case.class_method_signature: ConvexHullTest.testPointsOf()
test_case.full_signature: @Test public void testPointsOf()
test_case.identifier: testPointsOf
test_case.invocations: pointsOf assertThat size is assertThat getX get closeTo assertThat getY get closeTo assertThat getX get closeTo assertThat getY get closeTo assertThat getX get closeTo assertThat getY get closeTo assertThat getX get closeTo assertThat getY get closeTo
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testPointsOf()
focal_class.declarator: hull
focal_class.modifier: private final
focal_class.original_string: private final Shape hull;
focal_class.type: Shape
focal_class.var_name: hull
focal_class.file: display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/ConvexHull.java
focal_class.identifier: ConvexHull
focal_class.class_method_signature: ConvexHull.ConvexHull(final Shape hull)
focal_class.full_signature: private  ConvexHull(final Shape hull)
focal_class.identifier: ConvexHull
focal_class.modifiers: private
focal_class.parameters: (final Shape hull)
focal_class.signature:  ConvexHull(final Shape hull)
focal_class.class_method_signature: ConvexHull.ofShape(final Shape shape)
focal_class.full_signature: public static ConvexHull ofShape(final Shape shape)
focal_class.identifier: ofShape
focal_class.modifiers: public static
focal_class.parameters: (final Shape shape)
focal_class.return: ConvexHull
focal_class.signature: ConvexHull ofShape(final Shape shape)
focal_class.class_method_signature: ConvexHull.ofShapes(final List<Shape> shapes)
focal_class.full_signature: public static ConvexHull ofShapes(final List<Shape> shapes)
focal_class.identifier: ofShapes
focal_class.modifiers: public static
focal_class.parameters: (final List<Shape> shapes)
focal_class.return: ConvexHull
focal_class.signature: ConvexHull ofShapes(final List<Shape> shapes)
focal_class.class_method_signature: ConvexHull.outline()
focal_class.full_signature:  Shape outline()
focal_class.identifier: outline
focal_class.parameters: ()
focal_class.return: Shape
focal_class.signature: Shape outline()
focal_class.class_method_signature: ConvexHull.transform(final AffineTransform transform)
focal_class.full_signature:  ConvexHull transform(final AffineTransform transform)
focal_class.identifier: transform
focal_class.parameters: (final AffineTransform transform)
focal_class.return: ConvexHull
focal_class.signature: ConvexHull transform(final AffineTransform transform)
focal_class.class_method_signature: ConvexHull.shapeOf(List<Point2D> points)
focal_class.full_signature: static Shape shapeOf(List<Point2D> points)
focal_class.identifier: shapeOf
focal_class.modifiers: static
focal_class.parameters: (List<Point2D> points)
focal_class.return: Shape
focal_class.signature: Shape shapeOf(List<Point2D> points)
focal_class.class_method_signature: ConvexHull.pointsOf(final Shape shape)
focal_class.full_signature: static List<Point2D> pointsOf(final Shape shape)
focal_class.identifier: pointsOf
focal_class.modifiers: static
focal_class.parameters: (final Shape shape)
focal_class.return: List<Point2D>
focal_class.signature: List<Point2D> pointsOf(final Shape shape)
focal_class.class_method_signature: ConvexHull.grahamScan(final List<Point2D> points)
focal_class.full_signature: static List<Point2D> grahamScan(final List<Point2D> points)
focal_class.identifier: grahamScan
focal_class.modifiers: static
focal_class.parameters: (final List<Point2D> points)
focal_class.return: List<Point2D>
focal_class.signature: List<Point2D> grahamScan(final List<Point2D> points)
focal_class.class_method_signature: ConvexHull.intersect(List<Point2D> outline, Line2D line)
focal_class.full_signature: private Point2D intersect(List<Point2D> outline, Line2D line)
focal_class.identifier: intersect
focal_class.modifiers: private
focal_class.parameters: (List<Point2D> outline, Line2D line)
focal_class.return: Point2D
focal_class.signature: Point2D intersect(List<Point2D> outline, Line2D line)
focal_class.class_method_signature: ConvexHull.intersect(Point2D a, Point2D b)
focal_class.full_signature:  Point2D intersect(Point2D a, Point2D b)
focal_class.identifier: intersect
focal_class.parameters: (Point2D a, Point2D b)
focal_class.return: Point2D
focal_class.signature: Point2D intersect(Point2D a, Point2D b)
focal_class.class_method_signature: ConvexHull.lineLineIntersect(final Line2D lineA, final Line2D lineB)
focal_class.full_signature: public static Point2D lineLineIntersect(final Line2D lineA, final Line2D lineB)
focal_class.identifier: lineLineIntersect
focal_class.modifiers: public static
focal_class.parameters: (final Line2D lineA, final Line2D lineB)
focal_class.return: Point2D
focal_class.signature: Point2D lineLineIntersect(final Line2D lineA, final Line2D lineB)
focal_class.class_method_signature: ConvexHull.lineLineIntersect(final double x1, final double y1, final double x2, final double y2,
              final double x3, final double y3, final double x4, final double y4)
focal_class.full_signature: static Point2D lineLineIntersect(final double x1, final double y1, final double x2, final double y2,
              final double x3, final double y3, final double x4, final double y4)
focal_class.identifier: lineLineIntersect
focal_class.modifiers: static
focal_class.parameters: (final double x1, final double y1, final double x2, final double y2,
              final double x3, final double y3, final double x4, final double y4)
focal_class.return: Point2D
focal_class.signature: Point2D lineLineIntersect(final double x1, final double y1, final double x2, final double y2,
              final double x3, final double y3, final double x4, final double y4)
focal_class.class_method_signature: ConvexHull.isLeftTurn(Point2D a, Point2D b, Point2D c)
focal_class.full_signature: private static boolean isLeftTurn(Point2D a, Point2D b, Point2D c)
focal_class.identifier: isLeftTurn
focal_class.modifiers: private static
focal_class.parameters: (Point2D a, Point2D b, Point2D c)
focal_class.return: boolean
focal_class.signature: boolean isLeftTurn(Point2D a, Point2D b, Point2D c)
focal_class.class_method_signature: ConvexHull.winding(Point2D a, Point2D b, Point2D c)
focal_class.full_signature: private static int winding(Point2D a, Point2D b, Point2D c)
focal_class.identifier: winding
focal_class.modifiers: private static
focal_class.parameters: (Point2D a, Point2D b, Point2D c)
focal_class.return: int
focal_class.signature: int winding(Point2D a, Point2D b, Point2D c)
focal_method.body: static List<Point2D> pointsOf(final Shape shape) {
          final List<Point2D> points = new ArrayList<Point2D>();
          final double[] coordinates = new double[6];
          for (PathIterator i = shape.getPathIterator(null); !i.isDone(); i.next()) {
              switch (i.currentSegment(coordinates)) {
                  case PathIterator.SEG_CLOSE:
                      break;
                  case PathIterator.SEG_MOVETO:
                  case PathIterator.SEG_LINETO:
                      points.add(new Point2D.Double(coordinates[0], coordinates[1]));
                      break;
                  case PathIterator.SEG_QUADTO:
                      points.add(new Point2D.Double(coordinates[0], coordinates[1]));
                      points.add(new Point2D.Double(coordinates[2], coordinates[3]));
                      break;
                  case PathIterator.SEG_CUBICTO:
                      points.add(new Point2D.Double(coordinates[0], coordinates[1]));
                      points.add(new Point2D.Double(coordinates[2], coordinates[3]));
                      points.add(new Point2D.Double(coordinates[4], coordinates[5]));
                      break;
              }
          }
  
          if (!points.isEmpty() && points.get(points.size() - 1).equals(points.get(0))) {
              points.remove(points.size() - 1);
          }
          return points;
      }
focal_method.class_method_signature: ConvexHull.pointsOf(final Shape shape)
focal_method.full_signature: static List<Point2D> pointsOf(final Shape shape)
focal_method.identifier: pointsOf
focal_method.invocations: getPathIterator isDone next currentSegment add add add add add add isEmpty equals get size get remove size
focal_method.modifiers: static
focal_method.parameters: (final Shape shape)
focal_method.return: List<Point2D>
focal_method.signature: List<Point2D> pointsOf(final Shape shape)