define(["exports","./AxisAlignedBoundingBox-8b0fdc16","./Matrix2-47e98d76","./RuntimeError-8952249c","./defaultValue-81eec7ed","./IntersectionTests-bc78300e","./Plane-3f01019d","./Transforms-08771371"],(function(t,n,e,i,o,r,s,a){"use strict";const l=new e.Cartesian4;function c(t,n){t=(n=o.defaultValue(n,e.Ellipsoid.WGS84)).scaleToGeodeticSurface(t);const i=a.Transforms.eastNorthUpToFixedFrame(t,n);this._ellipsoid=n,this._origin=t,this._xAxis=e.Cartesian3.fromCartesian4(e.Matrix4.getColumn(i,0,l)),this._yAxis=e.Cartesian3.fromCartesian4(e.Matrix4.getColumn(i,1,l));const r=e.Cartesian3.fromCartesian4(e.Matrix4.getColumn(i,2,l));this._plane=s.Plane.fromPointNormal(t,r)}Object.defineProperties(c.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 d=new n.AxisAlignedBoundingBox;c.fromPoints=function(t,e){return new c(n.AxisAlignedBoundingBox.fromPoints(t,d).center,e)};const p=new r.Ray,u=new e.Cartesian3;c.prototype.projectPointOntoPlane=function(t,n){const i=p;i.origin=t,e.Cartesian3.normalize(t,i.direction);let s=r.IntersectionTests.rayPlane(i,this._plane,u);if(o.defined(s)||(e.Cartesian3.negate(i.direction,i.direction),s=r.IntersectionTests.rayPlane(i,this._plane,u)),o.defined(s)){const t=e.Cartesian3.subtract(s,this._origin,s),i=e.Cartesian3.dot(this._xAxis,t),r=e.Cartesian3.dot(this._yAxis,t);return o.defined(n)?(n.x=i,n.y=r,n):new e.Cartesian2(i,r)}},c.prototype.projectPointsOntoPlane=function(t,n){o.defined(n)||(n=[]);let e=0;const i=t.length;for(let r=0;r