Click or drag to resize
Ab4d.SharpEngine logo

BSplineCreateNURBSCurvePositions(Vector3, Single, Single, Single, Int32) Method

Returns a Vector3[] array that defines the NURBS curve (Non-uniform rational B-spline) based on the specified control points, weights, and adaptive algorithm parameters. The curve positions are created using an adaptive algorithm that adds more points where the curvature is higher. This takes longer to compute than when using fixed positionsPerSegment, but generates smoother curves with fewer positions.

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntax
C#
public static Vector3[] CreateNURBSCurvePositions(
	Vector3[] controlPoints,
	float[] weights,
	float angleThresholdDegrees,
	float minSegmentLength,
	int maxSubdivisionsCount = 10
)

Parameters

controlPoints  Vector3
Array of control points.
weights  Single
Array of weights.
angleThresholdDegrees  Single
Angle threshold in degrees. Lower values produce a more accurate curve.
minSegmentLength  Single
Minimum segment length. Lower values produce a more accurate curve.
maxSubdivisionsCount  Int32  (Optional)
Maximum number of recursive subdivisions (10 by default that generates at most 1024 positions for the curve).

Return Value

Vector3
A Vector3[] array that defines the NURBS curve.
See Also