/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
 * @module Curve
 */
import { CurvePrimitive } from "../curve/CurvePrimitive";
/**
 * A ProxyCurve is expected to be used as a base class for curve types that use some existing curve (the proxy)
 * for evaluation and display but carry other defining data.
 * * The ProxyCurve implements all required CurvePrimitive methods by dispatching to the proxy.
 * * These methods presumably require support from the application class and are left abstract:
 *    * clone
 *    * curvePrimitiveType
 *    * isSameCurvePrimitiveType
 *    * isSameGeometryClass
 *    * tryTransformInPlace
 *    * reverseInPlace
 *
 * @public
 */
export class ProxyCurve extends CurvePrimitive {
    dispatchToGeometryHandler(handler) {
        return this._proxyCurve.dispatchToGeometryHandler(handler);
    }
    _proxyCurve;
    /** Constructor CAPTURES the proxyCurve pointer */
    constructor(proxyCurve) {
        super();
        this._proxyCurve = proxyCurve;
    }
    /** Return the (pointer to) the proxy curve. */
    get proxyCurve() {
        return this._proxyCurve;
    }
    /** Implement by proxyCurve */
    computeStrokeCountForOptions(options) {
        return this._proxyCurve.computeStrokeCountForOptions(options);
    }
    /** Implement by proxyCurve */
    emitStrokableParts(dest, options) {
        this._proxyCurve.emitStrokableParts(dest, options);
    }
    /** Return a transformed clone. */
    cloneTransformed(transform) {
        const myClone = this.clone();
        if (myClone.tryTransformInPlace(transform))
            return myClone;
        return undefined;
    }
    /** Implement by proxyCurve. Subclasses may eventually override this default implementation. */
    clonePartialCurve(fractionA, fractionB) {
        return this._proxyCurve.clonePartialCurve(fractionA, fractionB);
    }
    /** Implement by proxyCurve */
    emitStrokes(dest, options) {
        this._proxyCurve.emitStrokes(dest, options);
    }
    /** Implement by proxyCurve */
    extendRange(rangeToExtend, transform) {
        this._proxyCurve.extendRange(rangeToExtend, transform);
    }
    /** Implement by proxyCurve */
    range(transform, result) {
        return this._proxyCurve.range(transform, result);
    }
    /** Implement by proxyCurve */
    fractionToPoint(fraction, result) {
        return this._proxyCurve.fractionToPoint(fraction, result);
    }
    /** Implement by proxyCurve */
    fractionToPointAndDerivative(fraction, result) {
        return this._proxyCurve.fractionToPointAndDerivative(fraction, result);
    }
    /** Implement by proxyCurve */
    fractionToPointAnd2Derivatives(fraction, result) {
        return this._proxyCurve.fractionToPointAnd2Derivatives(fraction, result);
    }
    /** Implement by proxyCurve */
    isInPlane(plane) {
        return this._proxyCurve.isInPlane(plane);
    }
    /** Implement by proxyCurve */
    quickLength() {
        return this._proxyCurve.quickLength();
    }
    /** Implement by proxyCurve */
    constructOffsetXY(offsetDistanceOrOptions) {
        return this._proxyCurve.constructOffsetXY(offsetDistanceOrOptions);
    }
    /** Implement by proxyCurve */
    projectedParameterRange(ray, lowHigh) {
        return this._proxyCurve.projectedParameterRange(ray, lowHigh);
    }
}
//# sourceMappingURL=ProxyCurve.js.map