public class NurbsCurve extends Curve
getOrder(), a set of weighted Geometry.getControlPoints() and a getKnotVectors()
The w component in control point is used as control point's weight, whatever it is a CurveDimension.TWO_DIMENSIONAL or CurveDimension.THREE_DIMENSIONALname, properties| Constructor and Description |
|---|
NurbsCurve()
Initializes a new instance of the
NurbsCurve class. |
NurbsCurve(java.lang.String name)
Initializes a new instance of the
NurbsCurve class. |
| Modifier and Type | Method and Description |
|---|---|
Vector4[] |
evaluate()
Evaluate the NURBS curve
|
Vector4[] |
evaluate(int steps)
Evaluate the NURBS curve
|
Vector4 |
evaluateAt(double u)
Evaluate the curve's point at specified position
|
java.util.List<Vector4> |
getControlPoints()
Gets all control points
|
NurbsType |
getCurveType()
Gets the type of the curve.
|
CurveDimension |
getDimension()
Gets the curve's dimension.
|
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.
|
java.util.List<java.lang.Integer> |
getMultiplicity()
Gets the multiplicity.
|
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.
|
boolean |
getRational()
Gets whether it is rational, this value indicates whether this
NurbsCurve is rational spline or non-rational spline. |
void |
setCurveType(NurbsType value)
Sets the type of the curve.
|
void |
setDimension(CurveDimension value)
Sets the curve's dimension.
|
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.
|
void |
setRational(boolean value)
Sets whether it is rational, this value indicates whether this
NurbsCurve is rational spline or non-rational spline. |
getColor, getEntityRendererKey, setColorgetBoundingBox, getExcluded, getParentNode, getParentNodes, setExcluded, setParentNodegetScenefindProperty, getName, getProperties, getProperty, removeProperty, removeProperty, setName, setPropertypublic NurbsCurve()
NurbsCurve class.public NurbsCurve(java.lang.String name)
NurbsCurve class.name - Namepublic java.util.List<Vector4> getControlPoints()
public java.util.List<java.lang.Integer> getMultiplicity()
public int getOrder()
public void setOrder(int value)
value - New valuepublic CurveDimension getDimension()
public void setDimension(CurveDimension value)
value - New valuepublic NurbsType getCurveType()
public void setCurveType(NurbsType value)
value - New valuepublic java.util.List<java.lang.Double> getKnotVectors()
public boolean getRational()
NurbsCurve is rational spline or non-rational spline.
Non-rational B-spline is a special case of rational B-splines.public void setRational(boolean value)
NurbsCurve is rational spline or non-rational spline.
Non-rational B-spline is a special case of rational B-splines.value - New valuepublic Vector4[] evaluate(int steps)
steps - The evaluation frequency between two neighbor knots, default value is 20public Vector4[] evaluate()
public Vector4 evaluateAt(double u)
u - The position in the curve, between 0 and 1