File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -467,7 +467,7 @@ void TopoDataItem::assemblePipeline(TopoDataItem::Pipeline *pipeline) {
467467 pipeline->renderer_ ->AddActor (pipeline->axesActor_ );
468468 }
469469
470- pipeline->surfaceActor_ ->SetScale (1 ., 1 ., verticalExagg_); // NEW!
470+ pipeline->surfaceActor_ ->SetScale (1 ., 1 ., verticalExagg_);
471471 pipeline->interactorStyle_ ->SetDefaultRenderer (pipeline->renderer_ );
472472
473473 pipeline->windowInteractor_ ->SetPicker (pipeline->areaPicker_ );
@@ -743,3 +743,11 @@ double TopoDataItem::getLightIntensity() {
743743vtkPolyData *TopoDataItem::getPolyData () {
744744 return pipeline_->polyData_ ;
745745}
746+
747+
748+ void TopoDataItem::resetCamera () {
749+ qDebug () << " resetCamera()" ;
750+ pipeline_->renderer_ ->ResetCamera ();
751+ reassemblePipeline ();
752+ }
753+
Original file line number Diff line number Diff line change @@ -72,7 +72,10 @@ namespace mb_system {
7272 vtkNew<mb_system::TopoDataReader> topoReader_;
7373
7474 vtkNew<vtkElevationFilter> elevFilter_;
75+
76+ // / Used to compute slope
7577 vtkNew<vtkPolyDataNormals> normalsFilter_;
78+
7679 vtkNew<vtkIdFilter> idFilter_;
7780 vtkNew<vtkLookupTable> elevLookupTable_;
7881 vtkNew<vtkActor> surfaceActor_;
@@ -194,6 +197,10 @@ namespace mb_system {
194197 Q_INVOKABLE QString printMouseHelp () {
195198 return " Mouse help goes here" ;
196199 }
200+
201+ // / Reset camera, all actors in bounding box
202+ Q_INVOKABLE void resetCamera ();
203+
197204
198205 // / Set picked point
199206 void setPickedPoint (double *worldCoords);
You can’t perform that action at this time.
0 commit comments