Class QuadraticUtil


  • public class QuadraticUtil
    extends java.lang.Object
    Utility functions for operations on quadratic surfaces and curves.

    Functions are provided to find approximate closest points between different combinations of
    quadratics surfaces and curves.
    • Constructor Detail

      • QuadraticUtil

        public QuadraticUtil​(long cPtr,
                             boolean cMemoryOwn)
    • Method Detail

      • delete

        public void delete()
      • closestPointsApproximation

        public static boolean closestPointsApproximation​(QuadraticSurface s1,
                                                         QuadraticSurface s2,
                                                         SWIGTYPE_p_std__pairT_rw__math__Vector3DT_double_t_rw__math__Vector3DT_double_t_t result,
                                                         double epsIn,
                                                         double epsOut)
        Find and approximation of the closest points between two surfaces s1 and s2.

        The approximation is valid when the distance is small.
        Only closest points within the trimming regions will give a result.

        Parameters:
        s1 - [in] the first surface.
        s2 - [in] the second surface.
        result - [out] the result (only valid if the function returns true).
        epsIn - [in] threshold for penetration depth.
        epsOut - [in] threshold for distance.
        Returns:
        true if there is a closest point pair within the given limits.
      • closestPointsApproximation

        public static boolean closestPointsApproximation​(QuadraticSurface s,
                                                         QuadraticCurve c,
                                                         SWIGTYPE_p_std__pairT_rw__math__Vector3DT_double_t_rw__math__Vector3DT_double_t_t result,
                                                         double epsIn,
                                                         double epsOut)
        Find and approximation of the closest points between a surface s and a curve
        c.

        The approximation is valid when the distance is small.
        Only closest points within the trimming region of surface s and within the limits of
        curve c will give a result.

        Parameters:
        s - [in] the surface.
        c - [in] the curve.
        result - [out] the result (only valid if the function returns true).
        epsIn - [in] threshold for penetration depth.
        epsOut - [in] threshold for distance.
        Returns:
        true if there is a closest point pair within the given limits.
      • closestTimesApproximation

        public static VectorPair_d_d closestTimesApproximation​(QuadraticSurface sa1,
                                                               QuadraticSurface sa2,
                                                               QuadraticCurve ca,
                                                               QuadraticCurve cb)
        Find an approximation of the curve parameter values of curves ca and cb at
        the closest points.

        The approximation is valid when the distance is small.
        Only closest points within the limits of both curves will give a result.

        Parameters:
        sa1 - [in] one of the surfaces the first curve ca is lying on.
        sa2 - [in] the other surface the first curve ca is lying on.
        ca - [in] the first curve.
        cb - [in] the second curve.
        Returns:
        a list of pairs of curve parameter values at the closest points.