add reset() functions to some measure tools

This commit is contained in:
mschuetz 2015-05-04 15:51:28 +02:00
parent f44c830c09
commit 8816cdc669
3 changed files with 22 additions and 1 deletions

View File

@ -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++){

View File

@ -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++){

View File

@ -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(){