数字孪生Web 后台dt( digital twin)2.0版本 统一命名格式
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.
 
 
 
 
 

1 lines
1.6 KiB

define(["exports","./when-cbf8cd21","./Check-35e1a91d","./Math-6a1814d8","./Cartesian2-c451a606","./Transforms-e4be2a30"],function(n,i,a,e,c,l){"use strict";function C(n,a){this.normal=c.Cartesian3.clone(n),this.distance=a}C.fromPointNormal=function(n,a,e){var r=-c.Cartesian3.dot(a,n);return i.defined(e)?(c.Cartesian3.clone(a,e.normal),e.distance=r,e):new C(a,r)};var t=new c.Cartesian3;C.fromCartesian4=function(n,a){var e=c.Cartesian3.fromCartesian4(n,t),r=n.w;return i.defined(a)?(c.Cartesian3.clone(e,a.normal),a.distance=r,a):new C(e,r)},C.getPointDistance=function(n,a){return c.Cartesian3.dot(n.normal,a)+n.distance};var s=new c.Cartesian3;C.projectPointOntoPlane=function(n,a,e){i.defined(e)||(e=new c.Cartesian3);var r=C.getPointDistance(n,a),t=c.Cartesian3.multiplyByScalar(n.normal,r,s);return c.Cartesian3.subtract(a,t,e)};var d=new l.Matrix4,f=new l.Cartesian4,m=new c.Cartesian3;C.transform=function(n,a,e){var r=n.normal,t=n.distance,i=l.Matrix4.inverseTranspose(a,d),s=l.Cartesian4.fromElements(r.x,r.y,r.z,t,f);s=l.Matrix4.multiplyByVector(i,s,s);var o=c.Cartesian3.fromCartesian4(s,m);return s=l.Cartesian4.divideByScalar(s,c.Cartesian3.magnitude(o),s),C.fromCartesian4(s,e)},C.clone=function(n,a){return i.defined(a)?(c.Cartesian3.clone(n.normal,a.normal),a.distance=n.distance,a):new C(n.normal,n.distance)},C.equals=function(n,a){return n.distance===a.distance&&c.Cartesian3.equals(n.normal,a.normal)},C.ORIGIN_XY_PLANE=Object.freeze(new C(c.Cartesian3.UNIT_Z,0)),C.ORIGIN_YZ_PLANE=Object.freeze(new C(c.Cartesian3.UNIT_X,0)),C.ORIGIN_ZX_PLANE=Object.freeze(new C(c.Cartesian3.UNIT_Y,0)),n.Plane=C});