Class GeometricOperations_2

java.lang.Object
Jcg.geometry.GeometricOperations_2

@Deprecated public class GeometricOperations_2 extends Object
Deprecated.
refer to class GeometricConstructions_2 and GeometricPredicates_2
Provides implementations of basic geometric predicates and constructions (in 2D)
  • Field Details

  • Constructor Details

    • GeometricOperations_2

      public GeometricOperations_2()
      Deprecated.
  • Method Details

    • circumCenter

      public static Point_2 circumCenter(Point_2 p0, Point_2 p1, Point_2 p2)
      Deprecated.
      Returns the (approximate) circumcenter of input triangle
      Parameters:
      p0 - ,p1,p2 the three vertices of the triangle
    • distanceToSegment

      public static Number distanceToSegment(Point_2 ps, Point_2 pe, Point_2 p)
      Deprecated.
      Returns the distance (non exact computation) of a point to a segment
      Parameters:
      ps - ,pe the start/end of the segment
      p - the query point
      Returns:
      the distance of p to [ps,pe]
    • orientation

      public static int orientation(Point_2 a, Point_2 b, Point_2 c)
      Deprecated.
      Returns the orientation of a, b and c
      Parameters:
      a - ,b,c the 3 points to test
      Returns:
      1 if sequence (a, b, c) turns in counter-clockwise direction, -1 if it turns in clockwise direction, 0 if the points are collinear Test is filtered: if precision bound epsilon is reached, then perform computation with infinite precision arithmetic (using the java.util.BigDecimal class)
    • isCounterClockwise

      public static boolean isCounterClockwise(Point_2 a, Point_2 b, Point_2 c)
      Deprecated.
      Returns true if a, b and c turn in counter-clockwise direction
      Parameters:
      a - ,b,c the 3 points to test
      Returns:
      true if a, b and c turn in counter-clockwise direction Test is filtered: if precision bound epsilon is reached, then perform computation with infinite precision arithmetic (using the java.util.BigDecimal class)
    • collinear

      public static boolean collinear(Point_2 a, Point_2 b, Point_2 c)
      Deprecated.
      Returns true if a, b and c lie on a same line
      Parameters:
      a - ,b,c the 3 points to test
      Returns:
      true if a, b and c are collinear (lie on a same line) Test is filtered: if precision bound epsilon is reached, then perform computation with infinite precision arithmetic (using the java.util.BigDecimal class)
    • inCircle

      public static boolean inCircle(Point_2 p, Point_2 a, Point_2 b, Point_2 c)
      Deprecated.
      Tests if point p lies inside the circumcircle of triangle a,b,c
      Parameters:
      p - point to test
      a - ,b,c triangle
      Returns:
      true/false Test is filtered: if precision bound epsilon is reached, then perform computation with infinite precision arithmetic (using the java.util.BigDecimal class)
    • doIntersect

      public static boolean doIntersect(Segment_2 s, Segment_2 t)
      Deprecated.
      Returns true if segments s and t intersect
      Parameters:
      s - ,t the 2 segments
      Returns:
      true if s,t intersect each other Test is filtered: if precision bound epsilon is reached, then perform computation with infinite precision arithmetic (using the java.util.BigDecimal class)
    • doIntersect

      public static boolean doIntersect(Segment_2 s, Ray_2 r)
      Deprecated.
      Returns true if segment s and ray r intersect
      Parameters:
      s - the segment
      r - the ray
      Returns:
      true if s intersects r Test is not filtered.
    • intersect

      public static Point_2 intersect(Segment_2 s, Segment_2 t)
      Deprecated.
      Returns approximate intersection between segments
      Parameters:
      s - ,t the 2 segments
      Returns:
      approximate intersection point of s,t
    • intersect

      public static Point_2 intersect(Segment_2 s, Ray_2 r)
      Deprecated.
      Returns approximate intersection between segment s and ray r
      Parameters:
      s - the segment
      r - the ray
      Returns:
      the intersection of s and r
    • liesOn

      public static boolean liesOn(Point_2 p, Point_2 a, Point_2 b)
      Deprecated.
      Returns true if point p lies on segment ab
      Parameters:
      a - ,b,p the 3 points
      Returns:
      true if ab contains point p
    • main

      public static void main(String[] args)
      Deprecated.