#815 Renamed CrossSection -> Intersection

This commit is contained in:
Jacob Støren 2016-09-21 10:15:38 +02:00
parent c08dce7167
commit 1c612030ef
8 changed files with 44 additions and 44 deletions

View File

@ -38,7 +38,7 @@
RivCrossSectionGeometryGenerator::RivCrossSectionGeometryGenerator(const RimCrossSection* crossSection, RivCrossSectionGeometryGenerator::RivCrossSectionGeometryGenerator(const RimCrossSection* crossSection,
std::vector<std::vector<cvf::Vec3d> > &polylines, std::vector<std::vector<cvf::Vec3d> > &polylines,
const cvf::Vec3d& extrusionDirection, const cvf::Vec3d& extrusionDirection,
const RivCrossSectionHexGridIntf* grid) const RivIntersectionHexGridInterface* grid)
: m_crossSection(crossSection), : m_crossSection(crossSection),
m_polyLines(polylines), m_polyLines(polylines),
m_extrusionDirection(extrusionDirection), m_extrusionDirection(extrusionDirection),
@ -180,7 +180,7 @@ void RivCrossSectionGeometryGenerator::calculateArrays()
if (cvx.isVxIdsNative) if (cvx.isVxIdsNative)
{ {
m_triVxToCellCornerWeights.push_back( m_triVxToCellCornerWeights.push_back(
RivVertexWeights(cvx.clippedEdgeVx1Id, cvx.clippedEdgeVx2Id, cvx.normDistFromEdgeVx1)); RivIntersectionVertexWeights(cvx.clippedEdgeVx1Id, cvx.clippedEdgeVx2Id, cvx.normDistFromEdgeVx1));
} }
else else
{ {
@ -188,7 +188,7 @@ void RivCrossSectionGeometryGenerator::calculateArrays()
caf::HexGridIntersectionTools::ClipVx cvx2 = hexPlaneCutTriangleVxes[cvx.clippedEdgeVx2Id]; caf::HexGridIntersectionTools::ClipVx cvx2 = hexPlaneCutTriangleVxes[cvx.clippedEdgeVx2Id];
m_triVxToCellCornerWeights.push_back( m_triVxToCellCornerWeights.push_back(
RivVertexWeights(cvx1.clippedEdgeVx1Id, cvx1.clippedEdgeVx2Id, cvx1.normDistFromEdgeVx1, RivIntersectionVertexWeights(cvx1.clippedEdgeVx1Id, cvx1.clippedEdgeVx2Id, cvx1.normDistFromEdgeVx1,
cvx2.clippedEdgeVx1Id, cvx2.clippedEdgeVx2Id, cvx2.normDistFromEdgeVx1, cvx2.clippedEdgeVx1Id, cvx2.clippedEdgeVx2Id, cvx2.normDistFromEdgeVx1,
cvx.normDistFromEdgeVx1)); cvx.normDistFromEdgeVx1));
@ -356,7 +356,7 @@ const std::vector<size_t>& RivCrossSectionGeometryGenerator::triangleToCellIndex
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
const std::vector<RivVertexWeights>& RivCrossSectionGeometryGenerator::triangleVxToCellCornerInterpolationWeights() const const std::vector<RivIntersectionVertexWeights>& RivCrossSectionGeometryGenerator::triangleVxToCellCornerInterpolationWeights() const
{ {
CVF_ASSERT(m_triangleVxes->size()); CVF_ASSERT(m_triangleVxes->size());
return m_triVxToCellCornerWeights; return m_triVxToCellCornerWeights;

View File

@ -49,7 +49,7 @@ public:
RivCrossSectionGeometryGenerator(const RimCrossSection* crossSection, RivCrossSectionGeometryGenerator(const RimCrossSection* crossSection,
std::vector<std::vector<cvf::Vec3d> > &polylines, std::vector<std::vector<cvf::Vec3d> > &polylines,
const cvf::Vec3d& extrusionDirection, const cvf::Vec3d& extrusionDirection,
const RivCrossSectionHexGridIntf* grid ); const RivIntersectionHexGridInterface* grid );
~RivCrossSectionGeometryGenerator(); ~RivCrossSectionGeometryGenerator();
@ -63,7 +63,7 @@ public:
// Mapping between cells and geometry // Mapping between cells and geometry
const std::vector<size_t>& triangleToCellIndex() const; const std::vector<size_t>& triangleToCellIndex() const;
const std::vector<RivVertexWeights>& triangleVxToCellCornerInterpolationWeights() const; const std::vector<RivIntersectionVertexWeights>& triangleVxToCellCornerInterpolationWeights() const;
const RimCrossSection* crossSection() const; const RimCrossSection* crossSection() const;
@ -73,7 +73,7 @@ private:
const cvf::Vec3d extrDir, const cvf::Vec3d extrDir,
std::vector<cvf::Vec3d>* adjustedPolyline); std::vector<cvf::Vec3d>* adjustedPolyline);
cvf::cref<RivCrossSectionHexGridIntf> m_hexGrid; cvf::cref<RivIntersectionHexGridInterface> m_hexGrid;
const std::vector<std::vector<cvf::Vec3d> > m_polyLines; const std::vector<std::vector<cvf::Vec3d> > m_polyLines;
cvf::Vec3d m_extrusionDirection; cvf::Vec3d m_extrusionDirection;
@ -81,7 +81,7 @@ private:
cvf::ref<cvf::Vec3fArray> m_triangleVxes; cvf::ref<cvf::Vec3fArray> m_triangleVxes;
cvf::ref<cvf::Vec3fArray> m_cellBorderLineVxes; cvf::ref<cvf::Vec3fArray> m_cellBorderLineVxes;
std::vector<size_t> m_triangleToCellIdxMap; std::vector<size_t> m_triangleToCellIdxMap;
std::vector<RivVertexWeights> m_triVxToCellCornerWeights; std::vector<RivIntersectionVertexWeights> m_triVxToCellCornerWeights;
const RimCrossSection* m_crossSection; const RimCrossSection* m_crossSection;
}; };

