简体   繁体   English

Potree / three.js取消测量

[英]Potree/three.js cancel measurement

I'm using Potree ( https://github.com/potree/potree ) for the visualization of a massive point cloud. 我正在使用Potree( https://github.com/potree/potree )来可视化大规模点云。

I'm starting an area-measurement (Potree.MeasuringTool) which is normally stopped/accepted by a right-click. 我正在启动一个面积测量(Potree.MeasuringTool),通常通过右键单击可以停止/接受该测量。 I'd like to want it to stop at the click of a button. 我希望它在单击按钮时停止。 Can someone point me in the right direction which function to call? 有人可以指出正确的方向来调用哪个函数吗? I'm not that into javascript. 我不喜欢javascript。 Also, a simulation of a right-button click will be accepted by me, although it's maybe not the prettiest solution. 此外,我可能会接受对右键单击的模拟,尽管这可能不是最漂亮的解决方案。

没有事件:

viewer.measuringTool.sceneMeasurement.remove(viewer.measuringTool.sceneMeasurement.children[viewer.measuringTool.sceneMeasurement.children.length - 1]);

Tried every possible solution/function saying something about cancellation of a measurement. 尝试了每种可能的解决方案/功能,都说出了有关取消测量的内容。 Found out this was just what I needed in potree.js; 发现这正是我在potree.js中需要的;

viewer.dispatchEvent({
    type: "cancel_insertions"
    });

Of course, this is only applicable if the measurement is still active. 当然,这仅在测量仍处于活动状态时适用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM