@thi.ng/geom
Version:
Functional, polymorphic API for 2D geometry types & SVG generation
29 lines • 822 B
TypeScript
import type { MultiFn2 } from "@thi.ng/defmulti";
import type { IShape } from "./api.js";
import type { ReadonlyVec } from "@thi.ng/vectors";
/**
* Returns true if point `p` is inside the given shape.
*
* @remarks
* Currently implemented for:
*
* - {@link AABB}
* - {@link Circle}
* - {@link ComplexPolygon}
* - {@link Group}
* - {@link Group3}
* - {@link Line} (if `p` is on line segment)
* - {@link Points} (i.e. if `p` is one of the points in the cloud)
* - {@link Points3} (same as w/ Points)
* - {@link Polygon}
* - {@link Polyline} (if `p` is on any of the line segments)
* - {@link Quad}
* - {@link Rect}
* - {@link Sphere}
* - {@link Triangle}
*
* @param shape
* @param p
*/
export declare const pointInside: MultiFn2<IShape, ReadonlyVec, boolean>;
//# sourceMappingURL=point-inside.d.ts.map