Add seismic result info in 3D view (#10032)

Add seismic result info in 3D view and selection in tree
This commit is contained in:
jonjenssen
2023-03-29 14:08:45 +02:00
committed by GitHub
parent 090293c421
commit 1299af401b
10 changed files with 187 additions and 3 deletions

View File

@@ -1,9 +1,11 @@
set(SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RivSeismicSectionPartMgr.h
${CMAKE_CURRENT_LIST_DIR}/RivSeismicSectionSourceInfo.h
)
set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RivSeismicSectionPartMgr.cpp
${CMAKE_CURRENT_LIST_DIR}/RivSeismicSectionSourceInfo.cpp
)
list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES})

View File

@@ -22,6 +22,7 @@
#include "RivPartPriority.h"
#include "RivPolylinePartMgr.h"
#include "RivSeismicSectionSourceInfo.h"
#include "Rim3dView.h"
#include "RimRegularLegendConfig.h"
@@ -106,6 +107,10 @@ void RivSeismicSectionPartMgr::appendGeometryPartsToModel( cvf::ModelBasicList*
}
cvf::ref<cvf::Part> quadPart = createSingleTexturedQuadPart( displayPoints, part.texture );
cvf::ref<RivSeismicSectionSourceInfo> si = new RivSeismicSectionSourceInfo( m_section, i );
quadPart->setSourceInfo( si.p() );
model->addPart( quadPart.p() );
}
}

View File

@@ -0,0 +1,46 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2023 Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RivSeismicSectionSourceInfo.h"
#include "RimSeismicSection.h"
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RivSeismicSectionSourceInfo::RivSeismicSectionSourceInfo( RimSeismicSection* section, int partIndex )
: m_section( section )
, m_partIndex( partIndex )
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSeismicSection* RivSeismicSectionSourceInfo::section() const
{
return m_section;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
int RivSeismicSectionSourceInfo::partIndex() const
{
return m_partIndex;
}

View File

@@ -0,0 +1,38 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2023 Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cafPdmPointer.h"
#include "cvfObject.h"
class RimSeismicSection;
class RivSeismicSectionSourceInfo : public cvf::Object
{
public:
RivSeismicSectionSourceInfo( RimSeismicSection* section, int partIndex );
RimSeismicSection* section() const;
int partIndex() const;
private:
caf::PdmPointer<RimSeismicSection> m_section;
int m_partIndex;
};