Class CurveCPtr


  • public class CurveCPtr
    extends java.lang.Object
    Ptr stores a pointer and optionally takes ownership of the value.
    • Constructor Detail

      • CurveCPtr

        public CurveCPtr​(long cPtr,
                         boolean cMemoryOwn)
      • CurveCPtr

        public CurveCPtr()
        Default constructor yielding a NULL-pointer.
      • CurveCPtr

        public CurveCPtr​(Curve ptr)
        Do not take ownership of ptr.

        ptr can be null.

        The constructor is implicit on purpose.
    • Method Detail

      • getCPtr

        public static long getCPtr​(CurveCPtr obj)
      • delete

        public void delete()
      • deref

        public Curve deref()
        The pointer stored in the object.
      • __ref__

        public Curve __ref__()
        Dereferencing operator.
      • getDeref

        public Curve getDeref()
        Member access operator.
      • equals

        public boolean equals​(Curve p)
      • isShared

        public boolean isShared()
        check if this Ptr has shared ownership or none
        ownership
        Returns:
        true if Ptr has shared ownership, false if it has no ownership.
      • isNull

        public boolean isNull()
        checks if the pointer is null
        Returns:
        Returns true if the pointer is null
      • transform

        public CurvePtr transform​(Transform3D T)
        Transform curve.
        Parameters:
        T - [in] transformation of curve.
        Returns:
        a new transformed curve.
      • transform

        public CurvePtr transform​(Vector3D P)
        Transform curve.
        Parameters:
        P - [in] positional offset.
        Returns:
        a new transformed curve.
      • scale

        public CurvePtr scale​(double factor)
        Get a scaled version of the curve.
        Parameters:
        factor - [in] the factor to scale with.
        Returns:
        a new scaled curve.
      • reverse

        public CurvePtr reverse()
        Make a curve where time variable runs in opposite direction.
        Returns:
        reversed curve.
      • clone

        public CurvePtr clone()
        Make a copy of the curve.
        Returns:
        a new copy of the curve.
      • extremums

        public pair_d_d extremums​(Vector3D dir)
        Get extremums of curve in given direction.

        Notice that the limits are taken into account.

        Parameters:
        dir - [in] direction to get extremums for.
        Returns:
        the minimum and maximum value of the curve in the given direction.
      • discretizeAdaptive

        public SWIGTYPE_p_std__listT_rw__math__Vector3DT_double_t_t discretizeAdaptive​(double stepsPerRevolution)
        Make a discretization of the curve.

        The curve must be limited. The discretization is based on the curvature, such
        that the sampling starts at maximum curvature points (or in limits). The step
        size to the next point is based on the curvature in the current point.

        A line will always give to points, regardless of the chosen number of steps per
        revolution.

        Parameters:
        stepsPerRevolution - [in] the number of points to sample if the curve is a perfect
        circle.
        Returns:
        a list of points on the curve.
      • obr

        public OBB obr()
        Bounding rectangle of curve.

        The curve must be limited.

        Returns:
        the bounding rectangle.
      • CurveEqual

        public boolean CurveEqual​(CurveCPtr curve,
                                  double eps)
        Check if this curve is equal to another curve.
        Parameters:
        curve - [in] other curve.
        eps - [in] distance threshold.
        Returns:
        true if curves are identical, false otherwise.