igniteui-react-core
Version:
Ignite UI React Core.
69 lines (68 loc) • 2.48 kB
JavaScript
/*
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 { __extends } from "tslib";
import { Base, markType } from "./type";
import { Rect } from "./Rect";
/**
* @hidden
*/
var QuadTreeBoundingBox = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(QuadTreeBoundingBox, _super);
function QuadTreeBoundingBox() {
var _this = _super.call(this) || this;
_this.d = 0;
_this.e = 0;
_this.g = 0;
_this.f = 0;
_this.i = null;
return _this;
}
QuadTreeBoundingBox.prototype.c = function (a) {
if (this.d + this.g < a.d - a.g || this.e + this.f < a.e - a.f || this.d - this.g > a.d + a.g || this.e - this.f > a.e + a.f) {
return false;
}
return true;
};
QuadTreeBoundingBox.prototype.h = function (a) {
var b = this.d - this.g;
var c = this.e - this.f;
var d = this.d + this.g;
var e = this.e + this.f;
var f = a.d - a.g;
var g = a.e - a.f;
var h = a.d + a.g;
var i = a.e + a.f;
var j = Math.max(b, f);
var k = Math.min(d, h);
var l = Math.max(c, g);
var m = Math.min(e, i);
return (k - j) * (m - l);
};
QuadTreeBoundingBox.b = function (a) {
var b = new QuadTreeBoundingBox();
b.d = a.left + a.width / 2;
b.e = a.top + a.height / 2;
b.f = a.height / 2;
b.g = a.width / 2;
return b;
};
QuadTreeBoundingBox.a = function (a) {
var b = new QuadTreeBoundingBox();
b.d = a.left + a.width / 2;
b.e = a.top + a.height / 2;
b.f = a.height / 2;
b.g = a.width / 2;
return b;
};
QuadTreeBoundingBox.prototype.j = function () {
var a = new Rect(0, this.d - this.g, this.e - this.f, this.g + this.g, this.f + this.f);
return a;
};
QuadTreeBoundingBox.$t = markType(QuadTreeBoundingBox, 'QuadTreeBoundingBox');
return QuadTreeBoundingBox;
}(Base));
export { QuadTreeBoundingBox };