BezierCurve3dH Class
3d curve with homogeneous weights.
- A control point with weight w and cartesian (projected) coordinates x,y,z has the weight multiplied into the coordinates, hence the control point as stored is (xw, yw, zw, w).
Extends
Methods
Name | Description | |
---|---|---|
clone(): BezierCurve3dH | Clone the entire curve. | |
dispatchToGeometryHandler(handler: GeometryHandler): any | Second step of double dispatch: call handler.handleBezierCurve3dH(this) |
|
extendRange(rangeToExtend: Range3d, transform?: Transform): void | Extend rangeToExtend , using candidate extrema at |
|
fractionToPoint(fraction: number, result?: Point3d): Point3d | Return a (deweighted) point on the curve. | |
fractionToPoint4d(fraction: number, result?: Point4d): Point4d | Return a (deweighted) point on the curve. | |
fractionToPointAnd2Derivatives(fraction: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors | Construct a plane with | |
fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d | Return the cartesian point and derivative vector. | |
getPolePoint3d(i: number, result?: Point3d): undefined | Point3d | Return a specific pole normalized to weight 1 | |
getPolePoint4d(i: number, result?: Point4d): undefined | Point4d | Return a specific pole as a full [x,y,z,x] Point4d |
|
isAlmostEqual(other: any): boolean | test for nearly equal control points | |
isSameGeometryClass(other: any): boolean | test if other is also a BezierCurve3dH. |
|
isUnitWeight(tolerance?: number): boolean | Returns true if all weights are within tolerance of 1.0 | |
loadSpan3dPolesWithWeight(data: Float64Array, spanIndex: number, weight: number): void | Load order * 4 doubles from data[3 * spanIndex] as poles (with added weight) | |
loadSpan4dPoles(data: Float64Array, spanIndex: number): void | Load order * 4 doubles from data[3 * spanIndex] as poles (with added weight) | |
poleProductsXYZW(products: Float64Array, ax: number, ay: number, az: number, aw: number): void | Form dot products of each pole with given coefficients. | |
tryMultiplyMatrix4dInPlace(matrix: Matrix4d): void | Apply (multiply by) a perspective transform | |
tryTransformInPlace(transform: Transform): boolean | Apply (multiply by) an affine transform | |
updateClosestPointByTruePerpendicular(spacePoint: Point3d, detail: CurveLocationDetail, testAt0: booleanfalse, testAt1: booleanfalse): boolean | Find the closest point within the bezier span, using true perpendicular test (but no endpoint test) | |
create(data: Point3d[] | Point4d[] | Point2d[]): undefined | BezierCurve3dH Static | Create a curve with given points. | |
createOrder(order: number): BezierCurve3dH Static | create a bezier curve of specified order, filled with zeros |
Inherited methods
Name | Inherited from | Description |
---|---|---|
addMappedStrokesToLineString3D(map: StrokeCountMap, linestring: LineString3d): number Inherited | BezierCurveBase | Evaluate strokes at fractions indicated in a StrokeCountMap. |
allocateAndZeroBezierWorkData(primaryBezierOrder: number, orderA: number, orderB: number): void Protected Inherited | BezierCurveBase | set up the _workBezier members with specific order. |
announceClipIntervals(_clipper: Clipper, _announce?: AnnounceNumberNumberCurvePrimitive): boolean Inherited | BezierCurveBase | Find intervals of this curvePrimitive that are interior to a clipper |
appendPlaneIntersectionPoints(plane: PlaneAltitudeEvaluator, result: CurveLocationDetail[]): number Inherited | BezierCurveBase | Compute intersections of the curve with a plane. |
clonePartialCurve(fractionA: number, fractionB: number): BezierCurveBase Inherited | BezierCurveBase | Return a curve primitive which is a portion of this curve. |
cloneTransformed(transform: Transform): BezierCurveBase Inherited | BezierCurveBase | Return a transformed deep clone. |
closestPoint(spacePoint: Point3d, extend: VariantCurveExtendParameter, result?: CurveLocationDetail): undefined | CurveLocationDetail Inherited | BezierCurveBase | Search for a point on the curve that is closest to the spacePoint. |
collectCurvePrimitives(collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: booleanfalse, explodeLinestrings: booleanfalse): CurvePrimitive[] Inherited | BezierCurveBase | Return an array containing only the curve primitives. |
collectCurvePrimitivesGo(collectorArray: CurvePrimitive[], _smallestPossiblePrimitives: boolean, _explodeLinestrings: booleanfalse): void Inherited | BezierCurveBase | Return an array containing only the curve primitives. |
computeAndAttachRecursiveStrokeCounts(options?: StrokeOptions, parentMap?: StrokeCountMap): void Inherited | BezierCurveBase | Attach StrokeCountMap structure to this primitive (and recursively to any children) |
computeStrokeCountForOptions(options?: StrokeOptions): number Inherited | BezierCurveBase | Assess length and turn to determine a stroke count. |
constructOffsetXY(offsetDistanceOrOptions: number | OffsetOptions): undefined | CurvePrimitive | CurvePrimitive[] Inherited | BezierCurveBase | Construct an offset of the instance curve as viewed in the xy-plane (ignoring z). |
copyPolesAsJsonArray(): any[] Inherited | BezierCurveBase | Return a simple array of arrays with the control points as [[x,y,z],[x,y,z],..] |
curveLength(): number Inherited | BezierCurveBase | Return the length of the curve. |
curveLengthBetweenFractions(fraction0: number, fraction1: number): number Inherited | BezierCurveBase | Returns a (high accuracy) length of the curve between fractional positions. |
curveLengthWithFixedIntervalCountQuadrature(fraction0: number, fraction1: number, numInterval: number, numGauss: number5): number Inherited | BezierCurveBase | Run an integration (with a default Gaussian quadrature) with a fixed fractional step |
emitStrokableParts(handler: IStrokeHandler, _options?: StrokeOptions): void Inherited | BezierCurveBase | announce intervals with stroke counts |
emitStrokes(dest: LineString3d, options?: StrokeOptions): void Inherited | BezierCurveBase | append stroke points to a linestring, based on strokeCount and fractionToPoint from derived class |
endPoint(): Point3d Inherited | BezierCurveBase | Return the end point. |
fractionAndDistanceToPointOnTangent(fraction: number, distance: number): Point3d Inherited | BezierCurveBase | Construct a point extrapolated along tangent at fraction. |
fractionToCurvature(fraction: number): undefined | number Inherited | BezierCurveBase | Returns the (absolute) curvature magnitude. |
fractionToFrenetFrame(fraction: number, result?: Transform): undefined | Transform Inherited | BezierCurveBase | Construct a frenet frame: |
fractionToParentFraction(fraction: number): number Inherited | BezierCurveBase | map fraction from this Bezier curves inherent 0..1 range to the (a,b) range of parent |
fractionToPointAndUnitTangent(fraction: number, result?: Ray3d): Ray3d Inherited | BezierCurveBase | Returns a ray whose origin is the curve point and direction is the unit tangent. |
fractionToSignedXYRadiusOfCurvature(fraction: number): number Inherited | BezierCurveBase | Construct signed distance from a point on the planar curve to its center of curvature (in xy only). |
getFractionToDistanceScale(): undefined | number Inherited | BezierCurveBase | If the curve primitive has distance-along-curve strictly proportional to curve fraction, return the scale factor. |
isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean Inherited | BezierCurveBase | return true if all poles are on a plane. |
moveSignedDistanceFromFraction(startFraction: number, signedDistance: number, allowExtension: boolean, result?: CurveLocationDetail): CurveLocationDetail Inherited | BezierCurveBase | (Attempt to) find a position on the curve at a signed distance from start fraction. |
moveSignedDistanceFromFractionGeneric(startFraction: number, signedDistance: number, allowExtension: boolean, result?: CurveLocationDetail): CurveLocationDetail Protected Inherited | BezierCurveBase | Generic algorithm to search for point at signed distance from a fractional startPoint. |
polygonLength(): number Inherited | BezierCurveBase | Return the length of the control polygon. |
projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): undefined | Range1d Inherited | BezierCurveBase | Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters of projection. |
quickLength(): number Inherited | BezierCurveBase | Return the control polygon length as a quick length estimate. |
range(transform?: Transform, result?: Range3d): Range3d Inherited | BezierCurveBase | Return the range of the entire GeometryQuery tree. |
rangeBetweenFractions(fraction0: number, fraction1: number, transform?: Transform): Range3d Inherited | BezierCurveBase | Returns a (high accuracy) range of the curve between fractional positions |
rangeBetweenFractionsByClone(fraction0: number, fraction1: number, transform?: Transform): Range3d Inherited | BezierCurveBase | Returns a (high accuracy) range of the curve between fractional positions |
rangeBetweenFractionsByCount(fraction0: number, fraction1: number, count: number, transform?: Transform, extrapolationFactor: number0.0): Range3d Inherited | BezierCurveBase | Returns an approximate range based on a fixed number of evaluations |
reverseInPlace(): void Inherited | BezierCurveBase | reverse the poles in place |
saturateInPlace(knotVector: KnotVector, spanIndex: number): boolean Inherited | BezierCurveBase | saturate the pole in place, using knot intervals from spanIndex of the knotVector |
setInterval(a: number, b: number): void Inherited | BezierCurveBase | Set mapping to parent curve (e.g. |
startPoint(): Point3d Inherited | BezierCurveBase | Return the start point. |
tryTranslateInPlace(dx: number, dy: number0.0, dz: number0.0): boolean Inherited | BezierCurveBase | Try to move the geometry by dx,dy,dz. |
areAlmostEqual(a: GeometryQuery, b: GeometryQuery): boolean Static Inherited | BezierCurveBase | Apply instance method isAlmostEqual if both are defined. |
installStrokeCountMap(curve: CurvePrimitive, curveMap: StrokeCountMap, parentMap?: StrokeCountMap): void Static Inherited | BezierCurveBase | Final install step to save curveMap in curve. |
Inherited properties
Name | Type | Inherited from | Description |
---|---|---|---|
_polygon Protected Inherited | Bezier1dNd | BezierCurveBase | Control points |
_workCoffsA Protected Inherited | Float64Array | undefined | BezierCurveBase | scratch array for use by derived classes, using allocateAndZeroBezierWorkData for sizing. |
_workCoffsB Protected Inherited | Float64Array | undefined | BezierCurveBase | scratch array for use by derived classes, using allocateAndZeroBezierWorkData for sizing. |
_workData0 Protected Inherited | Float64Array | BezierCurveBase | scratch data blocks accessible by concrete class. |
_workData1 Protected Inherited | Float64Array | BezierCurveBase | scratch data blocks accessible by concrete class. |
_workPoint0 Protected Inherited | Point3d | BezierCurveBase | Scratch xyz point accessible by derived classes. |
_workPoint1 Protected Inherited | Point3d | BezierCurveBase | Scratch xyz point accessible by derived classes. |
children Accessor Inherited ReadOnly | undefined | GeometryQuery[] | BezierCurveBase | Return GeometryQuery children for recursive queries. * leaf classes do not need to implement. |
curvePrimitiveType Readonly Inherited | "bezierCurve" | BezierCurveBase | String name for schema properties |
degree Accessor Inherited ReadOnly | number | BezierCurveBase | (property accessor) Return the polynomial degree (one less than order) |
geometryCategory Readonly Inherited | "curvePrimitive" | BezierCurveBase | String name for schema properties |
isExtensibleFractionSpace Accessor Inherited ReadOnly | boolean | BezierCurveBase | * Returns true if the curve can be easily extended past its start/end point (i.e., beyond the usual fraction space [0,1]). Otherwise, returns false. * Base class default implementation returns false. * These classes (and perhaps others in the future) will return true: * LineSegment3d * LineString3d * Arc3d |
numPoles Accessor Inherited ReadOnly | number | BezierCurveBase | (property accessor) Return the number of poles (aka control points) |
order Accessor Inherited ReadOnly | number | BezierCurveBase | (property accessor) Return the polynomial order |
parent Inherited | any | undefined | BezierCurveBase | Data attached by various algorithms (e.g. |
strokeData Inherited | StrokeCountMap | undefined | BezierCurveBase | Data attached during stroking for facets. |
Defined in
- bspline/BezierCurve3dH.ts Line 28
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.