add reset() functions to some measure tools
This commit is contained in:
parent
f44c830c09
commit
8816cdc669
@ -511,7 +511,7 @@ Potree.MeasuringTool = function(scene, camera, renderer){
|
||||
};
|
||||
|
||||
this.addMeasurement = function(measurement){
|
||||
this.sceneMeasurement.add(measurement);
|
||||
this.sceneMeasurement.add(measurxement);
|
||||
this.measurements.push(measurement);
|
||||
};
|
||||
|
||||
@ -523,6 +523,13 @@ Potree.MeasuringTool = function(scene, camera, renderer){
|
||||
}
|
||||
};
|
||||
|
||||
this.reset = function(){
|
||||
for(var i = this.measurements.length - 1; i >= 0; i--){
|
||||
var measurement = this.measurements[i];
|
||||
this.removeMeasurement(measurement);
|
||||
}
|
||||
};
|
||||
|
||||
this.update = function(){
|
||||
var measurements = [];
|
||||
for(var i = 0; i < this.measurements.length; i++){
|
||||
|
||||
@ -589,6 +589,13 @@ Potree.ProfileTool = function(scene, camera, renderer){
|
||||
this.dispatchEvent({"type": "profile_removed", profile: profile});
|
||||
}
|
||||
|
||||
this.reset = function(){
|
||||
for(var i = this.profiles.length - 1; i >= 0; i--){
|
||||
var profile = this.profiles[i];
|
||||
this.removeProfile(profile);
|
||||
}
|
||||
}
|
||||
|
||||
this.update = function(){
|
||||
|
||||
for(var i = 0; i < this.profiles.length; i++){
|
||||
|
||||
@ -359,6 +359,13 @@ Potree.VolumeTool = function(scene, camera, renderer){
|
||||
}
|
||||
};
|
||||
|
||||
this.reset = function(){
|
||||
for(var i = this.volumes.length - 1; i >= 0; i--){
|
||||
var volume = this.volumes[i];
|
||||
this.removeVolume(volume);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.render = function(){
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user