Bezier1dNd Class

Shared implementation details for derived bezier curve classes

  • BezierCurve3d implements with blockSize 3.
  • BezierCurve3dH implements with blockSize 4.

Methods

Name Description
constructor(blockSize: number, polygon: Float64Array): Bezier1dNd    
clonePolygon(result?: Float64Array): Float64Array Return a clone of the data array.  
evaluate(s: number, buffer?: Float64Array): Float64Array Return the curve value at bezier fraction s.  
evaluateDerivative(s: number, buffer?: Float64Array): Float64Array Return the curve derivative value at bezier fraction s.  
fractionToParentFraction(fraction: number): number map a fraction to the parent space.  
getPolygonPoint(i: number, buffer?: Float64Array): undefined | Float64Array Return a point of the polygon as a simple array.  
interpolatePoleInPlace(poleIndexA: number, fraction: number, poleIndexB: number): void interpolate at fraction between poleA and poleB.  
isAlmostEqual(other: any): boolean equality test with usual metric tolerances  
loadSpanPoles(data: Float64Array, spanIndex: number): void Load order * dimension doubles from data[dimension * spanIndex] as poles  
loadSpanPolesWithWeight(data: Float64Array, dataDimension: number, spanIndex: number, weight: number): void Load order * (dataDimension + 1) doubles from data[dataDimension * spanIndex] as poles with weight inserted  
reverseInPlace(): void block-by-block reversal  
saturateInPlace(knots: KnotVector, spanIndex: number): boolean Compute new control points to "clamp" bspline unsaturated support to saturated form.  
setInterval(a: number, b: number): void create or update the mapping to parent curve.  
setPolygonPoint(i: number, buffer: Float64Array): void set a single point of the polygon as a simple array.  
subdivideInPlaceKeepLeft(fraction: number): boolean Apply deCasteljau interpolations to isolate a smaller bezier polygon, representing interval 0..fraction of the original  
subdivideInPlaceKeepRight(fraction: number): boolean Apply deCasteljau interpolations to isolate a smaller bezier polygon, representing interval fraction..1 of the original  
subdivideToIntervalInPlace(fraction0: number, fraction1: number): boolean Saturate a univariate bspline coefficient array in place  
unpackToJsonArrays(): any[] return a json array of arrays with each control point as a lower level array of numbers  
create(data: Point3d[] | Point4d[] | Point2d[]): undefined | Bezier1dNd Static Create a Bezier1dNd, using the structure of data[0] to determine the bezier order.  
saturate1dInPlace(coffs: Float64Array, knots: KnotVector, spanIndex: number): boolean Static Saturate a univariate bspline coefficient array in place  

Properties

Name Type Description
interval Segment1d | undefined optional interval for mapping to a parent object  
order Accessor ReadOnly number Return the bezier order  
packedData Accessor ReadOnly Float64Array return the packed data array.  

Defined in

Last Updated: 28 October, 2024