View File

@ -164,7 +164,7 @@ void RivCrossSectionPartMgr::updateCellResultColor(size_t timeStepIndex)
// Do a "Hack" to show elm nodal and not nodal POR results // Do a "Hack" to show elm nodal and not nodal POR results
if (resVarAddress.resultPosType == RIG_NODAL && resVarAddress.fieldName == "POR-Bar") resVarAddress.resultPosType = RIG_ELEMENT_NODAL; if (resVarAddress.resultPosType == RIG_NODAL && resVarAddress.fieldName == "POR-Bar") resVarAddress.resultPosType = RIG_ELEMENT_NODAL;
const std::vector<RivVertexWeights> &vertexWeights = m_crossSectionGenerator->triangleVxToCellCornerInterpolationWeights(); const std::vector<RivIntersectionVertexWeights> &vertexWeights = m_crossSectionGenerator->triangleVxToCellCornerInterpolationWeights();
const std::vector<float>& resultValues = caseData->femPartResults()->resultValues(resVarAddress, 0, (int)timeStepIndex); const std::vector<float>& resultValues = caseData->femPartResults()->resultValues(resVarAddress, 0, (int)timeStepIndex);
bool isElementNodalResult = !(resVarAddress.resultPosType == RIG_NODAL); bool isElementNodalResult = !(resVarAddress.resultPosType == RIG_NODAL);
RigFemPart* femPart = caseData->femParts()->part(0); RigFemPart* femPart = caseData->femParts()->part(0);
@ -191,7 +191,7 @@ void RivCrossSectionPartMgr::updateCellResultColor(size_t timeStepIndex)
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivCrossSectionPartMgr::calculateGeoMechTextureCoords(cvf::Vec2fArray* textureCoords, void RivCrossSectionPartMgr::calculateGeoMechTextureCoords(cvf::Vec2fArray* textureCoords,
const std::vector<RivVertexWeights> &vertexWeights, const std::vector<RivIntersectionVertexWeights> &vertexWeights,
const std::vector<float> &resultValues, const std::vector<float> &resultValues,
bool isElementNodalResult, bool isElementNodalResult,
const RigFemPart* femPart, const RigFemPart* femPart,
@ -506,7 +506,7 @@ void RivCrossSectionPartMgr::computeData()
if (polyLines.size() > 0) if (polyLines.size() > 0)
{ {
cvf::Vec3d direction = extrusionDirection(polyLines[0]); cvf::Vec3d direction = extrusionDirection(polyLines[0]);
cvf::ref<RivCrossSectionHexGridIntf> hexGrid = createHexGridInterface(); cvf::ref<RivIntersectionHexGridInterface> hexGrid = createHexGridInterface();
m_crossSectionGenerator = new RivCrossSectionGeometryGenerator(m_rimCrossSection, polyLines, direction, hexGrid.p()); m_crossSectionGenerator = new RivCrossSectionGeometryGenerator(m_rimCrossSection, polyLines, direction, hexGrid.p());
} }
} }
@ -514,7 +514,7 @@ void RivCrossSectionPartMgr::computeData()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
cvf::ref<RivCrossSectionHexGridIntf> RivCrossSectionPartMgr::createHexGridInterface() cvf::ref<RivIntersectionHexGridInterface> RivCrossSectionPartMgr::createHexGridInterface()
{ {
RimEclipseView* eclipseView; RimEclipseView* eclipseView;
@ -523,7 +523,7 @@ cvf::ref<RivCrossSectionHexGridIntf> RivCrossSectionPartMgr::createHexGridInterf
{ {
RigMainGrid* grid = NULL; RigMainGrid* grid = NULL;
grid = eclipseView->eclipseCase()->reservoirData()->mainGrid(); grid = eclipseView->eclipseCase()->reservoirData()->mainGrid();
return new RivEclipseCrossSectionGrid(grid, eclipseView->currentActiveCellInfo(), m_rimCrossSection->showInactiveCells()); return new RivEclipseIntersectionGrid(grid, eclipseView->currentActiveCellInfo(), m_rimCrossSection->showInactiveCells());
} }
RimGeoMechView* geoView; RimGeoMechView* geoView;
@ -531,7 +531,7 @@ cvf::ref<RivCrossSectionHexGridIntf> RivCrossSectionPartMgr::createHexGridInterf
if (geoView) if (geoView)
{ {
RigFemPart* femPart = geoView->geoMechCase()->geoMechData()->femParts()->part(0); RigFemPart* femPart = geoView->geoMechCase()->geoMechData()->femParts()->part(0);
return new RivFemCrossSectionGrid(femPart); return new RivFemIntersectionGrid(femPart);
} }
return NULL; return NULL;

View File

@ -68,12 +68,12 @@ private:
const RigResultAccessor* resultAccessor, const RigResultAccessor* resultAccessor,
const cvf::ScalarMapper* mapper); const cvf::ScalarMapper* mapper);
static void calculateGeoMechTextureCoords(cvf::Vec2fArray* textureCoords, static void calculateGeoMechTextureCoords(cvf::Vec2fArray* textureCoords,
const std::vector<RivVertexWeights> &vertexWeights, const std::vector<RivIntersectionVertexWeights> &vertexWeights,
const std::vector<float> &resultValues, const std::vector<float> &resultValues,
bool isElementNodalResult, bool isElementNodalResult,
const RigFemPart* femPart, const RigFemPart* femPart,
const cvf::ScalarMapper* mapper); const cvf::ScalarMapper* mapper);
cvf::ref<RivCrossSectionHexGridIntf> createHexGridInterface(); cvf::ref<RivIntersectionHexGridInterface> createHexGridInterface();
private: private:
const RimCrossSection* m_rimCrossSection; const RimCrossSection* m_rimCrossSection;

