NurbsCurve

NurbsCurve class

NURBS curve is a curve represented by NURBS(Non-uniform rational basis spline), A NURBS curve is defined by its Order, a set of weighted Geometry.ControlPoints and a KnotVectors The w component in control point is used as control point’s weight, whatever it is a CurveDimension.TWO_DIMENSIONAL or CurveDimension.THREE_DIMENSIONAL

Methods

constructor

NameDescription
constructor()Initializes a new instance of the NurbsCurve class.

Result:


constructor_overload

NameDescription
constructor_overload(name)Initializes a new instance of the NurbsCurve class.

Parameters:

NameTypeDescription
nameStringName

Result:


getControlPoints

NameDescription
getControlPoints()Gets all control points

Result:


getMultiplicity

NameDescription
getMultiplicity()Gets the multiplicity. The multiplicity.

Result:


getOrder

NameDescription
getOrder()Gets or sets the order of a NURBS curve, it defines the number of nearby control points that influence any given point on the curve. The order.

Result:


setOrder

NameDescription
setOrder(value)Gets or sets the order of a NURBS curve, it defines the number of nearby control points that influence any given point on the curve. The order.

Result:


getDimension

NameDescription
getDimension()Gets or sets the curve’s dimension. The value of the property is CurveDimension integer constant. For a CurveDimension.TWO_DIMENSIONAL curve, the z component in control point is unused.

Result:


setDimension

NameDescription
setDimension(value)Gets or sets the curve’s dimension. The value of the property is CurveDimension integer constant. For a CurveDimension.TWO_DIMENSIONAL curve, the z component in control point is unused.

Result:


getCurveType

NameDescription
getCurveType()Gets or sets the type of the curve. The value of the property is NurbsType integer constant.The type of the curve.

Result:


setCurveType

NameDescription
setCurveType(value)Gets or sets the type of the curve. The value of the property is NurbsType integer constant.The type of the curve.

Result:


getKnotVectors

NameDescription
getKnotVectors()Gets the knot vector, it is a sequence of parameter values that determines where and how the control points affect the NURBS curve.

Result:


getRational

NameDescription
getRational()Gets or 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. true if it’s rational spline; otherwise, false is a non-rational spline.

Result:


setRational

NameDescription
setRational(value)Gets or 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. true if it’s rational spline; otherwise, false is a non-rational spline.

Result:


getColor

NameDescription
getColor()Gets or sets the color of the line, default value is white(1, 1, 1)

Result:


setColor

NameDescription
setColor(value)Gets or sets the color of the line, default value is white(1, 1, 1)

Result:


getParentNodes

NameDescription
getParentNodes()Gets all parent nodes, an entity can be attached to multiple parent nodes for geometry instancing The nodes.

Result:


getExcluded

NameDescription
getExcluded()Gets or sets whether to exclude this entity during exporting.

Result:


setExcluded

NameDescription
setExcluded(value)Gets or sets whether to exclude this entity during exporting.

Result:


getParentNode

NameDescription
getParentNode()Gets or sets the first parent node, if set the first parent node, this entity will be detached from other parent nodes. The parent node.

Result:


setParentNode

NameDescription
setParentNode(value)Gets or sets the first parent node, if set the first parent node, this entity will be detached from other parent nodes. The parent node.

Result:


getScene

NameDescription
getScene()Gets the scene that this object belongs to

Result:


getName

NameDescription
getName()Gets or sets the name. The name.

Result:


setName

NameDescription
setName(value)Gets or sets the name. The name.

Result:


getProperties

NameDescription
getProperties()Gets the collection of all properties.

Result:


evaluate

NameDescription
evaluate(steps)Evaluate the NURBS curve

Parameters:

NameTypeDescription
stepsNumberThe evaluation frequency between two neighbor knots, default value is 20

Result: Vector4[]


evaluateAt

NameDescription
evaluateAt(u)Evaluate the curve’s point at specified position

Parameters:

NameTypeDescription
uNumberThe position in the curve, between 0 and 1

Result: Vector4


getEntityRendererKey

NameDescription
getEntityRendererKey()Gets the key of the entity renderer registered in the renderer

Result: EntityRendererKey


getBoundingBox

NameDescription
getBoundingBox()Gets the bounding box of current entity in its object space coordinate system.

Result: EntityRendererKey


removeProperty

NameDescription
removeProperty(property)Removes a dynamic property.

Parameters:

NameTypeDescription
propertyPropertyWhich property to remove

Result: boolean


removeProperty

NameDescription
removeProperty(property)Remove the specified property identified by name

Parameters:

NameTypeDescription
propertStringnull

Result: boolean


getProperty

NameDescription
getProperty(property)Get the value of specified property

Parameters:

NameTypeDescription
propertyStringProperty name

Result: Object


setProperty

NameDescription
setProperty(property, value)Sets the value of specified property

Parameters:

NameTypeDescription
propertyStringProperty name
valueObjectThe value of the property

Result: Object


findProperty

NameDescription
findProperty(propertyName)Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)

Parameters:

NameTypeDescription
propertyNameStringProperty name.

Result: Property