Curve (struct)

A Curve is an accessor for a Curves‘s sub-curve at a specific index. It is equivalent to a <Curves, curveIndex> pair. See Curves for more information.

注釈

The Curve holds an owner reference to its Curves object, so it is garanteed that the associated Curves won’t be destroyed while one of many Curve refer to it.

注釈

For any two Curve are part of the same Curves container, methods that read Curve parameters, get or set their attributes are thread safe. Methods that modify the curve set or their topology (eg: Curve.addPoints) are not thread safe.

Curve Curve Curve

Members

Curves curves  
UInt32 curveIndex  

Methods

  Curve ( in Curve other )
  Curve ( in Ref<Curves> curves, in UInt32 curveIndex )
  Curve ()
Curve clone ? ()
  copyFrom ! ( in Curve sourceCurve, in Boolean createMissingSourceAttributes )
Curves createCurvesContainerIfNone ! ()
  endStructureChanges ! ()
Ref<GeometryAttributes> getAttributes ? ()
Vec3 getCurvatureAtNormalizedParam ? ( in Float32 normalizedParam )
Vec3 getCurvatureAtParam ? ( in Float32 param )
UInt32 getCurveIndex ? ()
UInt8 getCurveType ? ()
String getCurveTypeString ? ()
Ref<Curves> getCurves ? ()
UInt8 getDegree ? ()
Vec3 getDerivativeAtNormalizedParam ? ( in Float32 normalizedParam )
Vec3 getDerivativeAtParam ? ( in Float32 param )
  getDerivativesAtNormalizedParam ? ( in Float32 normalizedParam, io Vec3 dU, io Vec3 dUU )
  getDerivativesAtParam ? ( in Float32 param, io Vec3 dU, io Vec3 dUU )
Vec2 getDomain ? ()
Vec3 getNormalAtNormalizedParam ? ( in Float32 normalizedParam )
Vec3 getNormalAtParam ? ( in Float32 param )
UInt8 getOrder ? ()
  getPointIndicesAndWeightsAtNormalizedParam ? ( in Float32 normalizedParam, io LocalL8UInt32Array pointIndices, io LocalL8ScalarArray pointWeights )
  getPointIndicesAndWeightsAtNormalizedParam ? ( in Float32 normalizedParam, io LocalL8UInt32Array pointIndices, io LocalL8ScalarArray pointWeights, io LocalL8ScalarArray derivativePointWeights )
  getPointIndicesAndWeightsAtParam ? ( in Float32 param, io LocalL8UInt32Array pointIndices, io LocalL8ScalarArray pointWeights )
  getPointIndicesAndWeightsAtParam ? ( in Float32 param, io LocalL8UInt32Array pointIndices, io LocalL8ScalarArray pointWeights, io LocalL8ScalarArray derivativePointWeights )
Vec3 getPositionAtNormalizedParam ? ( in Float32 normalizedParam )
Vec3_d getPositionAtNormalizedParam_d ? ( in Float32 normalizedParam )
Vec3 getPositionAtParam ? ( in Float32 param )
Vec3_d getPositionAtParam_d ? ( in Float32 param )
  getTangentAndCurvatureAtNormalizedParam ? ( in Float32 normalizedParam, io Vec3 tangent, io Vec3 curvature )
  getTangentAndCurvatureAtParam ? ( in Float32 param, io Vec3 tangent, io Vec3 curvature )
Vec3 getTangentAtNormalizedParam ? ( in Float32 normalizedParam )
Vec3 getTangentAtParam ? ( in Float32 param )
Boolean hasFloat64Positions ? ()
  incrementPointPositionsVersion ! ()
Boolean isRemoved ? ()
Boolean isValid ? ()
  reservePoints ! ( in UInt32 pointCount )

NURBS methods

Float32 getNURBSKnot ? ( in UInt32 knotIndex )
UInt32 getNURBSKnotCount ? ()
Float32[] getNURBSKnots ? ()
Boolean isPeriodic ? ()
  setNURBSKnot ! ( in UInt32 knotIndex, in Float32 knotValue )

Debugging methods

String getDesc ? ( in Boolean withAttributes )
String getDesc ? ( in Boolean withAttributes, in Boolean useUnitTestPrint )

Modeling methods

