define(["exports","./AxisAlignedBoundingBox-37250ed6","./Matrix2-e3fb4559","./Cartesian3-7e9cc2ff","./Matrix4-d34187af","./Check-741c5f3c","./defaultValue-81eec7ed","./IntersectionTests-73b87d72","./Plane-4f75b3df","./Transforms-98ffa11d"],(function(t,n,e,i,o,r,s,a,l,c){"use strict";const d=new o.Cartesian4;function f(t,n){t=(n=s.defaultValue(n,e.Ellipsoid.WGS84)).scaleToGeodeticSurface(t);const r=c.Transforms.eastNorthUpToFixedFrame(t,n);this._ellipsoid=n,this._origin=t,this._xAxis=i.Cartesian3.fromCartesian4(o.Matrix4.getColumn(r,0,d)),this._yAxis=i.Cartesian3.fromCartesian4(o.Matrix4.getColumn(r,1,d));const a=i.Cartesian3.fromCartesian4(o.Matrix4.getColumn(r,2,d));this._plane=l.Plane.fromPointNormal(t,a)}Object.defineProperties(f.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});const p=new n.AxisAlignedBoundingBox;f.fromPoints=function(t,e){return new f(n.AxisAlignedBoundingBox.fromPoints(t,p).center,e)};const u=new a.Ray,h=new i.Cartesian3;f.prototype.projectPointOntoPlane=function(t,n){const o=u;o.origin=t,i.Cartesian3.normalize(t,o.direction);let r=a.IntersectionTests.rayPlane(o,this._plane,h);if(s.defined(r)||(i.Cartesian3.negate(o.direction,o.direction),r=a.IntersectionTests.rayPlane(o,this._plane,h)),s.defined(r)){const t=i.Cartesian3.subtract(r,this._origin,r),o=i.Cartesian3.dot(this._xAxis,t),a=i.Cartesian3.dot(this._yAxis,t);return s.defined(n)?(n.x=o,n.y=a,n):new e.Cartesian2(o,a)}},f.prototype.projectPointsOntoPlane=function(t,n){s.defined(n)||(n=[]);let e=0;const i=t.length;for(let o=0;o