#2344 Tensor Vectors: Vector visualization code

This commit is contained in:
Rebecca Cox
2018-02-08 16:43:12 +01:00
parent 778119bf62
commit bd0d23520b
15 changed files with 774 additions and 32 deletions

View File

@@ -182,6 +182,14 @@ void RivFemPartPartMgr::appendPartsToModel(cvf::ModelBasicList* model)
if(m_surfaceGridLines.notNull()) model->addPart(m_surfaceGridLines.p());
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const RivFemPartGeometryGenerator* RivFemPartPartMgr::surfaceGenerator() const
{
return &m_surfaceGenerator;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -57,6 +57,8 @@ public:
void updateCellResultColor(size_t timeStepIndex, RimGeoMechCellColors* cellResultColors);
void appendPartsToModel(cvf::ModelBasicList* model);
const RivFemPartGeometryGenerator* surfaceGenerator() const;
private:
void generatePartGeometry(RivFemPartGeometryGenerator& geoBuilder);

View File

@@ -139,3 +139,11 @@ void RivGeoMechPartMgr::appendGridPartsToModel(cvf::ModelBasicList* model, const
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const cvf::Collection<RivFemPartPartMgr> RivGeoMechPartMgr::femPartMgrs() const
{
return m_femPartPartMgrs;
}

View File

@@ -61,6 +61,7 @@ public:
void appendGridPartsToModel(cvf::ModelBasicList* model, const std::vector<size_t>& partIndices);
void appendGridPartsToModel(cvf::ModelBasicList* model);
const cvf::Collection<RivFemPartPartMgr> femPartMgrs() const;
private:
cvf::Collection<RivFemPartPartMgr> m_femPartPartMgrs;

View File

@@ -140,7 +140,7 @@ void RivGeoMechVizLogic::scheduleRegenOfDirectlyDependentGeometry(RivCellSetEnum
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RivGeoMechPartMgrCache::Key> RivGeoMechVizLogic::keysToVisiblePartMgrs(int timeStepIndex)
std::vector<RivGeoMechPartMgrCache::Key> RivGeoMechVizLogic::keysToVisiblePartMgrs(int timeStepIndex) const
{
std::vector<RivGeoMechPartMgrCache::Key> visiblePartMgrs;
if (m_geomechView->viewController() && m_geomechView->viewController()->isVisibleCellsOveridden())
@@ -163,6 +163,14 @@ std::vector<RivGeoMechPartMgrCache::Key> RivGeoMechVizLogic::keysToVisiblePartMg
return visiblePartMgrs;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const cvf::ref<RivGeoMechPartMgrCache> RivGeoMechVizLogic::partMgrCache() const
{
return m_partMgrCache;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -43,17 +43,18 @@ public:
explicit RivGeoMechVizLogic(RimGeoMechView * geomView);
virtual ~RivGeoMechVizLogic();
void appendNoAnimPartsToModel(cvf::ModelBasicList* model);
void appendPartsToModel(int timeStepIndex, cvf::ModelBasicList* model);
void updateCellResultColor(int timeStepIndex, RimGeoMechCellColors* cellResultColors);
void updateStaticCellColors(int timeStepIndex);
void scheduleGeometryRegen(RivCellSetEnum geometryType);
void calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility, int timeStepIndex);
void appendNoAnimPartsToModel(cvf::ModelBasicList* model);
void appendPartsToModel(int timeStepIndex, cvf::ModelBasicList* model);
void updateCellResultColor(int timeStepIndex, RimGeoMechCellColors* cellResultColors);
void updateStaticCellColors(int timeStepIndex);
void scheduleGeometryRegen(RivCellSetEnum geometryType);
void calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility, int timeStepIndex);
std::vector<RivGeoMechPartMgrCache::Key> keysToVisiblePartMgrs(int timeStepIndex) const;
const cvf::ref<RivGeoMechPartMgrCache> partMgrCache() const;
private:
std::vector<RivGeoMechPartMgrCache::Key> keysToVisiblePartMgrs(int timeStepIndex);
RivGeoMechPartMgr* getUpdatedPartMgr(RivGeoMechPartMgrCache::Key partMgrKey);
void scheduleRegenOfDirectlyDependentGeometry(RivCellSetEnum geometryType);
RivGeoMechPartMgr* getUpdatedPartMgr(RivGeoMechPartMgrCache::Key partMgrKey);
void scheduleRegenOfDirectlyDependentGeometry(RivCellSetEnum geometryType);
cvf::ref<RivGeoMechPartMgrCache> m_partMgrCache;
RimGeoMechView* m_geomechView;