mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Update clang-format.yml (#10068)
* Update to clang-format-15 Removed two custom .clang-format files in subfolders of AppFwk * Fixes by clang-format
This commit is contained in:
@@ -67,7 +67,7 @@ RivExtrudedCurveIntersectionGeometryGenerator::RivExtrudedCurveIntersectionGeome
|
||||
std::vector<std::vector<cvf::Vec3d>>& polylines,
|
||||
const cvf::Vec3d& extrusionDirection,
|
||||
const RivIntersectionHexGridInterface* grid,
|
||||
bool isFlattened,
|
||||
bool isFlattened,
|
||||
const cvf::Vec3d& flattenedPolylineStartPoint )
|
||||
: m_intersection( crossSection )
|
||||
, m_polylines( polylines )
|
||||
|
@@ -419,7 +419,7 @@ void RivIntersectionResultsColoringTools::calculateElementBasedGeoMechTextureCoo
|
||||
void RivIntersectionResultsColoringTools::calculateGeoMechTensorXfTextureCoords( cvf::Vec2fArray* textureCoords,
|
||||
const cvf::Vec3fArray* triangelVertices,
|
||||
const std::vector<RivIntersectionVertexWeights>& vertexWeights,
|
||||
RigGeoMechCaseData* caseData,
|
||||
RigGeoMechCaseData* caseData,
|
||||
const RigFemResultAddress& resVarAddress,
|
||||
int partIdx,
|
||||
int timeStepIdx,
|
||||
@@ -486,9 +486,9 @@ void RivIntersectionResultsColoringTools::calculatePlaneAngleTextureCoords( cvf:
|
||||
// as plane
|
||||
// normal
|
||||
|
||||
float angle = cvf::Math::toDegrees( operation( sphCoord ) );
|
||||
cvf::Vec2f texCoord = ( angle != std::numeric_limits<float>::infinity() ) ? mapper->mapToTextureCoord( angle )
|
||||
: cvf::Vec2f( 0.0f, 1.0f );
|
||||
float angle = cvf::Math::toDegrees( operation( sphCoord ) );
|
||||
cvf::Vec2f texCoord = ( angle != std::numeric_limits<float>::infinity() ) ? mapper->mapToTextureCoord( angle )
|
||||
: cvf::Vec2f( 0.0f, 1.0f );
|
||||
rawPtr[triangleVxStartIdx + 0] = texCoord;
|
||||
rawPtr[triangleVxStartIdx + 1] = texCoord;
|
||||
rawPtr[triangleVxStartIdx + 2] = texCoord;
|
||||
|
@@ -266,8 +266,8 @@ bool Riv3dWellLogCurveGeometryGenerator::findClosestPointOnCurve( const cvf::Vec
|
||||
double distance = ( projectionOfGlobalIntersection - globalIntersection ).length();
|
||||
if ( distance < closestDistance )
|
||||
{
|
||||
*closestPoint = cvf::Vec3d( projectionOfGlobalIntersection );
|
||||
closestDistance = distance;
|
||||
*closestPoint = cvf::Vec3d( projectionOfGlobalIntersection );
|
||||
closestDistance = distance;
|
||||
*measuredDepthAtPoint = m_curveMeasuredDepths[i - 1] * ( 1.0 - clampedDistance ) + m_curveMeasuredDepths[i] * clampedDistance;
|
||||
*valueAtClosestPoint = m_curveValues[i - 1] * ( 1.0 - clampedDistance ) + m_curveValues[i] * clampedDistance;
|
||||
}
|
||||
|
@@ -552,7 +552,7 @@ cvf::ref<cvf::DrawableGeo>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RivContourMapProjectionPartMgr::lineOverlapsWithPreviousContourLevel( const cvf::Vec3d& lineCenter,
|
||||
bool RivContourMapProjectionPartMgr::lineOverlapsWithPreviousContourLevel( const cvf::Vec3d& lineCenter,
|
||||
const RimContourMapProjection::ContourPolygons* previousLevel ) const
|
||||
{
|
||||
const int64_t jump = 50;
|
||||
|
@@ -155,7 +155,8 @@ void RivElementVectorResultPartMgr::appendDynamicGeometryPartsToModel( cvf::Mode
|
||||
auto getFaceCenterAndNormal = [activeCellInfo, cells, arrowScaling, displayCordXf]( size_t globalCellIdx,
|
||||
cvf::StructGridInterface::FaceType faceType,
|
||||
cvf::Vec3d& faceCenter,
|
||||
cvf::Vec3d& faceNormal ) {
|
||||
cvf::Vec3d& faceNormal )
|
||||
{
|
||||
faceCenter = displayCordXf->transformToDisplayCoord( cells[globalCellIdx].faceCenter( faceType ) );
|
||||
cvf::Vec3d cellCenter = displayCordXf->transformToDisplayCoord( cells[globalCellIdx].center() );
|
||||
faceNormal = ( faceCenter - cellCenter ).getNormalized() * arrowScaling;
|
||||
@@ -320,7 +321,7 @@ void RivElementVectorResultPartMgr::appendDynamicGeometryPartsToModel( cvf::Mode
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<cvf::Part> RivElementVectorResultPartMgr::createPart( const RimElementVectorResult& result,
|
||||
cvf::ref<cvf::Part> RivElementVectorResultPartMgr::createPart( const RimElementVectorResult& result,
|
||||
const std::vector<ElementVectorResultVisualization>& tensorVisualizations ) const
|
||||
{
|
||||
std::vector<uint> shaftIndices;
|
||||
@@ -411,9 +412,9 @@ cvf::ref<cvf::Part> RivElementVectorResultPartMgr::createPart( const RimElementV
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivElementVectorResultPartMgr::createResultColorTextureCoords( cvf::Vec2fArray* textureCoords,
|
||||
void RivElementVectorResultPartMgr::createResultColorTextureCoords( cvf::Vec2fArray* textureCoords,
|
||||
const std::vector<ElementVectorResultVisualization>& elementVectorResultVisualizations,
|
||||
const cvf::ScalarMapper* mapper )
|
||||
const cvf::ScalarMapper* mapper )
|
||||
{
|
||||
CVF_ASSERT( textureCoords );
|
||||
CVF_ASSERT( mapper );
|
||||
|
@@ -85,7 +85,7 @@ private:
|
||||
|
||||
static cvf::ref<cvf::DrawableGeo> generateLine( const cvf::Vec3dArray* coords );
|
||||
static cvf::ref<cvf::DrawableGeo>
|
||||
generateExtrudedCylinder( double radius, size_t crossSectionNodeCount, const cvf::Vec3dArray* cylinderCenterCoords );
|
||||
generateExtrudedCylinder( double radius, size_t crossSectionNodeCount, const cvf::Vec3dArray* cylinderCenterCoords );
|
||||
static cvf::ref<cvf::DrawableGeo> generateVariableRadiusTube( size_t crossSectionNodeCount,
|
||||
const cvf::Vec3dArray* cylinderCenterCoords,
|
||||
const std::vector<double>& radii );
|
||||
|
@@ -167,7 +167,8 @@ void RivSimWellPipesPartMgr::buildWellPipeParts( const caf::DisplayCoordTransfor
|
||||
m_wellBranches.clear();
|
||||
m_flattenedBranchWellHeadOffsets.clear();
|
||||
|
||||
auto createSimWells = []( RimSimWellInView* simWellInView ) -> std::vector<SimulationWellCellBranch> {
|
||||
auto createSimWells = []( RimSimWellInView* simWellInView ) -> std::vector<SimulationWellCellBranch>
|
||||
{
|
||||
std::vector<SimulationWellCellBranch> simWellBranches;
|
||||
const RigSimWellData* simWellData = simWellInView->simWellData();
|
||||
if ( simWellData && simWellData->isMultiSegmentWell() )
|
||||
@@ -449,7 +450,8 @@ void RivSimWellPipesPartMgr::appendValvesGeo( const RimEclipseView*
|
||||
|
||||
RivPipeGeometryGenerator::tubeWithCenterLinePartsAndVariableWidth( &pbd.m_valveParts, displayCoords, radii, valveColor );
|
||||
|
||||
auto computeRotationAxisAndAngle = []( const cvf::Vec3f& direction ) {
|
||||
auto computeRotationAxisAndAngle = []( const cvf::Vec3f& direction )
|
||||
{
|
||||
// Compute upwards normal based on direction
|
||||
// Compute the rotation axis and angle between up vector and Z_AXIS
|
||||
|
||||
|
@@ -51,12 +51,12 @@ public:
|
||||
void appendDynamicGeometryPartsToModel( cvf::ModelBasicList* model, size_t frameIndex );
|
||||
|
||||
private:
|
||||
cvf::ref<cvf::Part> createArrowPart( const cvf::Vec3f& startPoint,
|
||||
const cvf::Vec3f& endPoint,
|
||||
float width,
|
||||
bool isProducer,
|
||||
const cvf::Color4f& arrowColor,
|
||||
bool enableLighting );
|
||||
cvf::ref<cvf::Part> createArrowPart( const cvf::Vec3f& startPoint,
|
||||
const cvf::Vec3f& endPoint,
|
||||
float width,
|
||||
bool isProducer,
|
||||
const cvf::Color4f& arrowColor,
|
||||
bool enableLighting );
|
||||
cvf::ref<cvf::DrawableGeo> createArrowGeometry( const cvf::Vec3f& startPoint, const cvf::Vec3f& endPoint, double width, bool useArrowEnd );
|
||||
|
||||
private:
|
||||
|
@@ -597,7 +597,7 @@ cvf::ref<cvf::Part> RivWellFracturePartMgr::createStimPlanElementColorSurfacePar
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
cvf::Mat4d fractureXf = m_rimFracture->transformMatrix();
|
||||
cvf::Mat4d fractureXf = m_rimFracture->transformMatrix();
|
||||
std::vector<cvf::Vec3f> nodeDisplayCoords = transformToFractureDisplayCoords( stimPlanMeshVertices, fractureXf, *displayCoordTransform );
|
||||
|
||||
std::vector<cvf::uint> triIndicesToInclude;
|
||||
|
@@ -78,7 +78,7 @@ private:
|
||||
|
||||
void appendFracturePerforationLengthParts( const RimEclipseView& activeView, cvf::ModelBasicList* model );
|
||||
|
||||
cvf::ref<cvf::Part> createStimPlanMeshPart( const RimEclipseView& activeView );
|
||||
cvf::ref<cvf::Part> createStimPlanMeshPart( const RimEclipseView& activeView );
|
||||
cvf::ref<cvf::DrawableGeo> createStimPlanMeshDrawable( RimMeshFractureTemplate* stimPlanFracTemplate, const RimEclipseView& activeView );
|
||||
|
||||
void createVisibleFracturePolygons( RimMeshFractureTemplate* stimPlanFracTemplate, const RimEclipseView& activeView );
|
||||
|
@@ -479,13 +479,13 @@ void RivWellPathPartMgr::appendPerforationValvesToModel( cvf::ModelBasicList*
|
||||
{
|
||||
measuredDepthsRelativeToStartMD = { 0.0, 1.0, 1.5, 4.0, 5.0, 5.5, 8.0, 9.0 };
|
||||
radii = { wellPathRadius,
|
||||
wellPathRadius * 1.8,
|
||||
wellPathRadius * 2.0,
|
||||
wellPathRadius * 2.0,
|
||||
wellPathRadius * 1.8,
|
||||
wellPathRadius * 1.7,
|
||||
wellPathRadius * 1.7,
|
||||
wellPathRadius };
|
||||
wellPathRadius * 1.8,
|
||||
wellPathRadius * 2.0,
|
||||
wellPathRadius * 2.0,
|
||||
wellPathRadius * 1.8,
|
||||
wellPathRadius * 1.7,
|
||||
wellPathRadius * 1.7,
|
||||
wellPathRadius };
|
||||
|
||||
double startMD = valve->startMD();
|
||||
std::vector<cvf::Vec3d> displayCoords;
|
||||
|
@@ -242,7 +242,7 @@ QString RivSurfacePartMgr::resultInfoText( Rim3dView* view, uint hitPart, cvf::V
|
||||
const auto& ind = m_usedSurfaceData->triangleIndices();
|
||||
const auto& vert = m_usedSurfaceData->vertices();
|
||||
|
||||
size_t indIndex = ( size_t )( hitPart * 3 );
|
||||
size_t indIndex = (size_t)( hitPart * 3 );
|
||||
|
||||
// find closest triangle corner point to hit point and show that value
|
||||
if ( ind.size() > ( indIndex + 2 ) )
|
||||
|
@@ -1,38 +1,38 @@
|
||||
//##################################################################################################
|
||||
// ##################################################################################################
|
||||
//
|
||||
// Custom Visualization Core library
|
||||
// Copyright (C) 2011-2013 Ceetron AS
|
||||
// Custom Visualization Core library
|
||||
// Copyright (C) 2011-2013 Ceetron AS
|
||||
//
|
||||
// This library may be used under the terms of either the GNU General Public License or
|
||||
// the GNU Lesser General Public License as follows:
|
||||
// This library may be used under the terms of either the GNU General Public License or
|
||||
// the GNU Lesser General Public License as follows:
|
||||
//
|
||||
// GNU General Public License Usage
|
||||
// This library 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.
|
||||
// GNU General Public License Usage
|
||||
// This library 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.
|
||||
//
|
||||
// This library 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.
|
||||
// This library 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.
|
||||
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
|
||||
// for more details.
|
||||
//
|
||||
// GNU Lesser General Public License Usage
|
||||
// This library is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation; either version 2.1 of the License, or
|
||||
// (at your option) any later version.
|
||||
// GNU Lesser General Public License Usage
|
||||
// This library is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation; either version 2.1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This library 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.
|
||||
// This library 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 Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
|
||||
// for more details.
|
||||
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
|
||||
// for more details.
|
||||
//
|
||||
//##################################################################################################
|
||||
// ##################################################################################################
|
||||
|
||||
#pragma once
|
||||
|
||||
|
Reference in New Issue
Block a user