/** @packageDocumentation * @module CartesianGeometry */ import { Point2d, Vector2d } from "../../../geometry3d/Point2dVector2d"; import { ImplicitCurve2d } from "./ImplicitCurve2d"; import { XAndY } from "../../../geometry3d/XYZProps"; /** * An UnboundedLine2dByPointAndNormal represents an infinite line by a single point on the line and a normal vector. * * The normal vector is NOT required to be a unit (normalized) vector. * * Use method `cloneNormalizedFromOrigin` to create a line with unit normal. * @internal */ export declare class UnboundedLine2dByPointAndNormal extends ImplicitCurve2d { /** The Cartesian coordinates of any point on the line. */ point: Point2d; /** The vector perpendicular to the line */ normal: Vector2d; private constructor(); /** Return a clone of this line. */ clone(): UnboundedLine2dByPointAndNormal; /** * Create an UnboundedLine2dByPointAndNormal from XY parts of a point on the line and the normal vector. * @param pointX x coordinate of a reference point on the line * @param pointY y coordinate of the reference point * @param normalX x component of normal vector * @param normalY y component of normal vector * @returns new line object. */ static createPointXYNormalXY(pointX: number, pointY: number, normalX: number, normalY: number): UnboundedLine2dByPointAndNormal | undefined; /** * Create an UnboundedLine2dByPointAndNormal from a point on the line and a normal vector. * * The xy data from the inputs is copied to the line. * * i.e. the inputs are NOT captured. * @param point any point on the line * @param normal the normal vector * @returns new line object. */ static createPointNormal(point: Point2d, normal: Vector2d): UnboundedLine2dByPointAndNormal; /** * Create an UnboundedLine2dByPointAndNormal from XY parts of a point on the line and a vector along the line * @param pointX x coordinate of a reference point on the line * @param pointY y coordinate of the reference point * @param directionX x component of the vector along the line * @param directionY y component of the vector along the line * @returns new line object or undefined. */ static createPointXYDirectionXY(pointX: number, pointY: number, directionX: number, directionY: number): UnboundedLine2dByPointAndNormal | undefined; /** * Create an UnboundedLine2dByPointAndNormal from XY parts of two points on the line. * * The nominal origin is at pointA. * * The line direction is from pointA to pointB, converted to a normal by createPointXYDirectionXY. * @param pointAX x coordinate of first point on the line * @param pointAY y coordinate of first point on the line * @param pointBX x coordinate of second point on the line * @param pointBY y component of second point on the line * @returns new line object or undefined. */ static createPointXYPointXY(pointAX: number, pointAY: number, pointBX: number, pointBY: number): UnboundedLine2dByPointAndNormal | undefined; /** * Create an UnboundedLine2dByPointAndNormal from two points on the line. * @param pointA first point on the line * @param pointB second point on the line * @returns new line object or undefined. */ static createPointPoint(pointA: XAndY, pointB: XAndY): UnboundedLine2dByPointAndNormal | undefined; /** Return true if the normal vector has zero length. */ isDegenerate(): boolean; /** * Return the implicit function value at xy. * @param xy space point for evaluation * @returns dot product of the line normal with the vector from the line's point to the space point. */ functionValue(xy: XAndY): number; /** * Returns gradient of the implicit function. * @param xy space point * @returns unit normal of the line. */ gradient(_xy: XAndY): Vector2d; /** Returns a vector along the line, i.e., rotated 90 degrees from the normal vector, with normal to the left. */ vectorAlongLine(): Vector2d; /** * Rotate the line normal by 90 degrees counterclockwise and normalize it * @returns the unit vector, or undefined if the normal is zero length. */ unitVectorAlongLine(): Vector2d | undefined; /** * Return unit vector for the line normal. * @returns the unit vector, or undefined if the normal is zero length. */ unitNormal(): Vector2d | undefined; /** * Drop a perpendicular from spacePoint to the line. Emit that point to the handler. * @param spacePoint the space point to be projected. * @handler the handler to receive the projection point. */ emitPerpendiculars(spacePoint: Point2d, handler: (curvePoint: Point2d, radians: number | undefined) => any): any; /** * Return a new implicit line with its reference point given relative to newOrigin, and its perpendicular vector normalized. * @return undefined if perpendicular vector has zero length. * @param newOrigin origin coordinates to subtract from existing origin. */ cloneNormalizedFromOrigin(newOrigin?: Point2d): UnboundedLine2dByPointAndNormal | undefined; /** * Return a new implicit line with given origin and unit normal based on this. * * WARNING: Beware of confusing related function cloneNormalizedFromOrigin, which has different origin logic. * @return undefined if perpendicular vector has zero length. */ cloneNormalizedWithOrigin(newOrigin?: Point2d): UnboundedLine2dByPointAndNormal | undefined; /** * Return a new implicit line with its reference point shifted by given multiple of its normal vector. * * The shift is applied to the point, and the normal copied unchanged-- no normalization or test for zero. * @param shiftFactor multiplier for normal. * @return shifted line */ cloneShifted(shiftFactor: number): UnboundedLine2dByPointAndNormal | undefined; /** * Compute the intersection of two lines. * * Each can be offset. * * Offsets are in units of the dot products with normal vectors. * * If normal vectors are unit vectors, the offsets are simple distance. * * Otherwise the offset scaling is scaled --- use carefully. * @param other the other line. * @param thisOffset target function value for dot products with this line * @param otherOffset target function value for dot products with other line */ intersectUnboundedLine2dByPointAndNormalWithOffsets(other: UnboundedLine2dByPointAndNormal, thisOffset?: number, otherOffset?: number): Point2d | undefined; } //# sourceMappingURL=UnboundedLine2d.d.ts.map