UInt32 addPoints ! ( in UInt32 addedPointCount )
UInt32 addPoints ! ( in Vec3 pointPositions<> )
UInt32 addPoints ! ( in Vec3 pointPositions<>, in Float32 rationalWeights<> )
  beginStructureChanges ! ()
  closeCurve ! ()
  openCurve ! ()
  openOrCloseCurve ! ( in Boolean open )
  removeCurve ! ()

Point methods

UInt32 getAttributeIndex ? ( in UInt32 curvePointIndex )
UInt32 getFirstPointIndex ? ()
Vec4 getHomogeneousPointPosition ? ( in UInt32 curvePointIndex )
Vec4_d getHomogeneousPointPosition_d ? ( in UInt32 curvePointIndex )
UInt32 getPointCount ? ( in Boolean includeRepeatedPoints )
UInt32 getPointIndex ? ( in UInt32 curvePointIndex )
Vec3 getPointPosition ? ( in UInt32 curvePointIndex )
Vec3_d getPointPosition_d ? ( in UInt32 curvePointIndex )
  getPointRange ? ( io UInt32 firstPoint, io UInt32 pointsEnd )
Float32 getRationalWeight ? ( in UInt32 curvePointIndex )
Boolean isRational ? ()
UInt32 pointCount ? ()
  setPointPosition ! ( in UInt32 curvePointIndex, in Vec3 position )
  setPointPosition ! ( in UInt32 curvePointIndex, in Vec3 position, in Float32 rationalWeight )
  setPointPosition_d ! ( in UInt32 curvePointIndex, in Vec3_d position )
  setPointPosition_d ! ( in UInt32 curvePointIndex, in Vec3_d position, in Float32 rationalWeight )
  setRationalWeight ! ( in UInt32 curvePointIndex, in Float32 weight )

Topology methods

Boolean isClosed ? ()
Boolean isOpen ? ()

Methods in detail

Curve ( in Curve other )

copy constructor


Curve ( in Ref<Curves> curves, in UInt32 curveIndex )

Initizalizes a Curve from an existing Curves‘s curveIndex. The Curve keeps an owning reference to the Curves container.


Curve ()

Constructs an uninitialized Curve.


Curve Curve.clone? ()

clone method


Curve.copyFrom! ( in Curve sourceCurve, in Boolean createMissingSourceAttributes )

Copies the source curve.

createMissingSourceAttributes If a source attribute doesn’t exist on this container, create it. If false, that source attribute is ignored.


Curves Curve.createCurvesContainerIfNone! ()


Curve.endStructureChanges! ()

Marks the end of structural changes for the curves. If some point or curve indices is unused, this might recompact the indices for all curves to maximize memory usage.

注釈

The CurvesStructureChangeBracket wraps a being/endStructureChanges using its constructor and destructor, which can reduce unbalanced bracket errors.

注釈

Structure change brackets can be nested, in which case only the outer Curve.endStructureChanges will compile the changes.


Ref<GeometryAttributes> Curve.getAttributes? ()

Returns Curve‘s attribute container (shared with other sub-curves of the same Curves container).


Vec3 Curve.getCurvatureAtNormalizedParam? ( in Float32 normalizedParam )

Returns the curvature vector (normal * arcLength) at this normalized parameter. If no curvature (eg: linear curve), :ref:`Vec3 <vec3>`() is returned. The arc length can be computed as curvature.length(), or SCALAR_INFINITE if length is 0. The normalizedParam should be within the range [0..1], which will be remapped linearly from domainStart to domainEnd.


Vec3 Curve.getCurvatureAtParam? ( in Float32 param )

Returns the curvature vector (normal * arcLength) at this parameter. If no curvature (eg: linear curve), Vec3 <vec3>`() is returned. The arc length can be computed as curvature.length(), or SCALAR_INFINITE if length is 0. The param should be within the range [domainStart .. domainEnd], as returned by :kl-ref:`Curve.getDomain.


UInt32 Curve.getCurveIndex? ()

Returns the sub-curve index for this Curve‘s Curves container.


UInt8 Curve.getCurveType? ()

Returns the curve type: curveType_linear, curveType_bezier or curveType_NURBS


String Curve.getCurveTypeString? ()

