Module org.dyn4j

Class SegmentDetector


  • public final class SegmentDetector
    extends java.lang.Object
    Class devoted to improving performance of Segment detection queries.
    Since:
    2.0.0
    Version:
    3.4.0
    Author:
    William Bittle
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean raycast​(Ray ray, double maxLength, Segment segment, Transform transform, Raycast raycast)
      Performs a ray cast against the given segment.
      • Methods inherited from class java.lang.Object

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

      • raycast

        public static boolean raycast​(Ray ray,
                                      double maxLength,
                                      Segment segment,
                                      Transform transform,
                                      Raycast raycast)
        Performs a ray cast against the given segment.
        Parameters:
        ray - the Ray
        maxLength - the maximum ray length
        segment - the Segment
        transform - the Segment's Transform
        raycast - the Raycast result
        Returns:
        boolean true if the ray intersects the segment
        Since:
        2.0.0