mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4849 Co-visualization: Simple use of the comparison view support in the Viewer classes
The feature is ready for testing.
This commit is contained in:
@@ -128,6 +128,31 @@ void RimViewManipulator::applySourceViewCameraOnDestinationViews( RimGridView*
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Vec3d RimViewManipulator::calculateEquivalentCamPosOffset( Rim3dView* sourceView, Rim3dView* destView )
|
||||
{
|
||||
cvf::Vec3d soffset = cvf::Vec3d::ZERO;
|
||||
RimCase* sourceOwnerCase = sourceView->ownerCase();
|
||||
if ( sourceOwnerCase )
|
||||
{
|
||||
soffset = sourceOwnerCase->displayModelOffset();
|
||||
soffset.z() *= sourceView->scaleZ();
|
||||
}
|
||||
|
||||
cvf::Vec3d doffset = cvf::Vec3d::ZERO;
|
||||
|
||||
RimCase* destinationOwnerCase = destView->ownerCase();
|
||||
if ( destinationOwnerCase )
|
||||
{
|
||||
doffset = destinationOwnerCase->displayModelOffset();
|
||||
doffset.z() *= sourceView->scaleZ();
|
||||
}
|
||||
|
||||
return soffset - doffset;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user