Skip bounding box check when drawing seismic outline, as it could go far above reservoir

This commit is contained in:
jonjenssen 2023-05-08 17:01:40 +02:00 committed by jonjenssen
parent 54e901b79b
commit 00e533ab10
4 changed files with 29 additions and 2 deletions

View File

@ -90,7 +90,10 @@ void RivPolylinePartMgr::buildPolylineParts( const caf::DisplayCoordTransform* d
auto linesInDomain = getPolylinesPointsInDomain( polylineDef.p() );
if ( !isPolylinesInBoundingBox( linesInDomain, boundingBox ) ) return;
if ( !polylineDef->skipBoundingBoxCheck() )
{
if ( !isPolylinesInBoundingBox( linesInDomain, boundingBox ) ) return;
}
auto linesInDisplay = transformPolylinesPointsToDisplay( linesInDomain, displayXf );

View File

@ -479,9 +479,13 @@ cvf::ref<RigPolyLinesData> RimSeismicSection::polyLinesData() const
if ( m_showSeismicOutline() && m_seismicData() != nullptr )
{
std::vector<cvf::Vec3d> outline = m_seismicData()->worldOutline();
auto outline = m_seismicData()->worldOutline();
if ( outline.size() == 8 )
{
// seismic bounding box could be all the way up to the sea surface,
// make sure to skip bounding box check in drawing code
pld->setSkipBoundingBoxCheck( true );
std::vector<cvf::Vec3d> box;
for ( auto i : { 4, 0, 1, 3, 2, 0 } )

View File

@ -28,6 +28,7 @@ RigPolyLinesData::RigPolyLinesData()
, m_lockToZPlane( false )
, m_lockedZValue( 0.0 )
, m_closePolyline( true )
, m_skipBoundingBoxCheck( false )
{
m_sphereColor.set( 200, 200, 200 );
m_lineColor.set( 200, 200, 200 );
@ -180,3 +181,19 @@ void RigPolyLinesData::setZPlaneLock( bool lockToZ, double lockZValue )
m_lockToZPlane = lockToZ;
m_lockedZValue = lockZValue;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigPolyLinesData::setSkipBoundingBoxCheck( bool skipCheck )
{
m_skipBoundingBoxCheck = skipCheck;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RigPolyLinesData::skipBoundingBoxCheck() const
{
return m_skipBoundingBoxCheck;
}

View File

@ -44,6 +44,7 @@ public:
void setLineAppearance( int lineThickness, cvf::Color3f color, bool closePolyline );
void setSphereAppearance( double radiusFactor, cvf::Color3f color );
void setZPlaneLock( bool lockToZ, double lockZValue );
void setSkipBoundingBoxCheck( bool skipCheck );
bool showLines() const;
bool showSpheres() const;
@ -54,6 +55,7 @@ public:
double sphereRadiusFactor() const;
double lockedZValue() const;
bool lockToZPlane() const;
bool skipBoundingBoxCheck() const;
private:
std::vector<std::vector<cvf::Vec3d>> m_polylines;
@ -61,6 +63,7 @@ private:
bool m_showLines;
int m_lineThickness;
bool m_closePolyline;
bool m_skipBoundingBoxCheck;
bool m_showSpheres;
double m_sphereRadiusFactor;