Returns the curve type as a String: “linear”, “Bezier” or “NURBS”.


Ref<Curves> Curve.getCurves? ()

Returns Curve‘s Curves container.


UInt8 Curve.getDegree? ()

Returns the degree of the curve. The order is equal to curve’s order - 1. A higher degree allows a smoother curve, but implies more complex computations. For NURBS and Bezier curves, the most common degree is 3.


Vec3 Curve.getDerivativeAtNormalizedParam? ( in Float32 normalizedParam )

Returns the curve derivative vector at this normalized parameter (relative to normalized param units). The normalizedParam should be within the range [0..1], which will be remapped linearly from domainStart to domainEnd.


Vec3 Curve.getDerivativeAtParam? ( in Float32 param )

Returns the curve derivative vector at this parameter (relative to param units). The param should be within the range [domainStart .. domainEnd], as returned by Curve.getDomain.


Curve.getDerivativesAtNormalizedParam? ( in Float32 normalizedParam, io Vec3 dU, io Vec3 dUU )

Returns the curve first and second derivative vectors at this normalized parameter (relative to normalized param units). The normalizedParam should be within the range [0..1], which will be remapped linearly from domainStart to domainEnd.


Curve.getDerivativesAtParam? ( in Float32 param, io Vec3 dU, io Vec3 dUU )

Returns the curve first and second derivative vectors at this parameter (relative to param units). The param should be within the range [domainStart .. domainEnd], as returned by Curve.getDomain.


Vec2 Curve.getDomain? ()

Returns the curve domain start and end. This is the range of parameter (“t” or “u”) at which the curve can be evaluated. For NURBS, the domain depends on the knot values and its form. For linear and Bezier curves, the domain depends on the number of spans (curve segments or pieces). See Curves for more details.

注釈

For all curve types, it is possible that the domain doesn’t start at 0, if the curve was imported or if a NURBS has explicit knot values.


Vec3 Curve.getNormalAtNormalizedParam? ( in Float32 normalizedParam )

Returns the unit curve normal on the curve evaluated at this normalized parameter. The curve normal is computed as the normalized curvature vector. As such, it can be unstable along the curve, depending on curvature changes, and is ill-defined on straight segments. The normalizedParam should be within the range [0..1], which will be remapped linearly from domainStart to domainEnd.


Vec3 Curve.getNormalAtParam? ( in Float32 param )

Returns the unit curve normal on the curve evaluated at this parameter. The curve normal is computed as the normalized curvature vector. As such, it can be unstable along the curve, depending on curvature changes, and is ill-defined on straight segments. The param should be within the range [domainStart .. domainEnd], as returned by Curve.getDomain.


UInt8 Curve.getOrder? ()

Returns the order of the curve. The order is equal to curve’s degree + 1. The order also corresponds to the number of weighted points that influence the curve at a specific parameter. A higher order allows a smoother curve, but implies more complex computations. For NURBS and Bezier curves, the most common order is 4.


Curve.getPointIndicesAndWeightsAtNormalizedParam? ( in Float32 normalizedParam, io LocalL8UInt32Array pointIndices, io LocalL8ScalarArray pointWeights )

Returns the array of point indices and associated weights that correspond to curve’s evaluation basis at this normalized parameter. These can be used to evaluate any curve attribute from a convex (linear) combination of point values. The normalizedParam should be within the range [0..1], which will be remapped linearly from domainStart to domainEnd.


Curve.getPointIndicesAndWeightsAtNormalizedParam? ( in Float32 normalizedParam, io LocalL8UInt32Array pointIndices, io LocalL8ScalarArray pointWeights, io LocalL8ScalarArray derivativePointWeights )

Returns the array of point indices and associated weights and derivative weights that correspond to curve’s evaluation basis at this normalized parameter. These can be used to evaluate any curve attribute and its derivative from a convex (linear) combination of point values. The normalizedParam should be within the range [0..1], which will be remapped linearly from domainStart to domainEnd.


Curve.getPointIndicesAndWeightsAtParam? ( in Float32 param, io LocalL8UInt32Array pointIndices, io LocalL8ScalarArray pointWeights )

Returns the array of point indices and associated weights that correspond to curve’s evaluation basis at this parameter. These can be used to evaluate any curve attribute from a convex (linear) combination of point values.


