Class ParametricCurve


  • public class ParametricCurve
    extends java.lang.Object
    Interface for parametric curves. A parametric curve, \mathbf{p}(t) \in \mathbb{R}^3 , has its points given as a function of a single parameter, t \in \mathbb{R}.

    Parametric curves have functions for evaluation of points, derivatives and curvature.
    A parmateric curve can be limited, and it is possible to find closest points with a given
    point.
    • Constructor Detail

      • ParametricCurve

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

      • delete

        public void delete()
      • obr

        public OBB obr()
      • CurveEqual

        public boolean CurveEqual​(CurveCPtr curve,
                                  double eps)
      • x

        public Vector3D x​(double t)
        Evaluate a point on the curve.
        Parameters:
        t - [in] the parameter to find point for.
        Returns:
        the vector p \in \mathbb{R}^3 .
      • dx

        public Vector3D dx​(double t)
        Evaluate the derivative in a point on the curve.
        Parameters:
        t - [in] the parameter to find derivative for.
        Returns:
        a derivative vector p \in \mathbb{R}^3 .
      • ddx

        public Vector3D ddx​(double t)
        Evaluate the second derivative in a point on the curve.
        Parameters:
        t - [in] the parameter to find second derivative for.
        Returns:
        a second derivative vector p \in \mathbb{R}^3 .
      • call

        public Vector3D call​(double in)
      • hasLimits

        public boolean hasLimits()
        Check if the curve is limited.
        Returns:
        true if curve is limited, false otherwise.
      • limits

        public pair_d_d limits()
        Get the limits of the curve segment.

        The returned values are only valid when hasLimits() returns true.

        Returns:
        the minimum and maximum parameter values on the curve.
      • inLimits

        public boolean inLimits​(double t)
        Check if the parameter t is inside the limits set for the curve.
        Parameters:
        t - [in] the parameter to check.
        Returns:
        true if inside limits, false otherwise.
      • setLimits

        public void setLimits​(pair_d_d limits)
        Set parameter limits for the curve.
        Parameters:
        limits - [in] the minimum and maximum parameter values on the curve.
      • curvature

        public double curvature​(double t)
        The curvature in a given point on the curve.

        This function does not take the limits into account.

        Parameters:
        t - [in] the parameter to evaluate the curvature for.
        Returns:
        the curvature.
      • closestTimes

        public vector_d closestTimes​(Vector3D p)
        Get the parameter values where the curve is closest to a point p.

        Notice that the limits are taken into account.

        Parameters:
        p - [in] the point to find closest values for.
        Returns:
        a list of parameter values.
      • closestTime

        public double closestTime​(Vector3D p)
        Get the parameter value where the curve is closest to a point p.

        Notice that the limits are taken into account.

        Parameters:
        p - [in] the point to find closest values for.
        Returns:
        the point on the curve closest to p. If multiple points are equally close to
        p, only one of those points are returned.