UNPKG

igniteui-react-core

Version:
34 lines (33 loc) 1.31 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { Base, markType } from "./type"; import { CollisionRect } from "./CollisionRect"; /** * @hidden */ export let CollisionGeometry = /*@__PURE__*/ (() => { class CollisionGeometry extends Base { e(a) { return this.collidesWith(new CollisionRect(0, a)); } collidesWith(a) { if (!this.boundingBox.intersectsWith(a)) { return false; } return this.d(a); } collidesWithPoint(a, b) { let c = new CollisionRect(1, a, b, 0, 0); if (!this.boundingBox.intersectsWith(c)) { return false; } return this.d(c); } } CollisionGeometry.$t = /*@__PURE__*/ markType(CollisionGeometry, 'CollisionGeometry'); return CollisionGeometry; })();