/** @packageDocumentation
 * @module Bspline
 */
import { GeometryQuery } from "../curve/GeometryQuery";
import { GeometryHandler, UVSurface } from "../geometry3d/GeometryHandler";
import { Plane3dByOriginAndUnitNormal } from "../geometry3d/Plane3dByOriginAndUnitNormal";
import { Plane3dByOriginAndVectors } from "../geometry3d/Plane3dByOriginAndVectors";
import { Point3d } from "../geometry3d/Point3dVector3d";
import { Range3d } from "../geometry3d/Range";
import { Transform } from "../geometry3d/Transform";
import { Point4d } from "../geometry4d/Point4d";
import { BSplineWrapMode, KnotVector } from "./KnotVector";
/**
 * UVSelect is an integer indicating uDirection (0) or vDirection (1) in a bspline surface parameterization.
 * @public
 */
export declare enum UVSelect {
    /** index of u direction */
    uDirection = 0,
    /**
     * index of v direction
     * @deprecated in 4.3.0 - will not be removed until after 2026-06-13. Use vDirection instead.
     */
    VDirection = 1,
    /** index of v direction */
    vDirection = 1
}
/**
 * Enumeration of how weights are carried
 * * UnWeighted (0) -- there are no weights
 * * WeightsAlreadyAppliedToCoordinates (1) -- for real point (x,y,z) the homogeneous point (wx,wy,wx,w) is stored as (wx,wy,wz,w)
 * * WeightsSeparateFromCoordinates (2) -- for real point (x,y,z) the homogeneous point (wx,wy,wx,w) is stored as (x,y,z,w)
 *   * Note that "internal" computations never use WeightsSeparateFromCoordinates.
 *   * WeightsSeparateFromCoordinates is only useful as input or output state in serializer.
 * @public
 */
export declare enum WeightStyle {
    /** There are no weights. */
    UnWeighted = 0,
    /**
     * * Data is weighted.
     * * The point with normalized coordinate `[x,y,z]` and weight `w` is stored as `[x*w,y*w,z*w,w]`
     * */
    WeightsAlreadyAppliedToCoordinates = 1,
    /**
     * * Data is weighted.
     * * The point with normalized coordinate `[x,y,z]` and weight `w` is stored as `[x,y,z,w]`
     * */
    WeightsSeparateFromCoordinates = 2
}
/**
 * interface for points returned from getPointGrid, with annotation of physical and weighting dimensions.
 * @public
 */
export interface PackedPointGrid {
    /**
     * Array of coordinate data.
     * * points[row] is all the data for a grid row.
     * * points[row][j] is the jth point across the row
     * * points[row][j][k] is numeric value k.
     */
    points: number[][][];
    /**
     * Description of how weights are present in the coordinate data.
    */
    weightStyle?: WeightStyle;
    /**
     * number of cartesian dimensions, e.g. 2 or 3.
     */
    numCartesianDimensions: number;
}
/** Interface for methods supported by both regular (xyz) and weighted (xyzw) bspline surfaces.
 * @public
 */
