/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../../core/maybe","../../../../core/screenUtils","../../../../chunks/vec2","../../../../chunks/vec3","../../../../geometry/support/vectorStacks"],(function(e,r,n,t,o,c){"use strict";function s(e,r,t){return i(e,e.screenToRender(r,n.castRenderScreenPointArray3(c.sv3d.get())),t)}function i(e,s,i){const u=n.castRenderScreenPointArray3(t.copy(c.sv3d.get(),s));if(u[2]=0,!e.unprojectFromRenderScreen(u,i.origin))return null;const d=n.castRenderScreenPointArray3(t.copy(c.sv3d.get(),s));d[2]=1;const a=e.unprojectFromRenderScreen(d,c.sv3d.get());return r.isNone(a)?null:(o.subtract(i.direction,a,i.origin),i)}function u(e,r,t){return d(e,e.screenToRender(r,n.castRenderScreenPointArray3(c.sv3d.get())),t)}function d(e,n,t){o.copy(t.origin,e.eye);const s=o.set(c.sv3d.get(),n[0],n[1],1),i=e.unprojectFromRenderScreen(s,c.sv3d.get());return r.isNone(i)?null:(o.subtract(t.direction,i,t.origin),t)}e.fromRender=i,e.fromRenderAtEye=d,e.fromScreen=s,e.fromScreenAtEye=u,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
