mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 06:38:13 -05:00
#5576 Simulation wells: Add Fly to Object
This commit is contained in:
1 parent
49d74ce0e7
commit
587478cbd1
3 files changed
+47
-2
No files matched your search
@@ -79,6 +79,12 @@ void RicFlyToObjectFeature::onActionTriggered( bool isChecked )
|
||||
directionNormalToLargesExtent = cvf::Vec3d::Y_AXIS;
|
||||
}
|
||||
|
||||
double zExtent = fabs( bb.extent().z() ) * activeView->scaleZ();
|
||||
largesExtent = std::max( largesExtent, zExtent );
|
||||
|
||||
// Scale to make the object fit in view
|
||||
largesExtent *= 2.0;
|
||||
|
||||
cvf::Vec3d cameraEye = centerInDisplayCoords + directionNormalToLargesExtent * std::max( largesExtent, 30.0 );
|
||||
cvf::Vec3d cameraViewRefPoint = centerInDisplayCoords;
|
||||
cvf::Vec3d cameraUp = cvf::Vec3d::Z_AXIS;
|
||||
@@ -113,7 +119,11 @@ cvf::BoundingBox RicFlyToObjectFeature::boundingBoxForSelectedObjects()
|
||||
{
|
||||
if ( obj )
|
||||
{
|
||||
bb.add( obj->boundingBoxInDomainCoords() );
|
||||
auto candidate = obj->boundingBoxInDomainCoords();
|
||||
if ( candidate.isValid() )
|
||||
{
|
||||
bb.add( candidate );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user