UNPKG

romgrk-2d-geometry

Version:

Javascript library for 2d geometry

71 lines 2.34 kB
import DE9IM from "../data_structures/de9im"; /** * Returns true if shapes are topologically equal: their interiors intersect and * no part of the interior or boundary of one geometry intersects the exterior of the other * @param shape1 * @param shape2 * @returns {boolean} */ export declare function equal(shape1: any, shape2: any): boolean; /** * Returns true if shapes have at least one point in common, same as "not disjoint" * @param shape1 * @param shape2 * @returns {boolean} */ export declare function intersect(shape1: any, shape2: any): boolean; /** * Returns true if shapes have at least one point in common, but their interiors do not intersect * @param shape1 * @param shape2 * @returns {boolean} */ export declare function touch(shape1: any, shape2: any): boolean; /** * Returns true if shapes have no points in common neither in interior nor in boundary * @param shape1 * @param shape2 * @returns {boolean} */ export declare function disjoint(shape1: any, shape2: any): boolean; /** * Returns true shape1 lies in the interior of shape2 * @param shape1 * @param shape2 * @returns {boolean} */ export declare function inside(shape1: any, shape2: any): boolean; /** * Returns true if every point in shape1 lies in the interior or on the boundary of shape2 * @param shape1 * @param shape2 * @returns {boolean} */ export declare function covered(shape1: any, shape2: any): boolean; /** * Returns true shape1's interior contains shape2 <br/> * Same as inside(shape2, shape1) * @param shape1 * @param shape2 * @returns {boolean} */ export declare function contain(shape1: any, shape2: any): boolean; /** * Returns true shape1's cover shape2, same as shape2 covered by shape1 * @param shape1 * @param shape2 * @returns {boolean} */ export declare function cover(shape1: any, shape2: any): boolean; /** * Returns relation between two shapes as intersection 3x3 matrix, where each * element contains relevant intersection as array of shapes. * If there is no intersection, element contains empty array * If intersection is irrelevant it left undefined. (For example, intersection * between two exteriors is usually irrelevant) * @param shape1 * @param shape2 * @returns {DE9IM} */ export declare function relate(shape1: any, shape2: any): DE9IM; //# sourceMappingURL=relation.d.ts.map