define(["exports","./AxisAlignedBoundingBox-8774439c","./Cartesian2-bd414876","./Cartesian3-e0307675","./Matrix4-4c545f70","./Check-741c5f3c","./defaultValue-81eec7ed","./IntersectionTests-80510c7b","./Plane-bc8b6777","./Transforms-5b829630"],(function(t,n,e,i,o,r,s,a,l,c){"use strict";const d=new o.Cartesian4;function p(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(p.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 f=new n.AxisAlignedBoundingBox;p.fromPoints=function(t,e){return new p(n.AxisAlignedBoundingBox.fromPoints(t,f).center,e)};const u=new a.Ray,h=new i.Cartesian3;p.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)}},p.prototype.projectPointsOntoPlane=function(t,n){s.defined(n)||(n=[]);let e=0;const i=t.length;for(let o=0;o