/** @packageDocumentation * @module Curve */ import { IStrokeHandler } from "../../geometry3d/GeometryHandler"; import { Point3d, Vector3d } from "../../geometry3d/Point3dVector3d"; import { NewtonRtoRStrokeHandler } from "../../numerics/Newton"; import { CurveLocationDetail } from "../CurveLocationDetail"; import { CurvePrimitive, TangentOptions } from "../CurvePrimitive"; /** * Context for searching for the tangent(s) to a CurvePrimitive. * @internal */ export declare class AnnounceTangentStrokeHandler extends NewtonRtoRStrokeHandler implements IStrokeHandler { private _curve; private _announceTangent; private _spacePoint; private _vectorToEye; private _distanceTol; private _distanceTolSquared; private _fractionA; private _functionA; private _fractionB; private _functionB; private _numThisCurve; private _fractionMRU?; private _curveMRU?; private _workRay; private _workDetail?; private _newtonSolver; /** Constructor */ constructor(spacePoint: Point3d, announceTangent: (tangent: CurveLocationDetail) => any, options?: TangentOptions); /** Specified by IStrokeHandler. */ needPrimaryGeometryForStrokes(): boolean; /** Specified by IStrokeHandler. */ startCurvePrimitive(curve: CurvePrimitive | undefined): void; /** Specified by IStrokeHandler. */ endCurvePrimitive(): void; /** Specified by IStrokeHandler. */ announceIntervalForUniformStepStrokes(cp: CurvePrimitive, numStrokes: number, fraction0: number, fraction1: number): void; private announceCandidate; /** Specified by IStrokeHandler. */ announceSegmentInterval(cp: CurvePrimitive, point0: Point3d, point1: Point3d, _numStrokes: number, fraction0: number, fraction1: number): void; /** * Given a function `f` and (unordered) fractions `a` and `b`, search for and announce a root of `f` in this * fractional interval. * * This method searches for a root of `f` if and only if the stroke segment defined by `(a, f(a))` and * `(b, f(b))` has a root. This is a HEURISTIC: given continuous `f` between `a` and `b`, a root of the stroke * segment implies a root of `f`, but not vice-versa. Therefore, if the strokes are not sufficiently dense, * this method can miss a root of `f`. */ private searchInterval; private announceSolutionFraction; /** * Evaluate the univariate real-valued function for which we are finding roots. * * For finding the tangents to curve `X` from point `Q` as seen in a view plane with normal `N`, this * function is `f(t) := (Q - X(t)) dot (X'(t) cross N)`. The second vector in the dot product defines a * _tangent plane_ at `X(t)`. * * Either `pointAndDerivative` must be defined, or both `fraction` and `curve`. * @param pointAndDerivative pre-evaluated curve * @param fraction fraction at which to evaluate `curve` * @param curve curve to evaluate at `fraction` * @returns distance of `Q` from the tangent plane at `X(t)`. */ private evaluateFunction; /** Specified by NewtonRtoRStrokeHandler. */ evaluate(fraction: number): boolean; private announceRay; /** Specified by IStrokeHandler. */ announcePointTangent(_point: Point3d, _fraction: number, _tangent: Vector3d): void; } //# sourceMappingURL=AnnounceTangentStrokeHandler.d.ts.map