Curve.getPointIndicesAndWeightsAtParam? ( in Float32 param, io LocalL8UInt32Array pointIndices, io LocalL8ScalarArray pointWeights, io LocalL8ScalarArray derivativePointWeights )

Returns the array of point indices and associated weights and derivative weights that correspond to curve’s evaluation basis at this parameter. These can be used to evaluate any curve attribute and its derivative from a convex (linear) combination of point values. The normalizedParam should be within the range [0..1], which will be remapped linearly from domainStart to domainEnd.


Vec3 Curve.getPositionAtNormalizedParam? ( in Float32 normalizedParam )

Returns a position on the curve evaluated at this normalized parameter. The normalizedParam should be within the range [0..1], which will be remapped linearly from domainStart to domainEnd.


Vec3_d Curve.getPositionAtNormalizedParam_d? ( in Float32 normalizedParam )

Returns a double precision position on the curve evaluated at this normalized parameter. The normalizedParam should be within the range [0..1], which will be remapped linearly from domainStart to domainEnd.


Vec3 Curve.getPositionAtParam? ( in Float32 param )

Returns a position on the curve evaluated at this parameter. The param should be within the range [domainStart .. domainEnd], as returned by Curve.getDomain.


Vec3_d Curve.getPositionAtParam_d? ( in Float32 param )

Returns a double precision position on the curve evaluated at this parameter. The param should be within the range [domainStart .. domainEnd], as returned by Curve.getDomain.


Curve.getTangentAndCurvatureAtNormalizedParam? ( in Float32 normalizedParam, io Vec3 tangent, io Vec3 curvature )

Returns the unit tangent and the curvature vector (normal * arcLength) at this normalized parameter. If no curvature (eg: linear curve), curvature is set to Vec3(). The arc length can be computed as curvature.length(), or SCALAR_INFINITE if length is 0. The normalizedParam should be within the range [0..1], which will be remapped linearly from domainStart to domainEnd.

注釈

This function has the same cost as Curve.getCurvatureAtNormalizedParam since the tangent is computed internally anyway


Curve.getTangentAndCurvatureAtParam? ( in Float32 param, io Vec3 tangent, io Vec3 curvature )

Returns the unit tangent and the curvature vector (normal * arcLength) at this parameter. If no curvature (eg: linear curve), curvature is set to Vec3(). The arc length can be computed as curvature.length(), or SCALAR_INFINITE if length is 0. The param should be within the range [domainStart .. domainEnd], as returned by Curve.getDomain.

注釈

This function has the same cost as Curve.getCurvatureAtParam since the tangent is computed internally anyway


Vec3 Curve.getTangentAtNormalizedParam? ( in Float32 normalizedParam )

Returns the unit tangent at this normalized parameter. The normalizedParam should be within the range [0..1], which will be remapped linearly from domainStart to domainEnd.


Vec3 Curve.getTangentAtParam? ( in Float32 param )

Returns the unit tangent at this parameter. The param should be within the range [domainStart .. domainEnd], as returned by Curve.getDomain.


Boolean Curve.hasFloat64Positions? ()

Returns true if the curves stores its positions in Float64 (double precision Vec3_d), otherwise they are stored in Float32 (single precision Vec3).


Curve.incrementPointPositionsVersion! ()

Helper for incrementing the version of the positions attribute after value changes. See Attribute versioning for more information.


Boolean Curve.isRemoved? ()

Returns true if the curve has been removed by method Curves.removeCurve (invalid curve index).


Boolean Curve.isValid? ()

Returns true if this curve refers to a valid Curves sub-curve.


Curve.reservePoints! ( in UInt32 pointCount )

Pre-allocates point space for this curve so that Curve.addPoints doesn’t need to resize the memory vector.


NURBS methods

Float32 Curve.getNURBSKnot? ( in UInt32 knotIndex )

Returns a knot value for this NURBS curve.

knotIndex Knot index, between 0 and Curve.getNURBSKnotCount-1


UInt32 Curve.getNURBSKnotCount? ()

Returns the number of knots for this NURBS curve.


Float32[] Curve.getNURBSKnots? ()

Returns the knot vector for this NURBS curve.


Boolean Curve.isPeriodic? ()

