|
@@ -80,10 +80,23 @@ var enter = ({
|
|
|
if(isTemp){
|
|
if(isTemp){
|
|
|
|
|
|
|
|
viewer.addEventListener('allLoaded',()=>{
|
|
viewer.addEventListener('allLoaded',()=>{
|
|
|
|
|
+
|
|
|
//Potree.settings.cloudAttributeName = 'color'
|
|
//Potree.settings.cloudAttributeName = 'color'
|
|
|
//viewer.scene.pointclouds[0].material.activeAttributeName = 'color'
|
|
//viewer.scene.pointclouds[0].material.activeAttributeName = 'color'
|
|
|
//pointcloud.material.color = '#ffffff'
|
|
//pointcloud.material.color = '#ffffff'
|
|
|
//viewer.scene.pointclouds[0].material.pointSizeType = 'FIXED'
|
|
//viewer.scene.pointclouds[0].material.pointSizeType = 'FIXED'
|
|
|
|
|
+
|
|
|
|
|
+ //旋转九十度
|
|
|
|
|
+ let pointcloud = viewer.scene.pointclouds[0]
|
|
|
|
|
+ pointcloud.orientationUser = new THREE.Quaternion().setFromEuler(new THREE.Euler( Math.PI/2, 0,0))
|
|
|
|
|
+ pointcloud.rotateMatrix = new THREE.Matrix4().makeRotationFromQuaternion(pointcloud.orientationUser)
|
|
|
|
|
+
|
|
|
|
|
+ pointcloud.transformMatrix = pointcloud.rotateMatrix.clone();//为该数据集的变化矩阵。 对应navvis的m2w_
|
|
|
|
|
+ pointcloud.transformInvMatrix.copy(pointcloud.transformMatrix).invert()
|
|
|
|
|
+
|
|
|
|
|
+ var pos1Matrix = new THREE.Matrix4().setPosition(pointcloud.position);//先移动到点云本身应该在的初始位置(在4dkk里和其他应用中都是在这个位置的,也能和漫游点对应上)
|
|
|
|
|
+ pointcloud.matrix = new THREE.Matrix4().multiplyMatrices(pointcloud.transformMatrix, pos1Matrix);
|
|
|
|
|
+ pointcloud.updateMatrixWorld(true)
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
}
|
|
}
|