Package snap.geom

Class SegHit

java.lang.Object
snap.geom.SegHit

public class SegHit extends Object
A class to represent hit information for Segment intersections.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    double
     
    double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    SegHit(double aH0, double aH1)
    Create a new SegHit for given hits.
  • Method Summary

    Modifier and Type
    Method
    Description
    static SegHit
    getHitCubicCubic(double x0, double y0, double cp0x, double cp0y, double cp1x, double cp1y, double x1, double y1, double px0, double py0, double pxc0, double pyc0, double pxc1, double pyc1, double px1, double py1)
    Returns whether Cubic for given points is intersected by Quad with given points.
    static SegHit
    getHitCubicLine(double x0, double y0, double xc0, double yc0, double xc1, double yc1, double x1, double y1, double px0, double py0, double px1, double py1)
    Returns hit for given cubic and line points.
    static SegHit
    getHitCubicQuad(double x0, double y0, double xc0, double yc0, double xc1, double yc1, double x1, double y1, double px0, double py0, double pxc0, double pyc0, double px1, double py1)
    Returns hit for given cubic and quad points.
    static SegHit
    getHitLineCubic(double x0, double y0, double x1, double y1, double cx0, double cy0, double cp0x, double cp0y, double cp1x, double cp1y, double cx1, double cy1)
    Returns hit for given line and cubic points.
    static SegHit
    getHitLineLine(double x0, double y0, double x1, double y1, double px0, double py0, double px1, double py1)
    Returns whether line for given points is intersected by second line with given points.
    static SegHit
    getHitLineQuad(double x0, double y0, double x1, double y1, double qx0, double qy0, double cpx, double cpy, double qx1, double qy1)
    Returns hit for given line and quad points.
    static SegHit
    getHitQuadCubic(double x0, double y0, double cpx, double cpy, double x1, double y1, double px0, double py0, double pcp0x, double pcp0y, double pcp1x, double pcp1y, double px1, double py1)
    Returns hit for given quad and cubic points.
    static SegHit
    getHitQuadLine(double x0, double y0, double cpx, double cpy, double x1, double y1, double px0, double py0, double px1, double py1)
    Returns hit for given quad and line points.
    static SegHit
    getHitQuadQuad(double x0, double y0, double xc0, double yc0, double x1, double y1, double px0, double py0, double pxc0, double pyc0, double px1, double py1)
    Returns hit for given quad and quad points.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • h0

      public double h0
    • h1

      public double h1
  • Constructor Details

    • SegHit

      public SegHit(double aH0, double aH1)
      Create a new SegHit for given hits.
  • Method Details

    • getHitLineLine

      public static SegHit getHitLineLine(double x0, double y0, double x1, double y1, double px0, double py0, double px1, double py1)
      Returns whether line for given points is intersected by second line with given points.
    • getHitLineQuad

      public static SegHit getHitLineQuad(double x0, double y0, double x1, double y1, double qx0, double qy0, double cpx, double cpy, double qx1, double qy1)
      Returns hit for given line and quad points.
    • getHitLineCubic

      public static SegHit getHitLineCubic(double x0, double y0, double x1, double y1, double cx0, double cy0, double cp0x, double cp0y, double cp1x, double cp1y, double cx1, double cy1)
      Returns hit for given line and cubic points.
    • getHitQuadLine

      public static SegHit getHitQuadLine(double x0, double y0, double cpx, double cpy, double x1, double y1, double px0, double py0, double px1, double py1)
      Returns hit for given quad and line points.
    • getHitQuadQuad

      public static SegHit getHitQuadQuad(double x0, double y0, double xc0, double yc0, double x1, double y1, double px0, double py0, double pxc0, double pyc0, double px1, double py1)
      Returns hit for given quad and quad points.
    • getHitQuadCubic

      public static SegHit getHitQuadCubic(double x0, double y0, double cpx, double cpy, double x1, double y1, double px0, double py0, double pcp0x, double pcp0y, double pcp1x, double pcp1y, double px1, double py1)
      Returns hit for given quad and cubic points.
    • getHitCubicLine

      public static SegHit getHitCubicLine(double x0, double y0, double xc0, double yc0, double xc1, double yc1, double x1, double y1, double px0, double py0, double px1, double py1)
      Returns hit for given cubic and line points.
    • getHitCubicQuad

      public static SegHit getHitCubicQuad(double x0, double y0, double xc0, double yc0, double xc1, double yc1, double x1, double y1, double px0, double py0, double pxc0, double pyc0, double px1, double py1)
      Returns hit for given cubic and quad points.
    • getHitCubicCubic

      public static SegHit getHitCubicCubic(double x0, double y0, double cp0x, double cp0y, double cp1x, double cp1y, double x1, double y1, double px0, double py0, double pxc0, double pyc0, double pxc1, double pyc1, double px1, double py1)
      Returns whether Cubic for given points is intersected by Quad with given points.