NURBS CURVES Returns true if it is a periodic NURBS form.


Curve.setNURBSKnot! ( in UInt32 knotIndex, in Float32 knotValue )

Sets a knot value for this NURBS curve.

注釈

Since knots are set one by one, no validation is made to the knot vector as it can be in an intermediary state

knotIndex Knot index, between 0 and Curve.getNURBSKnotCount-1


Debugging methods

String Curve.getDesc? ( in Boolean withAttributes )

Returns a String description of the Curve

withAttributes Prints all attribute values


String Curve.getDesc? ( in Boolean withAttributes, in Boolean useUnitTestPrint )

Returns a String description of the Curve

withAttributes Include the attribute values in the description.
useUnitTestPrint use the unitTestPrint method to ensure that the values are consistent accross platforms (used in unit testing).


Length methods

Float32 Curve.getLength? ()

Returns the computation of the curve length.

注釈

This computation can be relatively costly, as it cannot be done analytically. The computation is cached along with a table that maps length to parameter values. The computation speed and precision of length-related methods is controlled by parameters of Curves.setLengthComputeParameters


Float32 Curve.getLengthFromParameter? ( in Float32 param )

Returns the curve length corresponding to the parameter, where domainStart is mapped to 0, and domainEnd is mapped to length. Values outside of domainStart..domainEnd will be clamped to that range.

注釈

This computation can be relatively costly, as it cannot be done analytically. The computation is cached along with a table that maps length to parameter values. The computation speed and precision of length-related methods is controlled by parameters of Curves.setLengthComputeParameters


Float32 Curve.getLengthRatioFromNormalizedParameter? ( in Float32 normalizedParam )

Returns the curve length ratio (0..1) corresponding to the normalized parameter (0..1). Values outside of 0..1 will be clamped to that range.

注釈

This computation can be relatively costly, as it cannot be done analytically. The computation is cached along with a table that maps length to parameter values. The computation speed and precision of length-related methods is controlled by parameters of Curves.setLengthComputeParameters


Float32 Curve.getNormalizedParameterFromLengthRatio? ( in Float32 ratio )

Returns the normalized parameter (0..1) corresponding to the curve length ratio (0..1). Values outside of 0..1 will be clamped to that range.

注釈

This computation can be relatively costly, as it cannot be done analytically. The computation is cached along with a table that maps length to parameter values. The computation speed and precision of length-related methods is controlled by parameters of Curves.setLengthComputeParameters


Float32 Curve.getParameterFromLength? ( in Float32 length )

Returns the parameter corresponding to the curve length, where 0 is mapped to domainStart, and length is mapped to domainEnd. Values outside of 0..length will be clamped to that range.

注釈

This computation can be relatively costly, as it cannot be done analytically. The computation is cached along with a table that maps length to parameter values. The computation speed and precision of length-related methods is controlled by parameters of Curves.setLengthComputeParameters


Modeling methods

UInt32 Curve.addPoints! ( in UInt32 addedPointCount )

Adds points to the curve, and returns the first added point index.

注釈

For some curve types, such as Beziers, added point will have an effect only if a full piece is formed (eg: degree points; see Curves)


UInt32 Curve.addPoints! ( in Vec3 pointPositions<> )

Adds points to the curve, and returns the first added point index.

注釈

For some curve types, such as Beziers, added point will have an effect only if a full piece is formed (eg: degree points; see Curves)


UInt32 Curve.addPoints! ( in Vec3 pointPositions<>, in Float32 rationalWeights<> )

Adds points to the curve, and returns the first added point index.

注釈

For some curve types, such as Beziers, added point will have an effect only if a full piece is formed (eg: degree points; see Curves)

pointPositions Positions, in actual 3D coordinates (not in homogeneous coordinates)
rationalWeights Rational weights for the curve points


Curve.beginStructureChanges! ()

Signals the beginning of structural changes for the curves, like adding points or removing curve. Structure change brackets will delay the recompaction of point and curve indices, which might happen if some indices are unused after the changes.

注釈

The CurvesStructureChangeBracket wraps a being/endStructureChanges using its constructor and destructor, which can reduce unbalanced bracket errors.

注釈

Structure change brackets can be nested, in which case only the outer Curve.endStructureChanges will compile the changes.


