mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-10 07:26:03 -06:00
#2162 Context menu: Remove const from RimIntersection pointer
This commit is contained in:
parent
8d99c99cb0
commit
58550817a0
@ -39,7 +39,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivIntersectionGeometryGenerator::RivIntersectionGeometryGenerator(const RimIntersection* crossSection,
|
||||
RivIntersectionGeometryGenerator::RivIntersectionGeometryGenerator( RimIntersection* crossSection,
|
||||
std::vector<std::vector<cvf::Vec3d> > &polylines,
|
||||
const cvf::Vec3d& extrusionDirection,
|
||||
const RivIntersectionHexGridInterface* grid)
|
||||
@ -280,7 +280,7 @@ cvf::ref<cvf::DrawableGeo> RivIntersectionGeometryGenerator::generateSurface()
|
||||
|
||||
CVF_ASSERT(m_triangleVxes.notNull());
|
||||
|
||||
if (m_triangleVxes->size() == 0) return NULL;
|
||||
if (m_triangleVxes->size() == 0) return nullptr;
|
||||
|
||||
cvf::ref<cvf::DrawableGeo> geo = new cvf::DrawableGeo;
|
||||
geo->setFromTriangleVertexArray(m_triangleVxes.p());
|
||||
@ -294,7 +294,7 @@ cvf::ref<cvf::DrawableGeo> RivIntersectionGeometryGenerator::generateSurface()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<cvf::DrawableGeo> RivIntersectionGeometryGenerator::createMeshDrawable()
|
||||
{
|
||||
if (!(m_cellBorderLineVxes.notNull() && m_cellBorderLineVxes->size() != 0)) return NULL;
|
||||
if (!(m_cellBorderLineVxes.notNull() && m_cellBorderLineVxes->size() != 0)) return nullptr;
|
||||
|
||||
cvf::ref<cvf::DrawableGeo> geo = new cvf::DrawableGeo;
|
||||
geo->setVertexArray(m_cellBorderLineVxes.p());
|
||||
@ -342,7 +342,7 @@ cvf::ref<cvf::DrawableGeo> RivIntersectionGeometryGenerator::createLineAlongPoly
|
||||
}
|
||||
}
|
||||
|
||||
if (vertices.size() == 0) return NULL;
|
||||
if (vertices.size() == 0) return nullptr;
|
||||
|
||||
cvf::ref<cvf::Vec3fArray> vx = new cvf::Vec3fArray;
|
||||
vx->assign(vertices);
|
||||
@ -386,7 +386,7 @@ cvf::ref<cvf::DrawableGeo> RivIntersectionGeometryGenerator::createPointsFromPol
|
||||
}
|
||||
}
|
||||
|
||||
if (vertices.size() == 0) return NULL;
|
||||
if (vertices.size() == 0) return nullptr;
|
||||
|
||||
cvf::ref<cvf::PrimitiveSetDirect> primSet = new cvf::PrimitiveSetDirect(cvf::PT_POINTS);
|
||||
primSet->setStartIndex(0);
|
||||
@ -458,7 +458,7 @@ const cvf::Vec3fArray* RivIntersectionGeometryGenerator::triangleVxes() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RimIntersection* RivIntersectionGeometryGenerator::crossSection() const
|
||||
RimIntersection* RivIntersectionGeometryGenerator::crossSection() const
|
||||
{
|
||||
return m_crossSection;
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ namespace cvf
|
||||
class RivIntersectionGeometryGenerator : public cvf::Object
|
||||
{
|
||||
public:
|
||||
RivIntersectionGeometryGenerator(const RimIntersection* crossSection,
|
||||
RivIntersectionGeometryGenerator(RimIntersection* crossSection,
|
||||
std::vector<std::vector<cvf::Vec3d> > &polylines,
|
||||
const cvf::Vec3d& extrusionDirection,
|
||||
const RivIntersectionHexGridInterface* grid );
|
||||
@ -70,7 +70,7 @@ public:
|
||||
const std::vector<RivIntersectionVertexWeights>& triangleVxToCellCornerInterpolationWeights() const;
|
||||
const cvf::Vec3fArray* triangleVxes() const;
|
||||
|
||||
const RimIntersection* crossSection() const;
|
||||
RimIntersection* crossSection() const;
|
||||
|
||||
private:
|
||||
void calculateArrays();
|
||||
@ -88,6 +88,6 @@ private:
|
||||
std::vector<size_t> m_triangleToCellIdxMap;
|
||||
std::vector<RivIntersectionVertexWeights> m_triVxToCellCornerWeights;
|
||||
|
||||
const RimIntersection* m_crossSection;
|
||||
RimIntersection* m_crossSection;
|
||||
};
|
||||
|
||||
|
@ -63,7 +63,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivIntersectionPartMgr::RivIntersectionPartMgr(const RimIntersection* rimCrossSection)
|
||||
RivIntersectionPartMgr::RivIntersectionPartMgr(RimIntersection* rimCrossSection)
|
||||
: m_rimCrossSection(rimCrossSection),
|
||||
m_defaultColor(cvf::Color3::WHITE)
|
||||
{
|
||||
@ -94,7 +94,7 @@ void RivIntersectionPartMgr::updateCellResultColor(size_t timeStepIndex)
|
||||
|
||||
if (!m_crossSectionGenerator->isAnyGeometryPresent()) return;
|
||||
|
||||
RimEclipseView* eclipseView;
|
||||
RimEclipseView* eclipseView = nullptr;
|
||||
m_rimCrossSection->firstAncestorOrThisOfType(eclipseView);
|
||||
|
||||
if (eclipseView)
|
||||
@ -455,8 +455,8 @@ void RivIntersectionPartMgr::createPolyLineParts(bool useBufferObjects)
|
||||
{
|
||||
// Highlight line
|
||||
|
||||
m_highlightLineAlongPolyline = NULL;
|
||||
m_highlightPointsForPolyline = NULL;
|
||||
m_highlightLineAlongPolyline = nullptr;
|
||||
m_highlightPointsForPolyline = nullptr;
|
||||
|
||||
if (m_rimCrossSection->type == RimIntersection::CS_POLYLINE || m_rimCrossSection->type == RimIntersection::CS_AZIMUTHLINE)
|
||||
{
|
||||
@ -763,6 +763,6 @@ cvf::ref<RivIntersectionHexGridInterface> RivIntersectionPartMgr::createHexGridI
|
||||
return new RivFemIntersectionGrid(femPart);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ class RivIntersectionVertexWeights;
|
||||
class RivIntersectionPartMgr : public cvf::Object
|
||||
{
|
||||
public:
|
||||
explicit RivIntersectionPartMgr(const RimIntersection* rimCrossSection);
|
||||
explicit RivIntersectionPartMgr(RimIntersection* rimCrossSection);
|
||||
|
||||
void applySingleColorEffect();
|
||||
void updateCellResultColor(size_t timeStepIndex);
|
||||
@ -103,7 +103,7 @@ public:
|
||||
cvf::ref<RivIntersectionHexGridInterface> createHexGridInterface();
|
||||
private:
|
||||
|
||||
const RimIntersection* m_rimCrossSection;
|
||||
RimIntersection* m_rimCrossSection;
|
||||
|
||||
cvf::Color3f m_defaultColor;
|
||||
|
||||
|
@ -57,7 +57,7 @@ std::array<cvf::Vec3f, 3> RivIntersectionSourceInfo::triangle(int triangleIdx) c
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RimIntersection* RivIntersectionSourceInfo::crossSection() const
|
||||
RimIntersection* RivIntersectionSourceInfo::crossSection() const
|
||||
{
|
||||
return m_crossSectionGeometryGenerator->crossSection();
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ public:
|
||||
|
||||
const std::vector<size_t>& triangleToCellIndex() const;
|
||||
std::array<cvf::Vec3f, 3> triangle(int triangleIdx) const;
|
||||
const RimIntersection* crossSection() const;
|
||||
RimIntersection* crossSection() const;
|
||||
|
||||
private:
|
||||
cvf::cref<RivIntersectionGeometryGenerator> m_crossSectionGeometryGenerator;
|
||||
|
Loading…
Reference in New Issue
Block a user