Rearranged members a bit in preparations to split out active info

p4#: 20381
This commit is contained in:
Jacob Støren 2013-02-05 16:35:04 +01:00
parent 1cab9a41a3
commit 487ee03212
3 changed files with 17 additions and 10 deletions

View File

@ -137,7 +137,7 @@ RimReservoirView::RimReservoirView()
CAF_PDM_InitField(&showInactiveCells, "ShowInactiveCells", false, "Show Inactive Cells", "", "", "");
CAF_PDM_InitField(&showInvalidCells, "ShowInvalidCells", false, "Show Invalid Cells", "", "", "");
//CAF_PDM_InitFieldNoDefault(&cameraPosition, "CameraPosition", "", "", "", "");
CAF_PDM_InitField(&cameraPosition, "CameraPosition", cvf::Mat4d::IDENTITY, "", "", "", "");
this->cellResult()->setReservoirView(this);
@ -714,7 +714,10 @@ void RimReservoirView::loadDataAndUpdate()
createDisplayModel();
updateDisplayModelVisibility();
setDefaultView();
if (cameraPosition().isIdentity())
{
setDefaultView();
}
overlayInfoConfig()->update3DInfo();
if (animationMode && m_viewer)
@ -933,6 +936,7 @@ void RimReservoirView::setupBeforeSave()
if (m_viewer)
{
animationMode = m_viewer->isAnimationActive();
cameraPosition = m_viewer->mainCamera()->viewMatrix();
}
}

View File

@ -34,6 +34,7 @@
#include "cvfMatrix4.h"
#include "cvfStructGridGeometryGenerator.h"
#include "cafPdmFieldCvfMat4d.h"
#include "RivReservoirViewPartMgr.h"
#include "RivReservoirPipesPartMgr.h"
@ -118,7 +119,7 @@ public:
// 3D Viewer
// Cam pos should be a field, but is not yet supported bu caf::Pdm
cvf::Mat4d cameraPosition;
caf::PdmField<cvf::Mat4d> cameraPosition;
void setDefaultView();
RIViewer* viewer();

View File

@ -78,20 +78,22 @@ public:
bool isLongPyramidCell(double maxHeightFactor = 5, double nodeNearTolerance = 1e-3 ) const;
private:
caf::SizeTArray8 m_cornerIndices;
bool m_isInvalid;
bool m_isWellCell;
size_t m_cellIndex; ///< This cells index in the grid it belongs to.
RigGridBase* m_hostGrid;
RigLocalGrid* m_subGrid;
bool m_cellFaceFaults[6];
RigGridBase* m_hostGrid;
size_t m_parentCellIndex; ///< Grid cell index of the cell in the parent grid containing this cell
size_t m_mainGridCellIndex;
bool m_isInCoarseCell;
bool m_cellFaceFaults[6];
// Result case specific data
bool m_isInvalid;
bool m_isWellCell;
size_t m_activeIndexInMatrixModel; ///< This cell's running index of all the active calls (matrix) in the reservoir
size_t m_activeIndexInFractureModel; ///< This cell's running index of all the active calls (fracture) in the reservoir
size_t m_cellIndex; ///< This cells index in the grid it belongs to.
};