Class S2EdgeUtil.EdgeCrosser

java.lang.Object
com.google.common.geometry.S2EdgeUtil.EdgeCrosser
Enclosing class:
S2EdgeUtil

public static final class S2EdgeUtil.EdgeCrosser extends Object
Used to efficiently test a fixed edge AB against an edge chain. To use it, initialize with the edge AB, and call robustCrossing(S2Point, S2Point) or edgeOrVertexCrossing(S2Point, S2Point) with each edge of the chain.

This class is not thread-safe.

  • Constructor Details

    • EdgeCrosser

      public EdgeCrosser()
      Constructs an uninitialized edge crosser. Invoke init(S2Point, S2Point) before calling the other methods.
    • EdgeCrosser

      public EdgeCrosser(S2Point a, S2Point b)
      Convenience constructor that calls init() with the given fixed edge AB.
    • EdgeCrosser

      public EdgeCrosser(S2Point a, S2Point b, S2Point c)
      AB is the given fixed edge, and C is the first vertex of the vertex chain. Equivalent to using the two-arg constructor and calling restartAt(c).
  • Method Details