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