1.什么是Potree?用來干啥?
Potree 是基於 WebGL 的開源大規模點雲渲染器
是一套開源的系統,基於Three.js,對點雲數據進行了多尺度的管理,在數據傳輸和可視化上都做了優化。官網地址,簡單的說就是加載大規模電雲的。
2.怎么使用Potree。如何應用Potree到項目中
百度網盤示例自取,因為是HTML網頁要直接打開就得時候火狐瀏覽器並配置跨域,不然就直接丟到服務里面去。
鏈接: https://pan.baidu.com/s/1PWMOyU8WHfj7KZCPmXAM3Q 提取碼: 8a96 復制這段內容后打開百度網盤手機App,操作更方便哦
點開examples下的page.html,


隨意選取一個點雲即可查看效果
3。Potree中使用測距測面工具
var measuringTool = viewer.measuringTool; var profileTool = viewer.profileTool; var volumeTool = viewer.volumeTool;
1,角度計算
// measuringTool.startInsertion({ // 角度計算 // showDistances: false, // showAngles: true, // showArea: false, // closed: true, // maxMarkers: 3, // name: 'Angle' // }

2,位置獲取
// measuringTool.startInsertion({ // 位置獲取 // showDistances: false, // showAngles: false, // showCoordinates: true, // showArea: false, // closed: true, // maxMarkers: 1, // name: 'Point' // });

3.測距
// measuringTool.startInsertion({ // 測距 // showDistances: true, // showArea: false, // closed: false, // name: 'Distance' // });

4, 測高
// measuringTool.startInsertion({ // 測高
// showDistances: false,
// showHeight: true,
// showArea: false,
// closed: false,
// maxMarkers: 2,
// name: 'Height'
// });

5,畫圓
// measuringTool.startInsertion({ // 三點畫圓
// showDistances: false,
// showHeight: false,
// showArea: false,
// showCircle: true,
// showEdges: false,
// closed: false,
// maxMarkers: 3,
// name: 'Circle'
// });
// measuringTool.startInsertion({ // 弧度畫圓
// showDistances: false,
// showHeight: false,
// showArea: false,
// showCircle: false,
// showEdges: false,
// showAzimuth: true,
// closed: false,
// maxMarkers: 2,
// name: 'Azimuth'
// });

6,測面積
// measuringTool.startInsertion({ // 測面
// showDistances: true,
// showArea: true,
// closed: true,
// name: 'Area'
// });

7.畫路徑
profileTool.startInsertion(); // 路徑

8,清除所用元素
viewer.scene.removeAllMeasurements();
