mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
clang-format: Set column width to 140
* Set column width to 140 * Use c++20 * Remove redundant virtual
This commit is contained in:
@@ -23,8 +23,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivReservoirSurfaceIntersectionSourceInfo::RivReservoirSurfaceIntersectionSourceInfo(
|
||||
RivSurfaceIntersectionGeometryGenerator* geometryGenerator )
|
||||
RivReservoirSurfaceIntersectionSourceInfo::RivReservoirSurfaceIntersectionSourceInfo( RivSurfaceIntersectionGeometryGenerator* geometryGenerator )
|
||||
: m_intersectionGeometryGenerator( geometryGenerator )
|
||||
{
|
||||
CVF_ASSERT( m_intersectionGeometryGenerator.notNull() );
|
||||
|
||||
@@ -63,7 +63,7 @@ cvf::ref<caf::DisplayCoordTransform> displayCoordTransform( const RimIntersectio
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivSurfaceIntersectionGeometryGenerator::RivSurfaceIntersectionGeometryGenerator( RimSurfaceInView* surfInView,
|
||||
RivSurfaceIntersectionGeometryGenerator::RivSurfaceIntersectionGeometryGenerator( RimSurfaceInView* surfInView,
|
||||
const RivIntersectionHexGridInterface* grid )
|
||||
: m_surfaceInView( surfInView )
|
||||
, m_hexGrid( grid )
|
||||
@@ -104,8 +104,7 @@ public:
|
||||
if ( isFace( cellFaceForEachClippedTriangleEdge[triVxIdx] ) )
|
||||
{
|
||||
const RigFault* fault =
|
||||
m_hexGrid->findFaultFromCellIndexAndCellFace( globalCellIdx,
|
||||
(FaceType)cellFaceForEachClippedTriangleEdge[triVxIdx] );
|
||||
m_hexGrid->findFaultFromCellIndexAndCellFace( globalCellIdx, (FaceType)cellFaceForEachClippedTriangleEdge[triVxIdx] );
|
||||
if ( fault )
|
||||
{
|
||||
cvf::Vec3d highestVx = p0.z() > p1.z() ? p0 : p1;
|
||||
@@ -217,12 +216,11 @@ void RivSurfaceIntersectionGeometryGenerator::calculateArrays()
|
||||
m_hexGrid->cellCornerVertices( globalCellIdx, &cellCorners[0] );
|
||||
m_hexGrid->cellCornerIndices( globalCellIdx, &cornerIndices[0] );
|
||||
|
||||
int triangleCount =
|
||||
caf::HexGridIntersectionTools::planeHexIntersectionMCTet( plane,
|
||||
&cellCorners[0],
|
||||
&cornerIndices[0],
|
||||
&hexPlaneCutTriangleVxes,
|
||||
&cellFaceForEachTriangleEdge );
|
||||
int triangleCount = caf::HexGridIntersectionTools::planeHexIntersectionMCTet( plane,
|
||||
&cellCorners[0],
|
||||
&cornerIndices[0],
|
||||
&hexPlaneCutTriangleVxes,
|
||||
&cellFaceForEachTriangleEdge );
|
||||
|
||||
if ( triangleCount == 0 ) continue;
|
||||
|
||||
@@ -268,33 +266,18 @@ void RivSurfaceIntersectionGeometryGenerator::calculateArrays()
|
||||
|
||||
// Accumulate mesh lines
|
||||
|
||||
meshAcc.accumulateMeshLines( cellFaceForEachClippedTriangleEdge,
|
||||
triVxIdx + 0,
|
||||
globalCellIdx,
|
||||
point0,
|
||||
point1 );
|
||||
meshAcc.accumulateMeshLines( cellFaceForEachClippedTriangleEdge,
|
||||
triVxIdx + 1,
|
||||
globalCellIdx,
|
||||
point1,
|
||||
point2 );
|
||||
meshAcc.accumulateMeshLines( cellFaceForEachClippedTriangleEdge,
|
||||
triVxIdx + 2,
|
||||
globalCellIdx,
|
||||
point2,
|
||||
point0 );
|
||||
meshAcc.accumulateMeshLines( cellFaceForEachClippedTriangleEdge, triVxIdx + 0, globalCellIdx, point0, point1 );
|
||||
meshAcc.accumulateMeshLines( cellFaceForEachClippedTriangleEdge, triVxIdx + 1, globalCellIdx, point1, point2 );
|
||||
meshAcc.accumulateMeshLines( cellFaceForEachClippedTriangleEdge, triVxIdx + 2, globalCellIdx, point2, point0 );
|
||||
|
||||
// Mapping to cell index
|
||||
|
||||
m_triangleToCellIdxMap.push_back( globalCellIdx );
|
||||
|
||||
// Interpolation from nodes
|
||||
m_triVxToCellCornerWeights.emplace_back(
|
||||
RivIntersectionVertexWeights( cornerIndices, cornerWeights0 ) );
|
||||
m_triVxToCellCornerWeights.emplace_back(
|
||||
RivIntersectionVertexWeights( cornerIndices, cornerWeights1 ) );
|
||||
m_triVxToCellCornerWeights.emplace_back(
|
||||
RivIntersectionVertexWeights( cornerIndices, cornerWeights2 ) );
|
||||
m_triVxToCellCornerWeights.emplace_back( RivIntersectionVertexWeights( cornerIndices, cornerWeights0 ) );
|
||||
m_triVxToCellCornerWeights.emplace_back( RivIntersectionVertexWeights( cornerIndices, cornerWeights1 ) );
|
||||
m_triVxToCellCornerWeights.emplace_back( RivIntersectionVertexWeights( cornerIndices, cornerWeights2 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -364,8 +347,7 @@ cvf::ref<cvf::DrawableGeo> RivSurfaceIntersectionGeometryGenerator::createFaultM
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<std::pair<QString, cvf::Vec3d>>&
|
||||
RivSurfaceIntersectionGeometryGenerator::faultMeshLabelAndAnchorPositions()
|
||||
const std::vector<std::pair<QString, cvf::Vec3d>>& RivSurfaceIntersectionGeometryGenerator::faultMeshLabelAndAnchorPositions()
|
||||
{
|
||||
return m_faultMeshLabelAndAnchorPositions;
|
||||
}
|
||||
@@ -382,8 +364,7 @@ const std::vector<size_t>& RivSurfaceIntersectionGeometryGenerator::triangleToCe
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<RivIntersectionVertexWeights>&
|
||||
RivSurfaceIntersectionGeometryGenerator::triangleVxToCellCornerInterpolationWeights() const
|
||||
const std::vector<RivIntersectionVertexWeights>& RivSurfaceIntersectionGeometryGenerator::triangleVxToCellCornerInterpolationWeights() const
|
||||
{
|
||||
CVF_ASSERT( m_triangleVxes->size() );
|
||||
return m_triVxToCellCornerWeights;
|
||||
|
||||
@@ -55,7 +55,7 @@ RivSurfacePartMgr::RivSurfacePartMgr( RimSurfaceInView* surface )
|
||||
CVF_ASSERT( surface );
|
||||
|
||||
cvf::ref<RivIntersectionHexGridInterface> hexGrid = m_surfaceInView->createHexGridInterface();
|
||||
m_intersectionGenerator = new RivSurfaceIntersectionGeometryGenerator( m_surfaceInView, hexGrid.p() );
|
||||
m_intersectionGenerator = new RivSurfaceIntersectionGeometryGenerator( m_surfaceInView, hexGrid.p() );
|
||||
|
||||
m_intersectionFacesTextureCoords = new cvf::Vec2fArray;
|
||||
m_nativeTrianglesTextureCoords = new cvf::Vec2fArray;
|
||||
@@ -187,8 +187,7 @@ void RivSurfacePartMgr::updateNativeSurfaceColors()
|
||||
}
|
||||
else
|
||||
{
|
||||
caf::SurfaceEffectGenerator surfaceGenBehind( cvf::Color4f( m_surfaceInView->surface()->color() ),
|
||||
caf::PO_POS_LARGE );
|
||||
caf::SurfaceEffectGenerator surfaceGenBehind( cvf::Color4f( m_surfaceInView->surface()->color() ), caf::PO_POS_LARGE );
|
||||
|
||||
cvf::ref<cvf::Effect> effBehind = surfaceGenBehind.generateCachedEffect();
|
||||
if ( m_nativeTrianglesPart.notNull() )
|
||||
@@ -237,8 +236,7 @@ QString RivSurfacePartMgr::resultInfoText( Rim3dView* view, uint hitPart, cvf::V
|
||||
|
||||
if ( m_surfaceInView->surfaceResultDefinition()->isChecked() )
|
||||
{
|
||||
const auto& values =
|
||||
m_usedSurfaceData->propertyValues( m_surfaceInView->surfaceResultDefinition()->propertyName() );
|
||||
const auto& values = m_usedSurfaceData->propertyValues( m_surfaceInView->surfaceResultDefinition()->propertyName() );
|
||||
if ( values.empty() ) return "";
|
||||
|
||||
const auto& ind = m_usedSurfaceData->triangleIndices();
|
||||
@@ -260,11 +258,9 @@ QString RivSurfacePartMgr::resultInfoText( Rim3dView* view, uint hitPart, cvf::V
|
||||
double resultValue = -1.0;
|
||||
if ( vertIndex1 < values.size() ) resultValue = values[vertIndex1];
|
||||
if ( dist2 < dist1 && vertIndex2 < values.size() ) resultValue = values[vertIndex2];
|
||||
if ( ( dist3 < dist1 ) && ( dist3 < dist2 ) && vertIndex3 < values.size() )
|
||||
resultValue = values[vertIndex3];
|
||||
if ( ( dist3 < dist1 ) && ( dist3 < dist2 ) && vertIndex3 < values.size() ) resultValue = values[vertIndex3];
|
||||
|
||||
retval +=
|
||||
QString( "%1 : %2\n\n" ).arg( m_surfaceInView->surfaceResultDefinition()->propertyName() ).arg( resultValue );
|
||||
retval += QString( "%1 : %2\n\n" ).arg( m_surfaceInView->surfaceResultDefinition()->propertyName() ).arg( resultValue );
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
|
||||
@@ -61,7 +61,7 @@ private:
|
||||
cvf::ref<RivSurfaceIntersectionGeometryGenerator> m_intersectionGenerator;
|
||||
|
||||
caf::PdmPointer<RimSurfaceInView> m_surfaceInView;
|
||||
cvf::ref<RigSurface> m_usedSurfaceData; // Store the reference to the old data, to know when new data has arrived.
|
||||
cvf::ref<RigSurface> m_usedSurfaceData; // Store the reference to the old data, to know when new data has arrived.
|
||||
|
||||
cvf::ref<cvf::Part> m_nativeTrianglesPart;
|
||||
cvf::ref<cvf::Part> m_nativeMeshLinesPart;
|
||||
|
||||
Reference in New Issue
Block a user