You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
7 lines
1.8 KiB
7 lines
1.8 KiB
// All material copyright Esri, All Rights Reserved, unless otherwise specified. |
|
// See https://js.arcgis.com/4.30/esri/copyright.txt for details. |
|
//>>built |
|
define("exports ../core/mathUtils ../core/libs/gl-matrix-2/math/mat4 ../core/libs/gl-matrix-2/factories/mat4f64 ./vec32 ../core/libs/gl-matrix-2/factories/vec3f64 ../geometry/Extent ../geometry/projection/projectPointToVector ../geometry/projection/projectVectorToVector ../views/3d/support/cameraUtilsInternal".split(" "),function(k,p,t,q,l,m,E,u,v,w){function r(a,g,h,f=w.createDirectionUp()){const {direction:b,up:c}=f;t.fromZRotation(n,-p.deg2rad(g));t.rotateX(n,n,p.deg2rad(h));l.transformMat4(b, |
|
x,n);l.scale(b,b,-1);l.transformMat4(c,y,n);return f}function z(a,g,h,f){return w.directionToHeadingTilt(g,h,f,x,y)}function A(a,g,h,f){const b=r(a,h,f),c=m.create();l.scale(c,b.direction,-g);l.add(c,c,a);return{up:b.up,eye:c,heading:h,tilt:f}}function B(a){return p.rad2deg(a)}function C(a){return p.deg2rad(a)}function D(a,g,h,f,b){const c=a.renderSpatialReference;a=a.map&&a.spatialReference||g.spatialReference;u.projectPointToVector(g,d,c);u.projectPointToVector(g,e,c);d[0]-=h/2;e[0]+=h/2;d[1]-= |
|
f/2;e[1]+=f/2;v.projectVectorToVector(d,c,d,a);v.projectVectorToVector(e,c,e,a);b?(b.xmin=d[0],b.ymin=d[1],b.xmax=e[0],b.ymax=e[1],b.spatialReference=a):b=new E(d[0],d[1],e[0],e[1],a);return b}const y=m.fromValues(0,1,0),x=m.fromValues(0,0,1),n=q.create(),d=m.create(),e=m.create();q=Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:z,eyeForCenterWithHeadingTilt:A,eyeTiltToLookAtTilt:C,headingTiltToDirectionUp:r,lookAtTiltToEyeTilt:B,toExtent:D},Symbol.toStringTag,{value:"Module"})); |
|
k.cameraUtilsPlanar=q;k.directionToHeadingTilt=z;k.eyeForCenterWithHeadingTilt=A;k.eyeTiltToLookAtTilt=C;k.headingTiltToDirectionUp=r;k.lookAtTiltToEyeTilt=B;k.toExtent=D}); |