Class IntrSegment3Sphere3f

  • All Implemented Interfaces:
    java.io.Serializable

    public class IntrSegment3Sphere3f
    extends Intersector
    implements java.io.Serializable
    See Also:
    Serialized Form
    • Field Detail

      • ZeroThreshold

        public float ZeroThreshold
        default = Mathf::ZERO_TOLERANCE
      • m_rkSegment

        private Segment3f m_rkSegment
        the objects to intersect: Segment
      • m_rkSphere

        private Sphere3f m_rkSphere
        the objects to intersect: Sphere
      • m_iQuantity

        private int m_iQuantity
        information about the intersection set: number of intersections
      • m_akPoint

        private Vector3f[] m_akPoint
        information about the intersection set: intersection points
      • m_afSegmentT

        private float[] m_afSegmentT
        information about the intersection set: line equation T-values of intersections
    • Constructor Detail

      • IntrSegment3Sphere3f

        public IntrSegment3Sphere3f​(Segment3f rkSegment,
                                    Sphere3f rkSphere)
        Creates an IntrSegment3Sphere3f object
        Parameters:
        rkSegment - the segment to intersect with the sphere
        rkSphere - the Sphere to intersect with the segment
    • Method Detail

      • dispose

        public void dispose()
        delete memory
      • Find

        public boolean Find()
        find-intersection query
        Overrides:
        Find in class Intersector
        Returns:
        true if the segment and sphere intersect, false otherwise
      • GetPoint

        public final Vector3f GetPoint​(int i)
        Returns the ith intersection point
        Parameters:
        i - the ith intersection
        Returns:
        the ith intersection point
      • GetQuantity

        public final int GetQuantity()
        Returns the number of intersections
        Returns:
        the number of intersections
      • GetSegment

        public final Segment3f GetSegment()
        object access
        Returns:
        the current segment
      • GetSegmentT

        public final float GetSegmentT​(int i)
        Returns the ith intersection point segment parameter t
        Parameters:
        i - the ith intersection
        Returns:
        the ith intersection point segment parameter t
      • GetSphere

        public final Sphere3f GetSphere()
        object access
        Returns:
        the current sphere
      • Test

        public boolean Test()
        test-intersection query
        Overrides:
        Test in class Intersector
        Returns:
        true if the segment and sphere intersect, false otherwise