View File

@ -26,7 +26,7 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RivEclipseCrossSectionGrid::RivEclipseCrossSectionGrid(const RigMainGrid * mainGrid, RivEclipseIntersectionGrid::RivEclipseIntersectionGrid(const RigMainGrid * mainGrid,
const RigActiveCellInfo* activeCellInfo, const RigActiveCellInfo* activeCellInfo,
bool showInactiveCells) bool showInactiveCells)
: m_mainGrid(mainGrid), : m_mainGrid(mainGrid),
@ -39,7 +39,7 @@ RivEclipseCrossSectionGrid::RivEclipseCrossSectionGrid(const RigMainGrid * mainG
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
cvf::Vec3d RivEclipseCrossSectionGrid::displayOffset() const cvf::Vec3d RivEclipseIntersectionGrid::displayOffset() const
{ {
return m_mainGrid->displayModelOffset(); return m_mainGrid->displayModelOffset();
} }
@ -47,7 +47,7 @@ cvf::Vec3d RivEclipseCrossSectionGrid::displayOffset() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
cvf::BoundingBox RivEclipseCrossSectionGrid::boundingBox() const cvf::BoundingBox RivEclipseIntersectionGrid::boundingBox() const
{ {
return m_mainGrid->boundingBox(); return m_mainGrid->boundingBox();
} }
@ -55,7 +55,7 @@ cvf::BoundingBox RivEclipseCrossSectionGrid::boundingBox() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivEclipseCrossSectionGrid::findIntersectingCells(const cvf::BoundingBox& intersectingBB, std::vector<size_t>* intersectedCells) const void RivEclipseIntersectionGrid::findIntersectingCells(const cvf::BoundingBox& intersectingBB, std::vector<size_t>* intersectedCells) const
{ {
m_mainGrid->findIntersectingCells(intersectingBB, intersectedCells); m_mainGrid->findIntersectingCells(intersectingBB, intersectedCells);
} }
@ -63,7 +63,7 @@ void RivEclipseCrossSectionGrid::findIntersectingCells(const cvf::BoundingBox& i
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RivEclipseCrossSectionGrid::useCell(size_t cellIndex) const bool RivEclipseIntersectionGrid::useCell(size_t cellIndex) const
{ {
const RigCell& cell = m_mainGrid->globalCellArray()[cellIndex]; const RigCell& cell = m_mainGrid->globalCellArray()[cellIndex];
if (m_showInactiveCells) if (m_showInactiveCells)
@ -75,7 +75,7 @@ bool RivEclipseCrossSectionGrid::useCell(size_t cellIndex) const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivEclipseCrossSectionGrid::cellCornerVertices(size_t cellIndex, cvf::Vec3d cellCorners[8]) const void RivEclipseIntersectionGrid::cellCornerVertices(size_t cellIndex, cvf::Vec3d cellCorners[8]) const
{ {
m_mainGrid->cellCornerVertices(cellIndex, cellCorners); m_mainGrid->cellCornerVertices(cellIndex, cellCorners);
} }
@ -83,7 +83,7 @@ void RivEclipseCrossSectionGrid::cellCornerVertices(size_t cellIndex, cvf::Vec3d
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivEclipseCrossSectionGrid::cellCornerIndices(size_t cellIndex, size_t cornerIndices[8]) const void RivEclipseIntersectionGrid::cellCornerIndices(size_t cellIndex, size_t cornerIndices[8]) const
{ {
const caf::SizeTArray8& cornerIndicesSource = m_mainGrid->globalCellArray()[cellIndex].cornerIndices(); const caf::SizeTArray8& cornerIndicesSource = m_mainGrid->globalCellArray()[cellIndex].cornerIndices();
memcpy(cornerIndices, cornerIndicesSource.data(), 8); memcpy(cornerIndices, cornerIndicesSource.data(), 8);
@ -92,7 +92,7 @@ void RivEclipseCrossSectionGrid::cellCornerIndices(size_t cellIndex, size_t corn
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RivFemCrossSectionGrid::RivFemCrossSectionGrid(const RigFemPart * femPart) : m_femPart(femPart) RivFemIntersectionGrid::RivFemIntersectionGrid(const RigFemPart * femPart) : m_femPart(femPart)
{ {
} }
@ -100,7 +100,7 @@ RivFemCrossSectionGrid::RivFemCrossSectionGrid(const RigFemPart * femPart) : m_f
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
cvf::Vec3d RivFemCrossSectionGrid::displayOffset() const cvf::Vec3d RivFemIntersectionGrid::displayOffset() const
{ {
return cvf::Vec3d::ZERO; return cvf::Vec3d::ZERO;
} }
@ -108,7 +108,7 @@ cvf::Vec3d RivFemCrossSectionGrid::displayOffset() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
cvf::BoundingBox RivFemCrossSectionGrid::boundingBox() const cvf::BoundingBox RivFemIntersectionGrid::boundingBox() const
{ {
return m_femPart->boundingBox(); return m_femPart->boundingBox();
} }
@ -116,7 +116,7 @@ cvf::BoundingBox RivFemCrossSectionGrid::boundingBox() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivFemCrossSectionGrid::findIntersectingCells(const cvf::BoundingBox& intersectingBB, std::vector<size_t>* intersectedCells) const void RivFemIntersectionGrid::findIntersectingCells(const cvf::BoundingBox& intersectingBB, std::vector<size_t>* intersectedCells) const
{ {
m_femPart->findIntersectingCells(intersectingBB, intersectedCells); m_femPart->findIntersectingCells(intersectingBB, intersectedCells);
} }
@ -124,7 +124,7 @@ void RivFemCrossSectionGrid::findIntersectingCells(const cvf::BoundingBox& inter
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RivFemCrossSectionGrid::useCell(size_t cellIndex) const bool RivFemIntersectionGrid::useCell(size_t cellIndex) const
{ {
RigElementType elmType = m_femPart->elementType(cellIndex); RigElementType elmType = m_femPart->elementType(cellIndex);
@ -136,7 +136,7 @@ bool RivFemCrossSectionGrid::useCell(size_t cellIndex) const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivFemCrossSectionGrid::cellCornerVertices(size_t cellIndex, cvf::Vec3d cellCorners[8]) const void RivFemIntersectionGrid::cellCornerVertices(size_t cellIndex, cvf::Vec3d cellCorners[8]) const
{ {
RigElementType elmType = m_femPart->elementType(cellIndex); RigElementType elmType = m_femPart->elementType(cellIndex);
if (!(elmType == HEX8 || elmType == HEX8P)) return; if (!(elmType == HEX8 || elmType == HEX8P)) return;
@ -157,7 +157,7 @@ void RivFemCrossSectionGrid::cellCornerVertices(size_t cellIndex, cvf::Vec3d cel
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivFemCrossSectionGrid::cellCornerIndices(size_t cellIndex, size_t cornerIndices[8]) const void RivFemIntersectionGrid::cellCornerIndices(size_t cellIndex, size_t cornerIndices[8]) const
{ {
RigElementType elmType = m_femPart->elementType(cellIndex); RigElementType elmType = m_femPart->elementType(cellIndex);
if (!(elmType == HEX8 || elmType == HEX8P)) return; if (!(elmType == HEX8 || elmType == HEX8P)) return;

View File

@ -32,7 +32,7 @@ class RigMainGrid;
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// Interface definition used to compute the geometry for planes intersecting a grid /// Interface definition used to compute the geometry for planes intersecting a grid
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
class RivCrossSectionHexGridIntf : public cvf::Object class RivIntersectionHexGridInterface : public cvf::Object
{ {
public: public:
virtual cvf::Vec3d displayOffset() const = 0; virtual cvf::Vec3d displayOffset() const = 0;
@ -46,10 +46,10 @@ public:
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
class RivEclipseCrossSectionGrid : public RivCrossSectionHexGridIntf class RivEclipseIntersectionGrid : public RivIntersectionHexGridInterface
{ {
public: public:
RivEclipseCrossSectionGrid(const RigMainGrid * mainGrid, const RigActiveCellInfo* activeCellInfo, bool showInactiveCells); RivEclipseIntersectionGrid(const RigMainGrid * mainGrid, const RigActiveCellInfo* activeCellInfo, bool showInactiveCells);
virtual cvf::Vec3d displayOffset() const; virtual cvf::Vec3d displayOffset() const;
virtual cvf::BoundingBox boundingBox() const; virtual cvf::BoundingBox boundingBox() const;
@ -67,10 +67,10 @@ private:
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
class RivFemCrossSectionGrid : public RivCrossSectionHexGridIntf class RivFemIntersectionGrid : public RivIntersectionHexGridInterface
{ {
public: public:
RivFemCrossSectionGrid(const RigFemPart * femPart); RivFemIntersectionGrid(const RigFemPart * femPart);
virtual cvf::Vec3d displayOffset() const; virtual cvf::Vec3d displayOffset() const;
virtual cvf::BoundingBox boundingBox() const; virtual cvf::BoundingBox boundingBox() const;
@ -87,10 +87,10 @@ private:
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
class RivVertexWeights class RivIntersectionVertexWeights
{ {
public: public:
explicit RivVertexWeights(size_t edge1Vx1, size_t edge1Vx2, double normDistFromE1V1, explicit RivIntersectionVertexWeights(size_t edge1Vx1, size_t edge1Vx2, double normDistFromE1V1,
size_t edge2Vx1, size_t edge2Vx2, double normDistFromE2V1, size_t edge2Vx1, size_t edge2Vx2, double normDistFromE2V1,
double normDistFromE1Cut) : m_count(4) double normDistFromE1Cut) : m_count(4)
{ {
@ -105,7 +105,7 @@ public:
m_weights[3] = ((float)(normDistFromE2V1*normDistFromE1Cut)); m_weights[3] = ((float)(normDistFromE2V1*normDistFromE1Cut));
} }
explicit RivVertexWeights(size_t edge1Vx1, size_t edge1Vx2, double normDistFromE1V1) : m_count(2) explicit RivIntersectionVertexWeights(size_t edge1Vx1, size_t edge1Vx2, double normDistFromE1V1) : m_count(2)
{ {
m_vxIds[0] = (edge1Vx1); m_vxIds[0] = (edge1Vx1);
m_vxIds[1] = (edge1Vx2); m_vxIds[1] = (edge1Vx2);

View File

@ -24,7 +24,7 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RivIntersectionBoxGeometryGenerator::RivIntersectionBoxGeometryGenerator(const RimIntersectionBox* intersectionBox, const RivCrossSectionHexGridIntf* grid) RivIntersectionBoxGeometryGenerator::RivIntersectionBoxGeometryGenerator(const RimIntersectionBox* intersectionBox, const RivIntersectionHexGridInterface* grid)
: m_crossSection(intersectionBox), : m_crossSection(intersectionBox),
m_hexGrid(grid) m_hexGrid(grid)
{ {
@ -102,7 +102,7 @@ const std::vector<size_t>& RivIntersectionBoxGeometryGenerator::triangleToCellIn
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
const std::vector<RivVertexWeights>& RivIntersectionBoxGeometryGenerator::triangleVxToCellCornerInterpolationWeights() const const std::vector<RivIntersectionVertexWeights>& RivIntersectionBoxGeometryGenerator::triangleVxToCellCornerInterpolationWeights() const
{ {
CVF_ASSERT(m_triangleVxes->size()); CVF_ASSERT(m_triangleVxes->size());
return m_triVxToCellCornerWeights; return m_triVxToCellCornerWeights;

View File

@ -42,7 +42,7 @@ class RivIntersectionBoxGeometryGenerator : public cvf::Object
{ {
public: public:
RivIntersectionBoxGeometryGenerator(const RimIntersectionBox* intersectionBox, RivIntersectionBoxGeometryGenerator(const RimIntersectionBox* intersectionBox,
const RivCrossSectionHexGridIntf* grid); const RivIntersectionHexGridInterface* grid);
~RivIntersectionBoxGeometryGenerator(); ~RivIntersectionBoxGeometryGenerator();
@ -54,20 +54,20 @@ public:
// Mapping between cells and geometry // Mapping between cells and geometry
const std::vector<size_t>& triangleToCellIndex() const; const std::vector<size_t>& triangleToCellIndex() const;
const std::vector<RivVertexWeights>& triangleVxToCellCornerInterpolationWeights() const; const std::vector<RivIntersectionVertexWeights>& triangleVxToCellCornerInterpolationWeights() const;
//const RimCrossSection* crossSection() const; //const RimCrossSection* crossSection() const;
private: private:
void calculateArrays(); void calculateArrays();
cvf::cref<RivCrossSectionHexGridIntf> m_hexGrid; cvf::cref<RivIntersectionHexGridInterface> m_hexGrid;
// Output arrays // Output arrays
cvf::ref<cvf::Vec3fArray> m_triangleVxes; cvf::ref<cvf::Vec3fArray> m_triangleVxes;
cvf::ref<cvf::Vec3fArray> m_cellBorderLineVxes; cvf::ref<cvf::Vec3fArray> m_cellBorderLineVxes;
std::vector<size_t> m_triangleToCellIdxMap; std::vector<size_t> m_triangleToCellIdxMap;
std::vector<RivVertexWeights> m_triVxToCellCornerWeights; std::vector<RivIntersectionVertexWeights> m_triVxToCellCornerWeights;
const RimIntersectionBox* m_crossSection; const RimIntersectionBox* m_crossSection;
}; };