/** @packageDocumentation * @module CartesianGeometry */ import { Point2d, Vector2d } from "../../../geometry3d/Point2dVector2d"; import { XAndY } from "../../../geometry3d/XYZProps"; /** * Abstract base class for curves with an implicit 2d function. * * Curves in the class are required to have an implicit function f(x,y)=0. * * They MAY (but are not required to) implement a parametric evaluator radiansToPoint2d. * @internal */ export declare abstract class ImplicitCurve2d { /** * Return the implicit function value at xy, i.e, f(x,y). * @param xy point for evaluation. */ abstract functionValue(xy: XAndY): number; /** * Return the implicit function gradient at xy. * @param xy point for evaluation. */ abstract gradient(xy: XAndY): Vector2d; /** Map a gradient vector (du,dv) from its local frame to global. */ static gradientLocalToGlobal(du: number, dv: number, vectorU: Vector2d, vectorV: Vector2d): Vector2d; /** * Find all perpendiculars from space point to the curve. * Pass each in turn to the handler. * @param spacePoint the space point. * @handler the handler to receive all the points on the curve and radians where perpendicular happens. */ abstract emitPerpendiculars(spacePoint: Point2d, handler: (curvePoint: Point2d, radians: number | undefined) => any): any; /** * Call emitPerpendiculars. Return the closest of the perpendiculars. * * Return undefined if no perpendiculars are received. * @param spacePoint the space point. */ closestPoint(spacePoint: Point2d): Point2d | undefined; /** Return true if the item has degenerate defining data. */ abstract isDegenerate(): boolean; /** Return a clone of the curve. */ abstract clone(): ImplicitCurve2d; /** * OPTIONAL method to return a Point2d at given radians value. * * The default implementation returns undefined. * * Concrete classes that can be expressed as a function of radians should implement this. */ radiansToPoint2d(_radians: number): Point2d | undefined; /** * OPTIONAL method to return the tangent at given radians value. * * The default implementation returns undefined. * * Concrete classes that can be expressed as a function of radians should implement this. */ radiansToTangentVector2d(_radians: number): Vector2d | undefined; } /** * Carrier class containing: * * a point * * the curve to which the point is related. * @internal */ export declare class Point2dImplicitCurve2d { point: Point2d; curve: ImplicitCurve2d; /** * CAPTURE a point and curve. * @param point point member * @param curve curve member */ constructor(point: Point2d, curve: ImplicitCurve2d); } /** * Carrier class containing: * * a curve which is a subclass of ImplicitCurve2d * * an array of paired point and ImplicitCurve2d. * @internal */ export declare class ImplicitGeometryMarkup { curve: GeometryType; data: Point2dImplicitCurve2d[]; /** * Construct a new carrier. The data array is created empty. * @param curve curve to CAPTURE */ constructor(curve: GeometryType); /** * * Use the otherCurve's emitPerpendiculars method to examine all perpendiculars from spacePoint to the curve. * * For each such point, compute distance from bias point. * * Choose the one whose distance is closest to biasDistance. * * push the chosen point on the data array. * @param spacePoint point to project to otherCurve * @param otherCurve target curve for projection * @param referencePoint reference point for point selection * @param biasDistance preferred distance. */ appendClosePoint(spacePoint: Point2d, otherCurve: ImplicitCurve2d, referencePoint: XAndY, biasDistance: number): boolean; /** * Find closest points of an array of curves. * @param spacePoint point to project to otherCurve * @param referencePoint reference point for point selection * @param biasDistance preferred distance. * @param otherCurves array of curves to check. */ closePointsOfGeometry(spacePoint: Point2d, referencePoint: Point2d, biasRadius: number, otherCurves: ImplicitCurve2d[]): void; } //# sourceMappingURL=ImplicitCurve2d.d.ts.map