#2162 Context manu: Remove const from RimIntersectionBox pointer

This commit is contained in:
Rebecca Cox
2017-11-29 14:20:59 +01:00
parent 58550817a0
commit c47f5e413f
6 changed files with 13 additions and 13 deletions

View File

@@ -29,7 +29,7 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RivIntersectionBoxGeometryGenerator::RivIntersectionBoxGeometryGenerator(const RimIntersectionBox* intersectionBox, const RivIntersectionHexGridInterface* grid) RivIntersectionBoxGeometryGenerator::RivIntersectionBoxGeometryGenerator(RimIntersectionBox* intersectionBox, const RivIntersectionHexGridInterface* grid)
: m_intersectionBoxDefinition(intersectionBox), : m_intersectionBoxDefinition(intersectionBox),
m_hexGrid(grid) m_hexGrid(grid)
{ {
@@ -69,7 +69,7 @@ cvf::ref<cvf::DrawableGeo> RivIntersectionBoxGeometryGenerator::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());
@@ -82,7 +82,7 @@ cvf::ref<cvf::DrawableGeo> RivIntersectionBoxGeometryGenerator::generateSurface(
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
cvf::ref<cvf::DrawableGeo> RivIntersectionBoxGeometryGenerator::createMeshDrawable() cvf::ref<cvf::DrawableGeo> RivIntersectionBoxGeometryGenerator::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());
@@ -227,7 +227,7 @@ private:
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
const RimIntersectionBox* RivIntersectionBoxGeometryGenerator::intersectionBox() const RimIntersectionBox* RivIntersectionBoxGeometryGenerator::intersectionBox() const
{ {
return m_intersectionBoxDefinition; return m_intersectionBoxDefinition;
} }

View File

@@ -41,7 +41,7 @@ namespace cvf
class RivIntersectionBoxGeometryGenerator : public cvf::Object class RivIntersectionBoxGeometryGenerator : public cvf::Object
{ {
public: public:
RivIntersectionBoxGeometryGenerator(const RimIntersectionBox* intersectionBox, RivIntersectionBoxGeometryGenerator(RimIntersectionBox* intersectionBox,
const RivIntersectionHexGridInterface* grid); const RivIntersectionHexGridInterface* grid);
~RivIntersectionBoxGeometryGenerator(); ~RivIntersectionBoxGeometryGenerator();
@@ -57,7 +57,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 RimIntersectionBox* intersectionBox() const; RimIntersectionBox* intersectionBox() const;
private: private:
void calculateArrays(); void calculateArrays();
@@ -70,6 +70,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 RimIntersectionBox* m_intersectionBoxDefinition; RimIntersectionBox* m_intersectionBoxDefinition;
}; };

View File

@@ -57,7 +57,7 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RivIntersectionBoxPartMgr::RivIntersectionBoxPartMgr(const RimIntersectionBox* intersectionBox) RivIntersectionBoxPartMgr::RivIntersectionBoxPartMgr(RimIntersectionBox* intersectionBox)
: m_rimIntersectionBox(intersectionBox), : m_rimIntersectionBox(intersectionBox),
m_defaultColor(cvf::Color3::WHITE) m_defaultColor(cvf::Color3::WHITE)
{ {
@@ -361,6 +361,6 @@ cvf::ref<RivIntersectionHexGridInterface> RivIntersectionBoxPartMgr::createHexGr
return new RivFemIntersectionGrid(femPart); return new RivFemIntersectionGrid(femPart);
} }
return NULL; return nullptr;
} }

View File

@@ -45,7 +45,7 @@ class RimIntersectionBox;
class RivIntersectionBoxPartMgr : public cvf::Object class RivIntersectionBoxPartMgr : public cvf::Object
{ {
public: public:
explicit RivIntersectionBoxPartMgr(const RimIntersectionBox* intersectionBox); explicit RivIntersectionBoxPartMgr(RimIntersectionBox* intersectionBox);
void applySingleColorEffect(); void applySingleColorEffect();
void updateCellResultColor(size_t timeStepIndex); void updateCellResultColor(size_t timeStepIndex);
@@ -60,7 +60,7 @@ private:
cvf::ref<RivIntersectionHexGridInterface> createHexGridInterface(); cvf::ref<RivIntersectionHexGridInterface> createHexGridInterface();
private: private:
const RimIntersectionBox* m_rimIntersectionBox; RimIntersectionBox* m_rimIntersectionBox;
cvf::Color3f m_defaultColor; cvf::Color3f m_defaultColor;

View File

@@ -56,7 +56,7 @@ std::array<cvf::Vec3f, 3> RivIntersectionBoxSourceInfo::triangle(int triangleIdx
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
const RimIntersectionBox* RivIntersectionBoxSourceInfo::intersectionBox() const RimIntersectionBox* RivIntersectionBoxSourceInfo::intersectionBox() const
{ {
return m_intersectionBoxGeometryGenerator->intersectionBox(); return m_intersectionBoxGeometryGenerator->intersectionBox();
} }

View File

@@ -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 RimIntersectionBox* intersectionBox() const; RimIntersectionBox* intersectionBox() const;
private: private:
cvf::cref<RivIntersectionBoxGeometryGenerator> m_intersectionBoxGeometryGenerator; cvf::cref<RivIntersectionBoxGeometryGenerator> m_intersectionBoxGeometryGenerator;