mirror of https://github.com/CGAL/cgal
Merge pull request #5057 from maxGimeno/Demo-Fix_scene_scaling-maxGimeno
Polyhedron demo: Fix the scene scaling
This commit is contained in:
commit
f5ce2bdb09
|
|
@ -2030,6 +2030,7 @@ void Viewer::scaleScene()
|
|||
CGAL::qglviewer::Vec vmin(((float)bbox.xmin()+offset().x)*d->scaler.x(), ((float)bbox.ymin()+offset().y)*d->scaler.y(), ((float)bbox.zmin()+offset().z)*d->scaler.z()),
|
||||
vmax(((float)bbox.xmax()+offset().x)*d->scaler.x(), ((float)bbox.ymax()+offset().y)*d->scaler.y(), ((float)bbox.zmax()+offset().z)*d->scaler.z());
|
||||
camera()->setPivotPoint((vmin+vmax)*0.5);
|
||||
camera()->setSceneBoundingBox(vmin, vmax);
|
||||
camera()->fitBoundingBox(vmin, vmax);
|
||||
d->scene_scaling = !d->scene_scaling;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue