 |
BezierCurveCreateBezierCurvePositionsThroughPoints(Vector3, Single, Single, Single, Int32) Method |
Returns an array of 3D points that define the Bezier curve that passes through the specified positions.
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 less positions.
Namespace: Ab4d.SharpEngine.UtilitiesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntaxpublic static Vector3[] CreateBezierCurvePositionsThroughPoints(
Vector3[] curvePositions,
float curveScale,
float angleThresholdDegrees,
float minSegmentLength,
int maxSubdivisionsCount = 6
)
Parameters
- curvePositions Vector3
- Array of points on the curve.
- curveScale Single
- curve scale that defines how far from the curve positions the tangent control points are defined. This way the curve scale defines the curvature of the curve.
- angleThresholdDegrees Single
- Angle threshold in degrees. Lower values produce more accurate curve.
- minSegmentLength Single
- Minimum segment length. Lower values produce more accurate curve.
- maxSubdivisionsCount Int32 (Optional)
- maximum number of recursive subdivisions per segment (6 by default that produces at max 64 positions per segment)
Return Value
Vector3A Vector3[] array that defines the Bezier curve.
See Also