#3343 Holo Lens : Use default surface color from geo mech

This commit is contained in:
Magne Sjaastad
2018-09-21 14:09:32 +02:00
parent ea78f85755
commit 0127e0c1b5
6 changed files with 55 additions and 32 deletions

View File

@@ -19,6 +19,7 @@
#pragma once
#include "cvfBase.h"
#include "cvfArray.h"
#include "cvfCollection.h"

View File

@@ -20,6 +20,7 @@
#pragma once
#include "RivCellSetEnum.h"
#include "RivGeoMechPartMgr.h"
#include "cvfBase.h"
#include "cvfObject.h"
@@ -27,7 +28,6 @@
#include <cstddef>
#include <map>
class RivGeoMechPartMgr;
class RivGeoMechPartMgrGeneratorInterface;
class RivGeoMechPartMgrCache : public cvf::Object

View File

@@ -105,7 +105,8 @@ void RivGeoMechVizLogic::updateStaticCellColors(int timeStepIndex)
for (size_t pmIdx = 0; pmIdx < visiblePartMgrs.size(); ++pmIdx)
{
RivGeoMechPartMgr* partMgr = m_partMgrCache->partMgr(visiblePartMgrs[pmIdx]);
partMgr->updateCellColor(cvf::Color4f(cvf::Color3f::ORANGE));
auto color = staticCellColor();
partMgr->updateCellColor(cvf::Color4f(color));
}
}
@@ -173,6 +174,14 @@ const cvf::ref<RivGeoMechPartMgrCache> RivGeoMechVizLogic::partMgrCache() const
return m_partMgrCache;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::Color3f RivGeoMechVizLogic::staticCellColor()
{
return cvf::Color3f::ORANGE;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -51,6 +51,8 @@ public:
void calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility, int timeStepIndex);
std::vector<RivGeoMechPartMgrCache::Key> keysToVisiblePartMgrs(int timeStepIndex) const;
const cvf::ref<RivGeoMechPartMgrCache> partMgrCache() const;
static cvf::Color3f staticCellColor();
private:
RivGeoMechPartMgr* getUpdatedPartMgr(RivGeoMechPartMgrCache::Key partMgrKey);