public class NurbsCurve extends Geometry
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_DIMENSIONAL
Constructor and Description |
---|
NurbsCurve()
Initializes a new instance of the
NurbsCurve class. |
NurbsCurve(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
|
NurbsType |
getCurveType()
Gets the type of the curve.
|
CurveDimension |
getDimension()
Gets the curve's dimension.
|
List<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.
|
List<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. |
addElement, createElement, createElement, createElementUV, createElementUV, getBoundingBox, getCastShadows, getControlPoints, getDeformers, getDeformers2, getElement, getReceiveShadows, getVertexElementOfUV, getVertexElements, getVisible, setCastShadows, setReceiveShadows, setVisible
getExcluded, getParentNode, getParentNodes, setExcluded, setParentNode
findProperty, getName, getProperty, removeProperty, removeProperty, setName, setProperty
public NurbsCurve()
NurbsCurve
class.public NurbsCurve(String name)
NurbsCurve
class.name
- Namepublic 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 List<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