#829 Show formation colors for all time steps

This commit is contained in:
Magne Sjaastad 2016-09-08 08:49:08 +02:00
parent f057f684b1
commit 0f88475fd8
3 changed files with 21 additions and 1 deletions

View File

@ -644,6 +644,7 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateDerivedResult(in
if (resVarAddr.resultPosType == RIG_FORMATION_NAMES)
{
RigFemScalarResultFrames* resFrames = m_femPartResults[partIndex]->createScalarResult(resVarAddr);
resFrames->setSingleFrameResultData();
const RigFemPart * femPart = m_femParts->part(partIndex);
std::vector<float>& dstFrameData = resFrames->frameData(0);

View File

@ -28,6 +28,7 @@
RigFemScalarResultFrames::RigFemScalarResultFrames(int frameCount)
{
m_dataForEachFrame.resize(frameCount);
m_singleFrameResultData = false;
}
//--------------------------------------------------------------------------------------------------
@ -38,6 +39,14 @@ RigFemScalarResultFrames::~RigFemScalarResultFrames()
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigFemScalarResultFrames::setSingleFrameResultData()
{
m_singleFrameResultData = true;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -52,5 +61,12 @@ int RigFemScalarResultFrames::frameCount()
//--------------------------------------------------------------------------------------------------
std::vector<float>& RigFemScalarResultFrames::frameData(size_t frameIndex)
{
return m_dataForEachFrame[frameIndex];
if (m_singleFrameResultData)
{
return m_dataForEachFrame[0];
}
else
{
return m_dataForEachFrame[frameIndex];
}
}

View File

@ -33,9 +33,12 @@ public:
RigFemScalarResultFrames(int frameCount);
virtual ~RigFemScalarResultFrames();
void setSingleFrameResultData();
std::vector<float>& frameData(size_t frameIndex);
int frameCount();
private:
std::vector< std::vector<float> > m_dataForEachFrame;
bool m_singleFrameResultData;
};