Module org.dyn4j

Class SegmentDetector


  • public final class SegmentDetector
    extends Object
    Class devoted to improving performance of Segment detection queries.
    Since:
    2.0.0
    Version:
    3.4.0
    Author:
    William Bittle
    • 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