export interface BSplineSurface3dQuery {
    /** Evaluate xyz coordinates at fractional parameter u,v */
    fractionToPoint(uFraction: number, vFraction: number): Point3d;
    /** Evaluate a rigid frame at fractional parameter u,v
     * * origin is at the surface point
     * * x column is a unit vector in the direction of the u derivative
     * * y column is a unit vector in the direction of the v derivative
     * * z direction is the surface normal
     */
    fractionToRigidFrame(uFraction: number, vFraction: number, result?: Transform): Transform | undefined;
    /** Evaluate xyz coordinates at knot values (uKnot, vKnot) */
    knotToPoint(uKnot: number, vKnot: number): Point3d;
    /**  apply a transform to the surface */
    tryTransformInPlace(transform: Transform): boolean;
    /** clone the surface */
    clone(): BSplineSurface3dQuery;
    /** clone and transform */
    cloneTransformed(transform: Transform): BSplineSurface3dQuery;
    /** Reverse one of the parameterization directions. */
    reverseInPlace(select: UVSelect): void;
    /** Test if `this` and `other` are the same geometry class. */
    isSameGeometryClass(other: any): boolean;
    /** Extend `rangeToExtend` so this surface is included. */
    extendRange(rangeToExtend: Range3d, transform?: Transform): void;
    /** test for nearly equality with `other` */
    isAlmostEqual(other: any): boolean;
    /** ask if the u or v direction could be converted to periodic form */
    isClosable(select: UVSelect): boolean;
    /** Ask if the entire surface is within a plane. */
    isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean;
    /** return the total number of poles (product of u,v counts) */
    numPolesTotal(): number;
    /**
     * turn a numeric variable into a UVSelect (strict 0 or 1).
     */
    numberToUVSelect(value: number): UVSelect;
    /**
     * Return the degree in in selected direction (0 for u, 1 for v)
     * @param select 0 for u, 1 for v
     */
    degreeUV(select: UVSelect): number;
    /**
     * Return the order in in selected direction (0 for u, 1 for v)
     * @param select 0 for u, 1 for v
     */
    orderUV(select: UVSelect): number;
    /**
     * Return the number of bezier spans in selected direction (0 for u, 1 for v)
     * @param select 0 for u, 1 for v
     */
    numSpanUV(select: UVSelect): number;
    /**
     * Return the number of poles in selected direction (0 for u, 1 for v)
     * @param select 0 for u, 1 for v
     */
    numPolesUV(select: UVSelect): number;
    /**
     * Return the step between adjacent poles in selected direction (0 for u, 1 for v)
     * @param select 0 for u, 1 for v
     */
    poleStepUV(select: UVSelect): number;
    /**
    * Return control points json arrays.
    * * Each row of points is an an array.
    * * Within the array for each row, each point is an array [x,y,z] or [x,y,z,w].
    * * The PackedPointGrid indicates if weights are present.
    */
    getPointGridJSON(): PackedPointGrid;
}
/** Bspline knots and poles for 2d-to-Nd.
 * * This abstract class in not independently instantiable -- GeometryQuery methods must be implemented by derived classes.
 * @public
 */
