Package com.aspose.threed
Class NurbsCurve
- java.lang.Object
-
- com.aspose.threed.A3DObject
-
- com.aspose.threed.SceneObject
-
- com.aspose.threed.Entity
-
- com.aspose.threed.Curve
-
- com.aspose.threed.NurbsCurve
-
- All Implemented Interfaces:
INamedObject
public class NurbsCurve extends Curve
NURBS curve is a curve represented by NURBS(Non-uniform rational basis spline), A NURBS curve is defined by itsgetOrder()
, a set of weightedGeometry.getControlPoints()
and agetKnotVectors()
The w component in control point is used as control point's weight, whatever it is aCurveDimension.TWO_DIMENSIONAL
orCurveDimension.THREE_DIMENSIONAL
-
-
Field Summary
-
Fields inherited from class com.aspose.threed.A3DObject
name, properties
-
-
Constructor Summary
Constructors Constructor Description NurbsCurve()
Initializes a new instance of theNurbsCurve
class.NurbsCurve(java.lang.String name)
Initializes a new instance of theNurbsCurve
class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector4[]
evaluate()
Evaluate the NURBS curveVector4[]
evaluate(int steps)
Evaluate the NURBS curveVector4
evaluateAt(double u)
Evaluate the curve's point at specified positionjava.util.List<Vector4>
getControlPoints()
Gets all control pointsNurbsType
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 thisNurbsCurve
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 thisNurbsCurve
is rational spline or non-rational spline.-
Methods inherited from class com.aspose.threed.Curve
getColor, getEntityRendererKey, setColor
-
Methods inherited from class com.aspose.threed.Entity
getBoundingBox, getExcluded, getParentNode, getParentNodes, setExcluded, setParentNode
-
Methods inherited from class com.aspose.threed.SceneObject
getScene
-
Methods inherited from class com.aspose.threed.A3DObject
findProperty, getName, getProperties, getProperty, removeProperty, removeProperty, setName, setProperty
-
-
-
-
Constructor Detail
-
NurbsCurve
public NurbsCurve()
Initializes a new instance of theNurbsCurve
class.
-
NurbsCurve
public NurbsCurve(java.lang.String name)
Initializes a new instance of theNurbsCurve
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 thisNurbsCurve
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 thisNurbsCurve
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
-
-