#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:
Jacob Støren
2019-10-11 09:47:30 +02:00
parent aee42f403b
commit b0f8dfa9e6
13 changed files with 523 additions and 178 deletions

View File

@@ -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;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------