export declare abstract class BSpline2dNd extends GeometryQuery {
    /** String name for schema properties */
    readonly geometryCategory = "bsurf";
    /** Array of (exactly 2) knot vectors for the u, v directions */
    knots: KnotVector[];
    /** flat array of coordinate data, blocked by poleDimension and row */
    coffs: Float64Array;
    /**
     * Number of components per pole.
     * * 3 for conventional xyz surface
     * * 4 for weighted (wx, wy, wz, w) surface.
     */
    poleDimension: number;
    private _numPoles;
    /** Return the degree (one less than order) for the `select` direction (0 or 1) */
    degreeUV(select: UVSelect): number;
    /** Return the order (one more than degree) for the `select` direction (0 or 1) */
    orderUV(select: UVSelect): number;
    /** Return the number of spans (INCLUDING NULL SPANS) for the `select` direction (0 or 1) */
    numSpanUV(select: UVSelect): number;
    /** Return the total number of poles (product of x and y pole counts) */
    numPolesTotal(): number;
    /** Return the number of poles for the `select` direction (0 or 1) */
    numPolesUV(select: UVSelect): number;
    /** Return the step between adjacent poles for the `select` direction (0 or 1) */
    poleStepUV(select: UVSelect): number;
    /** Confirm that order and pole counts agree for both u and v directions */
    static validOrderAndPoleCounts(orderU: number, numPolesU: number, orderV: number, numPolesV: number, numUV: number): boolean;
    /** Get the indexed Point3d.
     * * (IMPORTANT) This assumes this is an xyz surface.  Data will be incorrect if this is an xyzw surface.
     * @param i index in [0, numPolesU)
     * @param j index in [0, numPolesV)
     */
    getPoint3dPole(i: number, j: number, result?: Point3d): Point3d | undefined;
    /** Get the indexed Point3d, projecting the weight away to get to xyz.
     * * (IMPORTANT) This assumes this is an xyzw surface.  Data will be incorrect if this is an xyz surface.
     * @param i index in [0, numPolesU)
     * @param j index in [0, numPolesV)
     */
    getPoint3dPoleXYZW(i: number, j: number, result?: Point3d): Point3d | undefined;
    /** Get the indexed Point4d.
     * * (IMPORTANT) This assumes this is an xyzw surface.  Data will be incorrect if this is an xyz surface.
     * @param i index in [0, numPolesU)
     * @param j index in [0, numPolesV)
     */
    getPoint4dPole(i: number, j: number, result?: Point4d): Point4d | undefined;
    /**
     * Return 0 for 0 input, 1 for any nonzero input.
     * @param value numeric value to convert to strict 0 or 1.
     */
    numberToUVSelect(value: number): UVSelect;
    /** extend a range, treating each block as simple XYZ */
    extendRangeXYZ(rangeToExtend: Range3d, transform?: Transform): void;
    /** extend a range, treating each block as homogeneous xyzw, with weight at offset 3 */
    extendRangeXYZH(rangeToExtend: Range3d, transform?: Transform): void;
    /**
     * abstract declaration for evaluation of (unweighted) 3d point and derivatives.
     * Derived classes must implement to get fractionToRigidFrame support.
     * @param _fractionU u parameter
     * @param _fractionV v parameter
     * @param _result optional result.
     */
    abstract fractionToPointAndDerivatives(_fractionU: number, _fractionV: number, _result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors | undefined;
    /**
     * evaluate the surface at u and v fractions. Return a (squared, right handed) coordinate frame at that point on the surface.
     * @param fractionU u parameter
     * @param fractionV v parameter
     * @param result undefined if surface derivatives are parallel (or either alone is zero)
     */
    fractionToRigidFrame(fractionU: number, fractionV: number, result?: Transform): Transform | undefined;
    /** a scratch array sized for `order` numbers */
    protected _basisBufferUV: Float64Array[];
    /** a scratch array sized for `order` numbers */
    protected _basisBuffer1UV: Float64Array[];
    /** a scratch array sized for one pole */
    protected _poleBuffer: Float64Array;
    /** array of 2 scratch array, each sized for one pole
     * * used in derivative evaluations, with respective u and v derivatives in the respective arrays.
    */
    protected _poleBuffer1UV: Float64Array[];
    /**
     * initialize arrays for given spline dimensions.
     * coffs length must be poleLength * numPolesU * numPolesV    !!!!
     */
    protected constructor(numPolesU: number, numPolesV: number, poleLength: number, knotsU: KnotVector, knotsV: KnotVector, coffs: Float64Array);
    /**
     * Map a position, specified as (uv direction, bezier span, fraction within the bezier), to an overall knot value.
     * @param select selector indicating U or V direction.
     * @param span index of bezier span
     * @param localFraction fractional coordinate within the bezier span
     */
    spanFractionToKnot(select: UVSelect, span: number, localFraction: number): number;
    /** Evaluate basis functions given
     * * choice of u or v
     * * span index
     * * local fraction within the span.
     * @returns true if and only if output arrays are sufficiently sized
     */
    spanFractionsToBasisFunctions(select: UVSelect, spanIndex: number, spanFraction: number, f: Float64Array, df?: Float64Array): boolean;
    /** sum poles by the weights in the basisBuffer, using poles for given span */
    sumPoleBufferForSpan(spanIndexU: number, spanIndexV: number): void;
    /**
     * sum poles by the weights in the basisBuffer, using poles for given span
     * @deprecated in 4.3.0 - will not be removed until after 2026-06-13. Use sumPoleBufferDerivativesForSpan instead.
     */
    sumpoleBufferDerivativesForSpan(spanIndexU: number, spanIndexV: number): void;
    /** sum derivatives by the weights in the basisBuffer, using poles for given span */
    sumPoleBufferDerivativesForSpan(spanIndexU: number, spanIndexV: number): void;
    /**
     * Evaluate the _basisBuffer, _poleBuffer and (optionally) _basisBuffer1 and _poleBuffer1 arrays at given knot.
     *
     * @param u u knot value
     * @param v v not value
     * @param numDerivative number of derivatives needed
     */
    evaluateBuffersAtKnot(u: number, v: number, numDerivative?: number): void;
    private swapBlocks;
    /**
     * Reverse the parameter direction for either u or v.
     * @param select direction to reverse -- 0 for u, 1 for v.
     */
    reverseInPlace(select: UVSelect): void;
    /**
     * Get the flag indicating the surface might be suitable for having wrapped "closed" interpretation.
     */
    getWrappable(select: UVSelect): BSplineWrapMode;
    /**
     * Set the flag indicating the surface might be suitable for having wrapped "closed" interpretation.
     */
    setWrappable(select: UVSelect, value: BSplineWrapMode): void;
    /**
     * Test if leading and trailing blocks of points match in a given direction.
     * @param data packed array of points in row-major order (numRows x numColumns x dimension numbers)
     * @param numRows number of rows of points in the array
     * @param numColumns number of columns of points in the array (equal to the number of points in each row)
     * @param dimension point dimension (e.g., 2,3,4)
     * @param blockLength number of leading/trailing points to check
     * @param select 0 to test first/last columns of points; 1 to test first/last rows of points
     * @returns true if coordinates matched
     */
    static isWrappedGrid(data: Float64Array, numRows: number, numColumns: number, dimension: number, blockLength: number, select: UVSelect): boolean;
    /**
     * Test if `degree` leading and trailing (one of U or V) blocks match, as if the data is a non-periodic physically closed spline in the selected direction.
     * @param select select U or V direction
     * @returns true if coordinates matched.
     */
    testClosableGrid(select: UVSelect, mode?: BSplineWrapMode): boolean;
    /**
     * Test knots and control points to determine if it is possible to close (aka "wrap") the surface in the selected parametric direction.
     * @param select select U or V direction
     * @return whether the surface can be wrapped in the given parametric direction.
     */
    isClosable(select: UVSelect): boolean;
    /**
     * Test knots and control points to determine if it is possible to close (aka "wrap") the surface in the selected parametric direction.
     * @param select select U or V direction
     * @return the manner of closing. See `BSplineWrapMode` for particulars of each mode.
     */
    isClosableSurface(select: UVSelect): BSplineWrapMode;
}
/**  BSplineSurface3d is a parametric surface in xyz space.
 * * This (BSplineSurface3d) is an unweighted surface.   Use the separate class BSplineSurface3dH for a weighted surface.
 *
 * The various static "create" methods have subtle differences in how grid sizes are conveyed:
 * | Method | control point array | counts |
 * | create | flat array of [x,y,z] | arguments numPolesU, numPolesV |
 * | createGrid | array of array of [x,y,z ] | There are no `numPolesU` or `numPolesV` args. The counts are conveyed by the deep arrays |
 * @public
 */
export declare class BSplineSurface3d extends BSpline2dNd implements BSplineSurface3dQuery, UVSurface {
    /** Test if `other` is an instance of `BSplineSurface3d */
    isSameGeometryClass(other: any): boolean;
    /** Apply the transform to the poles */
    tryTransformInPlace(transform: Transform): boolean;
    /** Return a pole by u and v indices */
    getPole(i: number, j: number, result?: Point3d): Point3d | undefined;
    private constructor();
    /**
     * Return control points json arrays.
     * * if `flatArray===true`, each point appears as an array [x,y,z] in row-major order of a containing array.
     * * if `flatArray===false` each row of points is an an array of [x,y,z] in an array.  Each of these row arrays is in the result array.
     */
    getPointArray(flatArray?: boolean): any[];
    /**
     * Return control points json arrays.
     * * Each row of points is an an array.
     * * Within the array for each row, each point is an array [x,y,z]
     */
    getPointGridJSON(): PackedPointGrid;
    /** Return a simple array of the control points coordinates */
    copyPointsFloat64Array(): Float64Array;
    /**
     * return a simple array form of the knots.  optionally replicate the first and last
     * in classic over-clamped manner
     */
    copyKnots(select: UVSelect, includeExtraEndKnot: boolean): number[];
    /**
     * Create a bspline surface.
     * * This `create` variant takes control points in a "flattened" array, with
     *  points from succeeding U rows packed together in one array.  Use `createGrid` if the points are in
     *  a row-by-row grid structure
     * * knotArrayU and knotArrayV are optional -- uniform knots are implied if they are omitted (undefined).
     * * When knots are given, two knot count conditions are recognized:
     *     * If poleArray.length + order == knotArray.length, the first and last are assumed to be the
     *      extraneous knots of classic clamping.
     *     * If poleArray.length + order == knotArray.length + 2, the knots are in modern form that does not have
     *      the classic unused first and last knot.
     * @param controlPointArray Array of points, ordered along the U direction.
     * @param numPoleU number of poles in each row
     * @param orderU order for the U direction polynomial (`order` is one more than the `degree`.  "cubic" polynomial is order 4.)
     * @param knotArrayU knots for the V direction.  See note above about knot counts.
     * @param numPoleV number of rows of poles
     * @param orderV order for the V direction polynomial (`order` is one more than the `degree`.  "cubic" polynomial is order 4.)
     * @param knotArrayV knots for the V direction.  See note above about knot counts.
     */
    static create(controlPointArray: Point3d[] | Float64Array, numPolesU: number, orderU: number, knotArrayU: number[] | Float64Array | undefined, numPolesV: number, orderV: number, knotArrayV: number[] | Float64Array | undefined): BSplineSurface3d | undefined;
    /**
     * Create a bspline surface.
     * * This `create` variant takes control points in a "grid" array, with the points from
     *   each grid row `[rowIndex]` being an independent array `points[rowIndex][indexAlongRow][x,y,z]`
     * * knotArrayU and knotArrayV are optional -- uniform knots are implied if they are omitted (undefined).
     * * When knots are given, two knot count conditions are recognized in each direction:
     *    * If poleArray.length + order == knotArray.length, the first and last are assumed to be the
     *      extraneous knots of classic clamping.
     *    * If poleArray.length + order == knotArray.length + 2, the knots are in modern form that does not have
     *      the classic unused first and last knot.
     * @param points Array of points, ordered along the U direction.
     * @param orderU order for the U direction polynomial (`order` is one more than the `degree`.  "cubic" polynomial is order 4.)
     * @param knotArrayU knots for the V direction.  See note above about knot counts.
     * @param orderV order for the V direction polynomial (`order` is one more than the `degree`.  "cubic" polynomial is order 4.)
     * @param knotArrayV knots for the V direction.  See note above about knot counts.
     */
    static createGrid(points: number[][][], orderU: number, knotArrayU: number[] | Float64Array | undefined, orderV: number, knotArrayV: number[] | Float64Array | undefined): BSplineSurface3d | undefined;
    /**
     * Return a complete copy of the bspline surface.
     */
    clone(): BSplineSurface3d;
    /**
     * Return a complete copy of the bspline surface, with a transform applied to the control points.
     * @param transform transform to apply to the control points
     */
    cloneTransformed(transform: Transform): BSplineSurface3d;
    /** Evaluate at a position given by u and v coordinates in knot space.
     * @param u u value, in knot range.
     * @param v v value in knot range.
   * @returns Return the xyz coordinates on the surface.
     */
    knotToPoint(u: number, v: number): Point3d;
    /** Evaluate at a position given by a knot value.  */
    knotToPointAndDerivatives(u: number, v: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors;
    /** Evaluate at a position given by fractional coordinate in each direction.
       * @param fractionU u coordinate, as a fraction of the knot range.
       * @param fractionV v coordinate, as a fraction of the knot range.
     * @returns Return the xyz coordinates on the surface.
     */
    fractionToPoint(fractionU: number, fractionV: number): Point3d;
    /**
     * evaluate the surface at u and v fractions.
     * @returns plane with origin at the surface point, direction vectors are derivatives in the u and v directions.
     * @param fractionU u coordinate, as a fraction of the knot range.
     * @param fractionV v coordinate, as a fraction of the knot range.
     * @param result optional pre-allocated object for return values.
     * @returns Returns point and derivative directions.
     */
    fractionToPointAndDerivatives(fractionU: number, fractionV: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors;
    /** Implementation of the UVSurface interface; allows `PolyfaceBuilder.addUVGridBody` to facet this B-spline surface. */
    uvFractionToPoint(u: number, v: number): Point3d;
    /** Implementation of the UVSurface interface; allows `PolyfaceBuilder.addUVGridBody` to facet this B-spline surface. */
    uvFractionToPointAndTangents(u: number, v: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors;
    /** test for identical counts and near-equal coordinates */
    isAlmostEqual(other: any): boolean;
    /** Test if all poles are in a plane */
    isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean;
    /** Second step of double dispatch:  call `handler.handleBSplineSurface3d(this)` */
    dispatchToGeometryHandler(handler: GeometryHandler): any;
    /** Extend the range to include all poles
     * * This is not a tight range.
     */
    extendRange(rangeToExtend: Range3d, transform?: Transform): void;
}
/**  BSpline Surface in xyzw homogeneous space
 * @public
 */
export declare class BSplineSurface3dH extends BSpline2dNd implements BSplineSurface3dQuery, UVSurface {
    /** Test if `other` is an instance of `BSplineSurface3dH */
    isSameGeometryClass(other: any): boolean;
    /** Apply the transform to the poles */
    tryTransformInPlace(transform: Transform): boolean;
    /** Return a pole by u and v indices */
    getPole(i: number, j: number, result?: Point3d): Point3d | undefined;
    private constructor();
    /** Unpack the control points to a Point4d array of form [wx,wy,wz,w]. */
    copyPoints4d(): Point4d[];
    /**
     * Unpack the control points to a Point3d array and an array of weights.
     * @param points output xyz, weighted by default formatter
     * @param weights output weights
     * @param formatter optional xyz formatter. By default, returns a Point3d of form [wx,wy,wz].
     */
    copyPointsAndWeights(points: Point3d[], weights: number[], formatter?: (x: number, y: number, z: number) => any): void;
    /**
     * Copy the control points to a packed 3D array.
     * @param unweight if true, output array has form x,y,z; if false, output array has form wx,wy,wz.
     */
    copyXYZToFloat64Array(unweight: boolean): Float64Array;
    /** unpack from xyzw xyzw ... to packed weights
     */
    copyWeightsToFloat64Array(): Float64Array;
    /**
     * return a simple array form of the knots.  optionally replicate the first and last
     * in classic over-clamped manner
     */
    copyKnots(select: UVSelect, includeExtraEndKnot: boolean): number[];
    /**
     * Create a weighted bspline surface, with control points and weights each organized as flattened arrays continuing from one U row to the next.
     * * Use `createGrid` if the control points are in a deeper grid array structure.
     * * knotArrayU and knotArrayV are optional -- uniform knots are implied if they are omitted (undefined).
     * * When knots are given, two knot count conditions are recognized:
     *    * If poleArray.length + order == knotArray.length, the first and last are assumed to be the
     *      extraneous knots of classic clamping.
     *    * If poleArray.length + order == knotArray.length + 2, the knots are in modern form that does not have
     *      the classic unused first and last knot.
     * @param controlPointArray Array of [wx,wy,wz] points, ordered along the U direction.
     * @param weightArray array of weights, ordered along the U direction. If undefined, unit weights are installed.
     * @param numPolesU number of poles in each row in the U direction.
     * @param orderU order for the U direction polynomial (`order` is one more than the `degree`.  "cubic" polynomial is order 4.)
     * @param knotArrayU optional knots for the V direction.  See note above about knot counts.
     * @param numPolesV number of poles in each column in the V direction (the number of rows).
     * @param orderV order for the V direction polynomial (`order` is one more than the `degree`.  "cubic" polynomial is order 4.)
     * @param knotArrayV optional knots for the V direction.  See note above about knot counts.
     */
    static create(controlPointArray: Point3d[] | Float64Array, weightArray: number[] | Float64Array | undefined, numPolesU: number, orderU: number, knotArrayU: number[] | Float64Array | undefined, numPolesV: number, orderV: number, knotArrayV: number[] | Float64Array | undefined): BSplineSurface3dH | undefined;
    /**
     * Create a bspline surface with given knots.
     * * This `create` variant takes control points in a "grid" array, with the points from
     *   each grid row `[rowIndex]` being an independent array `points[rowIndex][indexAlongRow][x,y,z,w]`
     * * knotArrayU and knotArrayV are optional -- uniform knots are implied if they are omitted (undefined).
     * * When knots are given, two count conditions are recognized in each direction:
     *    * If poleArray.length + order == knotArray.length, the first and last are assumed to be the
     *      extraneous knots of classic clamping.
     *    * If poleArray.length + order == knotArray.length + 2, the knots are in modern form that does not have
     *      the classic unused first and last knot.
     * @param xyzwGrid Array of points, ordered along the U direction.
     * @param weightStyle how the points are weighted
     * @param orderU order for the U direction polynomial (`order` is one more than the `degree`.  "cubic" polynomial is order 4.)
     * @param knotArrayU knots for the V direction.  See note above about knot counts.
     * @param orderV order for the V direction polynomial (`order` is one more than the `degree`.  "cubic" polynomial is order 4.)
     * @param knotArrayV knots for the V direction.  See note above about knot counts.
     */
    static createGrid(xyzwGrid: number[][][], weightStyle: WeightStyle, orderU: number, knotArrayU: number[] | Float64Array | undefined, orderV: number, knotArrayV: number[] | Float64Array | undefined): BSplineSurface3dH | undefined;
    /** Return a deep clone */
    clone(): BSplineSurface3dH;
    /** Return a transformed clone */
    cloneTransformed(transform: Transform): BSplineSurface3dH;
    /**
      * Return control points json arrays.
      * * Each row of points is an an array.
      * * Within the array for each row, each point is an array [wx,wy,wz,w].
      */
    getPointGridJSON(): PackedPointGrid;
    /** Evaluate at a position given by a knot value. If deweight fails, returns 000. */
    knotToPoint4d(u: number, v: number, result?: Point4d): Point4d;
    /** Evaluate at a position given by a knot value.  */
    knotToPointAndDerivatives(u: number, v: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors;
    /** Evaluate the Point4d (leaving weights in the point) at given fractional coordinates. If deweight fails, returns 000. */
    fractionToPoint4d(fractionU: number, fractionV: number, result?: Point4d): Point4d;
    /**
     * Evaluate the surface and return the Cartesian point (weight = 1).
     * * If the surface XYZW point has weight 0, returns 000.
     * @param fractionU u direction fraction
     * @param fractionV v direction fraction
     * @param result optional result
     */
    fractionToPoint(fractionU: number, fractionV: number, result?: Point3d): Point3d;
    /**
   * * evaluate the surface and return the cartesian (weight = 1) point.
   * * if the surface XYZW point has weight0, returns point3d at 000.
   * @param knotU u direction knot
   * @param knotV v direction knot
   * @param result optional result
   */
    knotToPoint(knotU: number, knotV: number, result?: Point3d): Point3d;
    /**
     * evaluate the surface at u and v fractions.
     * @returns plane with origin at the surface point, direction vectors are derivatives in the u and v directions.
     * @param fractionU u coordinate, as a fraction of the knot range.
     * @param fractionV v coordinate, as a fraction of the knot range.
     * @param result optional pre-allocated object for return values.
     * @returns Returns point and derivative directions.
     */
    fractionToPointAndDerivatives(fractionU: number, fractionV: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors;
    /** Implementation of the UVSurface interface; allows `PolyfaceBuilder.addUVGridBody` to facet this B-spline surface. */
    uvFractionToPoint(u: number, v: number): Point3d;
    /** Implementation of the UVSurface interface; allows `PolyfaceBuilder.addUVGridBody` to facet this B-spline surface. */
    uvFractionToPointAndTangents(u: number, v: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors;
    /** test for identical counts and near-equal coordinates */
    isAlmostEqual(other: any): boolean;
    /** Test if all poles are in a plane */
    isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean;
    /** Second step of double dispatch:  call `handler.handleBSplineSurface3dH(this)` */
    dispatchToGeometryHandler(handler: GeometryHandler): any;
    /**
     * extend a range to include the (optionally transformed) points of this surface
     * @param rangeToExtend range that is updated to include this surface range
     * @param transform transform to apply to the surface points
     */
    extendRange(rangeToExtend: Range3d, transform?: Transform): void;
}
//# sourceMappingURL=BSplineSurface.d.ts.map