Curve.closeCurve! ()

Closes the curve (or does nothing is already closed).

  • For a linear curve, this only results in a removed segment between the last and first point.
  • For a Bezier curve, the last point (end of last piece) is removed so the piece ends with the first point (shared with the 1st piece).
  • For a NURBS curve, the last point is removed so the curve ends with the first point (shared).

注釈

If a NURBS curve is in periodic form, it is first converted to closed form without changing the point positions (the curve shape changes).


Curve.openCurve! ()

Opens the curve (or does nothing is already open).

  • For a linear curve, this only results in a removed segment between the last and first point.
  • For a Bezier and NURBS curve, the a last point is added, and it position is copied from the first point. The curve is then topologically

open, even if visually it is not open until a different position is assigned to the last point.

注釈

If a NURBS curve is in periodic form, it is first converted to closed form without changing the point positions (the curve shape changes).


Curve.openOrCloseCurve! ( in Boolean open )

Opens or closes the curve.

  • For a linear curve, this only results in an added or removed segment between the last and first point.
  • For a Bezier curve:
  • When closing, the last point (end of last piece) is removed so the piece ends with the first point (shared with the 1st piece).
  • When opening, the a last point is added, and it position is copied from the first point. The curve is then topologically

open, even if visually it is not open until a different position is assigned to the last point.

  • For a NURBS curve:
  • When closing, the last point is removed so the curve ends with the first point (shared).
  • When opening, the a last point is added, and it position is copied from the first point. The curve is then topologically

open, even if visually it is not open until a different position is assigned to the last point.

注釈

If a NURBS curve is in periodic form, it is first converted to closed form without changing the point positions (the curve shape changes).


Curve.removeCurve! ()

Removes the curve. If the caller didn’t open a structure change bracket (Curves.beginStructureChanges or CurvesStructureChangeBracket), the curve index will be replaced by the last valid one if applicable, so that all indices are used. If there a structure change bracket, this index replacement will be delayed until the last bracket is closed.


Point methods

UInt32 Curve.getAttributeIndex? ( in UInt32 curvePointIndex )

Returns the global attribute index for a curve’s sub-point. This index corresponds to this point’s values in the GeometryAttributes container.

curvePointIndex Curve’s sub-point index, ranging from 0 to Curve.getPointCount - 1


UInt32 Curve.getFirstPointIndex? ()

Returns the first “global” point index for the curve, which corresponds to its index in the GeometryAttributes. Other curve points use the next indices: [ Curve.getFirstPointIndex() .. Curve.getPointCount()-1 ]


Vec4 Curve.getHomogeneousPointPosition? ( in UInt32 curvePointIndex )

Returns a 4D point in homogeneous coordinate, which is (x*W, y*W, z*W, W), where W is the rational weight.

curvePointIndex Curve’s sub-point index, ranging from 0 to Curve.getPointCount - 1


Vec4_d Curve.getHomogeneousPointPosition_d? ( in UInt32 curvePointIndex )

Returns a 4D point in homogeneous coordinate in double precision, which is (x*W, y*W, z*W, W), where W is the rational weight.

curvePointIndex Curve’s sub-point index, ranging from 0 to Curve.getPointCount - 1


UInt32 Curve.getPointCount? ( in Boolean includeRepeatedPoints )

Returns the point (control vertices) count for the curve.

includeRepeatedPoints If true, the point count will include repeated points, which is one additional point for a closed curve, and (order-1) points for a periodic NURBS curve.


UInt32 Curve.getPointIndex? ( in UInt32 curvePointIndex )

Returns the global point index for a curve’s sub-point. This index corresponds to this point’s position in the GeometryAttributes container.

curvePointIndex Curve’s sub-point index, ranging from 0 to Curve.getPointCount - 1


Vec3 Curve.getPointPosition? ( in UInt32 curvePointIndex )

Returns the point position. If there is a rational weight, it will be divided by that weight (converted from homogeneous).

curvePointIndex Curve’s sub-point index, ranging from 0 to Curve.getPointCount - 1


Vec3_d Curve.getPointPosition_d? ( in UInt32 curvePointIndex )

Returns the point position. If there is a rational weight, it will be divided by that weight (converted from homogeneous).

