Class IntrSegment2Circle2f

  • All Implemented Interfaces:
    java.io.Serializable

    public class IntrSegment2Circle2f
    extends java.lang.Object
    implements java.io.Serializable
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static long serialVersionUID  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static int Find​(Vector2f kP, Vector2f kD, Vector2f kC, float fR, float[] afT)
      Intersection of a the line P+t*D and the circle |X-C| = R.
      static int FindIntersection​(Segment2f kSegment, Circle2f kCircle, Vector2f[] akPoint)
      The value is 0 if the objects do not intersect.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IntrSegment2Circle2f

        public IntrSegment2Circle2f()
    • Method Detail

      • FindIntersection

        public static int FindIntersection​(Segment2f kSegment,
                                           Circle2f kCircle,
                                           Vector2f[] akPoint)
        The value is 0 if the objects do not intersect. Otherwise, the quantity is 1 or 2 and is the number of valid points in The points of intersection are returned in the akPoint array which must have length 2.
        Parameters:
        kSegment - DOCUMENT ME!
        kCircle - DOCUMENT ME!
        akPoint - DOCUMENT ME!
        Returns:
        DOCUMENT ME!
      • Find

        private static int Find​(Vector2f kP,
                                Vector2f kD,
                                Vector2f kC,
                                float fR,
                                float[] afT)
        Intersection of a the line P+t*D and the circle |X-C| = R. The t value is a root to the quadratic equation: 0 = |t*D+P-C|^2 - R^2 = |D|^2*t^2 + 2*D.Dot(P-C)*t + |P-C|^2-R^2 = a2*t^2 + 2*a1*t + a0 If two roots are returned, the order is T[0]
        Parameters:
        kP - DOCUMENT ME!
        kD - DOCUMENT ME!
        kC - DOCUMENT ME!
        fR - DOCUMENT ME!
        afT - DOCUMENT ME!
        Returns:
        DOCUMENT ME!