Created texture and texture coord calculations

This commit is contained in:
Magne Sjaastad
2014-08-10 09:50:50 +02:00
parent e9b67a9599
commit 0440e21f27
3 changed files with 103 additions and 14 deletions

View File

@@ -36,6 +36,8 @@ class RivTernaryScalarMapper : public cvf::Object
public:
RivTernaryScalarMapper(const cvf::Color3f& undefScalarColor, float opacityLevel);
void setTernaryRanges(double soilLower, double soilUpper, double swatLower, double swatUpper);
cvf::Vec2f mapToTextureCoord(double soil, double swat, bool isTransparent);
bool updateTexture(cvf::TextureImage* image);
@@ -43,5 +45,13 @@ private:
cvf::Color3f m_undefScalarColor;
float m_opacityLevel;
cvf::Vec2ui m_textureSize;
double m_rangeMaxSoil;
double m_rangeMinSoil;
double m_soilFactor;
double m_rangeMaxSwat;
double m_rangeMinSwat;
double m_swatFactor;
};