Class NurbsCurve

    • Constructor Detail

      • NurbsCurve

        public NurbsCurve()
        Initializes a new instance of the NurbsCurve class.
      • NurbsCurve

        public NurbsCurve​(java.lang.String name)
        Initializes a new instance of the NurbsCurve class.
        Parameters:
        name - Name
    • Method Detail

      • getControlPoints

        public java.util.List<Vector4> getControlPoints()
        Gets all control points
      • getMultiplicity

        public java.util.List<java.lang.Integer> getMultiplicity()
        Gets the multiplicity.
      • getOrder

        public int getOrder()
        Gets the order of a NURBS curve, it defines the number of nearby control points that influence any given point on the curve.
      • setOrder

        public void setOrder​(int value)
        Sets the order of a NURBS curve, it defines the number of nearby control points that influence any given point on the curve.
        Parameters:
        value - New value
      • getDimension

        public CurveDimension getDimension()
        Gets the curve's dimension.
      • setDimension

        public void setDimension​(CurveDimension value)
        Sets the curve's dimension.
        Parameters:
        value - New value
      • getCurveType

        public NurbsType getCurveType()
        Gets the type of the curve.
      • setCurveType

        public void setCurveType​(NurbsType value)
        Sets the type of the curve.
        Parameters:
        value - New value
      • getKnotVectors

        public java.util.List<java.lang.Double> getKnotVectors()
        Gets the knot vector, it is a sequence of parameter values that determines where and how the control points affect the NURBS curve.
      • getRational

        public boolean getRational()
        Gets whether it is rational, this value indicates whether this NurbsCurve is rational spline or non-rational spline. Non-rational B-spline is a special case of rational B-splines.
      • setRational

        public void setRational​(boolean value)
        Sets whether it is rational, this value indicates whether this NurbsCurve is rational spline or non-rational spline. Non-rational B-spline is a special case of rational B-splines.
        Parameters:
        value - New value
      • evaluate

        public Vector4[] evaluate​(int steps)
        Evaluate the NURBS curve
        Parameters:
        steps - The evaluation frequency between two neighbor knots, default value is 20
        Returns:
        Points in the curve
      • evaluate

        public Vector4[] evaluate()
        Evaluate the NURBS curve
        Returns:
        Points in the curve
      • evaluateAt

        public Vector4 evaluateAt​(double u)
        Evaluate the curve's point at specified position
        Parameters:
        u - The position in the curve, between 0 and 1