Added framework used to handle utm area of interest

p4#: 21775
This commit is contained in:
Magne Sjaastad
2013-05-31 13:57:16 +02:00
parent ead2eac08b
commit ea4491e987
9 changed files with 241 additions and 53 deletions

View File

@@ -511,6 +511,29 @@ void RigGridBase::coarseningBox(size_t coarseningBoxIndex, size_t* i1, size_t* i
*k2 = box[5];
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::BoundingBox RigGridBase::boundingBox()
{
if (!m_boundingBox.isValid())
{
cvf::Vec3d cornerVerts[8];
for (size_t i = 0; i < cellCount(); i++)
{
cellCornerVertices(i, cornerVerts);
for (size_t j = 0; j < 8; j++)
{
m_boundingBox.add(cornerVerts[j]);
}
}
}
return m_boundingBox;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -21,6 +21,7 @@
#include "cvfBase.h"
#include "cvfVector3.h"
#include "cvfBoundingBox.h"
#include "cvfStructGrid.h"
#include "cvfStructGridGeometryGenerator.h"
@@ -69,6 +70,8 @@ public:
size_t addCoarseningBox(size_t i1, size_t i2, size_t j1, size_t j2, size_t k1, size_t k2);
void coarseningBox(size_t coarseningBoxIndex, size_t* i1, size_t* i2, size_t* j1, size_t* j2, size_t* k1, size_t* k2) const;
cvf::BoundingBox boundingBox();
protected:
friend class RigMainGrid;//::initAllSubGridsParentGridPointer();
@@ -106,6 +109,7 @@ private:
size_t m_indexToStartOfCells; ///< Index into the global cell array stored in main-grid where this grids cells starts.
size_t m_gridIndex; ///< The LGR index of this grid. Starts with 1. Main grid has index 0.
RigMainGrid* m_mainGrid;
cvf::BoundingBox m_boundingBox;
std::vector<caf::SizeTArray6> m_coarseningBoxInfo;
};