(#166) Improvements to ternary result visualization

Show undefined in regions with no results
Always use time step zero for static results
Allow texture coordinate creation without using RigPipeInCellEvaluator
This commit is contained in:
Magne Sjaastad
2015-11-24 09:59:25 +01:00
parent 6cd4e8a0b7
commit 60df95843c
6 changed files with 85 additions and 36 deletions

View File

@@ -39,7 +39,19 @@ public:
cvf::Vec2f getTexCoord(double soil, double sgas, size_t cellIndex) const
{
bool isTransparent = m_pipeInCellEvaluator->isWellPipeInCell(cellIndex);
if (soil == HUGE_VAL || soil != soil ||
sgas == HUGE_VAL || sgas != sgas) // a != a is true for NAN's
{
cvf::Vec2f texCoord(1.0, 1.0);
return texCoord;
}
bool isTransparent = false;
if (m_pipeInCellEvaluator.notNull())
{
isTransparent = m_pipeInCellEvaluator->isWellPipeInCell(cellIndex);
}
return m_scalarMapper->mapToTextureCoord(soil, sgas, isTransparent);
}