mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4683 clang-format on all files in ApplicationCode
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017 Statoil 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>
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -34,45 +34,43 @@
|
||||
#include "cvfPart.h"
|
||||
#include "cvfTransform.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivFishbonesSubsPartMgr::RivFishbonesSubsPartMgr(RimFishbonesMultipleSubs* subs)
|
||||
: m_rimFishbonesSubs(subs)
|
||||
RivFishbonesSubsPartMgr::RivFishbonesSubsPartMgr( RimFishbonesMultipleSubs* subs )
|
||||
: m_rimFishbonesSubs( subs )
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivFishbonesSubsPartMgr::~RivFishbonesSubsPartMgr()
|
||||
{
|
||||
|
||||
}
|
||||
RivFishbonesSubsPartMgr::~RivFishbonesSubsPartMgr() {}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivFishbonesSubsPartMgr::appendGeometryPartsToModel(cvf::ModelBasicList* model, const caf::DisplayCoordTransform* displayCoordTransform, double characteristicCellSize)
|
||||
void RivFishbonesSubsPartMgr::appendGeometryPartsToModel( cvf::ModelBasicList* model,
|
||||
const caf::DisplayCoordTransform* displayCoordTransform,
|
||||
double characteristicCellSize )
|
||||
{
|
||||
clearGeometryCache();
|
||||
|
||||
if (!m_rimFishbonesSubs->isActive()) return;
|
||||
if ( !m_rimFishbonesSubs->isActive() ) return;
|
||||
|
||||
if (m_parts.size() == 0)
|
||||
if ( m_parts.size() == 0 )
|
||||
{
|
||||
buildParts(displayCoordTransform, characteristicCellSize);
|
||||
buildParts( displayCoordTransform, characteristicCellSize );
|
||||
}
|
||||
|
||||
for (auto part : m_parts)
|
||||
for ( auto part : m_parts )
|
||||
{
|
||||
model->addPart(part.p());
|
||||
model->addPart( part.p() );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivFishbonesSubsPartMgr::clearGeometryCache()
|
||||
{
|
||||
@@ -80,31 +78,35 @@ void RivFishbonesSubsPartMgr::clearGeometryCache()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivFishbonesSubsPartMgr::buildParts(const caf::DisplayCoordTransform* displayCoordTransform, double characteristicCellSize)
|
||||
void RivFishbonesSubsPartMgr::buildParts( const caf::DisplayCoordTransform* displayCoordTransform,
|
||||
double characteristicCellSize )
|
||||
{
|
||||
RimWellPath* wellPath = nullptr;
|
||||
m_rimFishbonesSubs->firstAncestorOrThisOfTypeAsserted(wellPath);
|
||||
m_rimFishbonesSubs->firstAncestorOrThisOfTypeAsserted( wellPath );
|
||||
|
||||
RivPipeGeometryGenerator geoGenerator;
|
||||
|
||||
for (auto& sub : m_rimFishbonesSubs->installedLateralIndices())
|
||||
for ( auto& sub : m_rimFishbonesSubs->installedLateralIndices() )
|
||||
{
|
||||
for (size_t lateralIndex : sub.lateralIndices)
|
||||
for ( size_t lateralIndex : sub.lateralIndices )
|
||||
{
|
||||
std::vector<cvf::Vec3d> lateralDomainCoords = m_rimFishbonesSubs->coordsForLateral(sub.subIndex, lateralIndex);
|
||||
std::vector<cvf::Vec3d> lateralDomainCoords = m_rimFishbonesSubs->coordsForLateral( sub.subIndex,
|
||||
lateralIndex );
|
||||
|
||||
std::vector<cvf::Vec3d> displayCoords = displayCoordTransform->transformToDisplayCoords(lateralDomainCoords);
|
||||
std::vector<cvf::Vec3d> displayCoords = displayCoordTransform->transformToDisplayCoords( lateralDomainCoords );
|
||||
|
||||
geoGenerator.cylinderWithCenterLineParts(&m_parts, displayCoords, m_rimFishbonesSubs->fishbonesColor(), wellPath->combinedScaleFactor() * characteristicCellSize * 0.5);
|
||||
geoGenerator.cylinderWithCenterLineParts( &m_parts,
|
||||
displayCoords,
|
||||
m_rimFishbonesSubs->fishbonesColor(),
|
||||
wellPath->combinedScaleFactor() * characteristicCellSize * 0.5 );
|
||||
}
|
||||
}
|
||||
|
||||
cvf::ref<RivObjectSourceInfo> objectSourceInfo = new RivObjectSourceInfo(m_rimFishbonesSubs);
|
||||
for (auto part : m_parts)
|
||||
cvf::ref<RivObjectSourceInfo> objectSourceInfo = new RivObjectSourceInfo( m_rimFishbonesSubs );
|
||||
for ( auto part : m_parts )
|
||||
{
|
||||
part->setSourceInfo(objectSourceInfo.p());
|
||||
part->setSourceInfo( objectSourceInfo.p() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user