Package com.google.common.geometry
Class S2Loop.IntersectsRelation
- java.lang.Object
-
- com.google.common.geometry.S2Loop.IntersectsRelation
-
- All Implemented Interfaces:
S2Loop.LoopRelation
- Enclosing class:
- S2Loop
private static final class S2Loop.IntersectsRelation extends java.lang.Object implements S2Loop.LoopRelation
Loop relation for intersects().
-
-
Field Summary
Fields Modifier and Type Field Description private booleanfoundSharedVertex
-
Constructor Summary
Constructors Modifier Constructor Description privateIntersectsRelation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intaCrossingTarget()If A.contains(P) == false && B.contains(P) == true, it is equivalent to having an edge crossing (i.e., intersects() returns true).intbCrossingTarget()booleanfoundSharedVertex()booleanwedgesCross(S2Point a0, S2Point ab1, S2Point a2, S2Point b0, S2Point b2)Given a vertexab1that is shared between the two loops, returns true if the two associated wedges (a0, ab1, b2) and (b0, ab1, b2) are equivalent to an edge crossing.
-
-
-
Method Detail
-
foundSharedVertex
public boolean foundSharedVertex()
-
aCrossingTarget
public int aCrossingTarget()
If A.contains(P) == false && B.contains(P) == true, it is equivalent to having an edge crossing (i.e., intersects() returns true).- Specified by:
aCrossingTargetin interfaceS2Loop.LoopRelation
-
bCrossingTarget
public int bCrossingTarget()
- Specified by:
bCrossingTargetin interfaceS2Loop.LoopRelation
-
wedgesCross
public boolean wedgesCross(S2Point a0, S2Point ab1, S2Point a2, S2Point b0, S2Point b2)
Description copied from interface:S2Loop.LoopRelationGiven a vertexab1that is shared between the two loops, returns true if the two associated wedges (a0, ab1, b2) and (b0, ab1, b2) are equivalent to an edge crossing. The loop relation is also allowed to maintain its own internal state, and can return true if it observes any sequence of wedges that are equivalent to an edge crossing.- Specified by:
wedgesCrossin interfaceS2Loop.LoopRelation
-
-