/** * Spatial region. */ export declare abstract class Region { /** * Returns true if the region contains the provided position. * @param position - The position to check. * @param margin - The outer margin value in non-scaled pixels. */ abstract contains(position: p5.Vector, margin?: number): boolean; /** * Constrains the provided position in the region. * @param position - The position to constrain. * @param margin - The outer margin value in non-scaled pixels. */ abstract constrain(position: p5.Vector, margin?: number): void; } /** * Rectangle-shaped spatial region. */ export declare class RectangleRegion extends Region { leftPositionX: number; topPositionY: number; rightPositionX: number; bottomPositionY: number; readonly width: number; readonly height: number; readonly area: number; constructor(x1: number, y1: number, x2: number, y2: number, margin?: number); contains(position: p5.Vector, margin?: number): boolean; constrain(position: p5.Vector, margin?: number): void; }