curvePointIndex Curve’s sub-point index, ranging from 0 to Curve.getPointCount - 1


Curve.getPointRange? ( io UInt32 firstPoint, io UInt32 pointsEnd )

Returns the point index range correponding to curve’s points. Last point index is pointsEnd - 1 (if > 0 points).


Float32 Curve.getRationalWeight? ( in UInt32 curvePointIndex )

Returns the rational weight for curve’s point. By default, rational weights are 1.0.

curvePointIndex Curve’s sub-point index, ranging from 0 to Curve.getPointCount - 1


Boolean Curve.isRational? ()

Returns true if the Curve has at least one rational weight != 1.0.


UInt32 Curve.pointCount? ()

Returns the number of points (control vertices) for the curve.


Curve.setPointPosition! ( in UInt32 curvePointIndex, in Vec3 position )

Sets the position of a curve point.

注釈

Once point positions have been set, call Curve.incrementPointPositionsVersion (see Attribute versioning)

注釈

If positions are stored as Vec3_d (Float64), a conversion will be applied.

注釈

This function is threadsafe if the curves structure and attribute sharing layout is not modified by another thread.

参考

Curve.hasFloat64Positions, Curve.setPointPosition( UInt32, UInt32, Vec3_d )

curvePointIndex Curve’s sub-point index, ranging from 0 to Curve.getPointCount - 1


Curve.setPointPosition! ( in UInt32 curvePointIndex, in Vec3 position, in Float32 rationalWeight )

Sets the position of a curve point. The position is the actual 3D position and not an homogeneous coordinate; it will be made an homogeneous coordinate internally.

注釈

Once point positions have been set, call Curve.incrementPointPositionsVersion (see Attribute versioning)

注釈

If positions are stored as Vec3_d (Float64), a conversion will be applied.

注釈

This function is threadsafe if the curves structure and attribute sharing layout is not modified by another thread.

参考

Curve.hasFloat64Positions, Curve.setPointPosition( UInt32, UInt32, Vec3_d, Float32 )

curvePointIndex Curve’s sub-point index, ranging from 0 to Curve.getPointCount - 1


Curve.setPointPosition_d! ( in UInt32 curvePointIndex, in Vec3_d position )

Sets the position of the point in double precision (Float64).

注釈

If positions are stored as Vec3 (Float32), a conversion will be applied.

注釈

Once point positions have been set, call Curve.incrementPointPositionsVersion (see Attribute versioning)

注釈

This function is threadsafe if the curves structure and attribute sharing layout is not modified by another thread.

参考

Curve.hasFloat64Positions, Curve.setPointPosition( Size, Vec3 )

curvePointIndex Curve’s sub-point index, ranging from 0 to Curve.getPointCount - 1


Curve.setPointPosition_d! ( in UInt32 curvePointIndex, in Vec3_d position, in Float32 rationalWeight )

Sets the position of the point in double precision (Float64), along with its rational weight. The position is the actual 3D position and not an homogeneous coordinate; it will be made an homogeneous coordinate internally.

注釈

If positions are stored as Vec3 (Float32), a conversion will be applied.

注釈

Once point positions have been set, call Curve.incrementPointPositionsVersion (see Attribute versioning)

注釈

This function is threadsafe if the curves structure and attribute sharing layout is not modified by another thread.

参考

Curve.hasFloat64Positions, Curve.setPointPosition( Size, Vec3 )

curvePointIndex Curve’s sub-point index, ranging from 0 to Curve.getPointCount - 1


Curve.setRationalWeight! ( in UInt32 curvePointIndex, in Float32 weight )

Sets the rational weight of a curve point. This only has an impact on curves that support rational weights (rational Beziers and NURBS).

注釈

Once weights have been set, call Curve.incrementPointPositionsVersion (see Attribute versioning)

注釈

This function is threadsafe if the curves structure and attribute sharing layout is not modified by another thread, and if Curves.ensureWeightsAttributeExists has been called.

参考

Curve.hasFloat64Positions, Curve.setPointPosition( Size, Vec3_d )


Topology methods

Boolean Curve.isClosed? ()

Returns true if the curve is closed (starts and ends at its first point).


Boolean Curve.isOpen? ()

Returns true if the curve is open (starts at its first point, ends at its last point).