|
@@ -28,8 +28,8 @@ let defaultMapProps = [{url: `//wprd04.is.autonavi.com/appmaptile?lang=zh_cn&siz
|
|
|
name:'高德textLayer'
|
|
|
}]
|
|
|
let cesAspect , cesImageryProvider, mapProps = defaultMapProps
|
|
|
-
|
|
|
-let cesMath = {
|
|
|
+ /*
|
|
|
+let Potree.math = {
|
|
|
fromCes(cartesian, getLonlat){
|
|
|
var cartographic = Cesium.Cartographic.fromCartesian(cartesian);
|
|
|
var lng = Cesium.Math.toDegrees(cartographic.longitude);
|
|
@@ -48,7 +48,7 @@ let cesMath = {
|
|
|
return cPos;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ */
|
|
|
const Id_noIntersect = -100 //path绘制在地图上的点,modelId传这个值,勿更改
|
|
|
let isValidPoint = (modelId)=>{//所存的modelId没被删或者它本身不在模型上
|
|
|
return modelId == Id_noIntersect || viewer.objs.children.concat(viewer.scene.pointclouds).some(e=>e.dataset_id == modelId )
|
|
@@ -525,7 +525,7 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
|
|
|
|
|
|
let sdk = Potree.sdk = {
|
|
|
sceneBus, mapBus,
|
|
|
- cesMath,
|
|
|
+
|
|
|
|
|
|
canTurnToPanoMode(pos, far=Potree.config.panoFieldRadius) {
|
|
|
pos = pos ? new THREE.Vector3().copy(pos) : viewer.images360.position
|
|
@@ -2523,7 +2523,7 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
|
|
|
return cPos;
|
|
|
}; */
|
|
|
|
|
|
- let cPos = cesMath.toCes(pPos);
|
|
|
+ let cPos = Potree.math.toCes(pPos);
|
|
|
|
|
|
|
|
|
|
|
@@ -2558,8 +2558,8 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
|
|
|
let pUp = new THREE.Vector3(0, 600, 0).applyMatrix4(camera.matrixWorld);
|
|
|
let pTarget = viewer.scene.view.getPivot();
|
|
|
|
|
|
- let cUpTarget = cesMath.toCes(pUp);
|
|
|
- let cTarget = cesMath.toCes(pTarget);
|
|
|
+ let cUpTarget = Potree.math.toCes(pUp);
|
|
|
+ let cTarget = Potree.math.toCes(pTarget);
|
|
|
|
|
|
let cDir = Cesium.Cartesian3.subtract(cTarget, cPos, new Cesium.Cartesian3());
|
|
|
let cUp = Cesium.Cartesian3.subtract(cUpTarget, cPos, new Cesium.Cartesian3());
|