EffectGenerator: Renamed faceculling member

This commit is contained in:
Jacob Støren
2013-12-18 13:53:32 +01:00
parent a6ef98772a
commit 49fe3e9f4c
2 changed files with 9 additions and 9 deletions

View File

@@ -393,7 +393,7 @@ ScalarMapperEffectGenerator::ScalarMapperEffectGenerator(const cvf::ScalarMapper
m_scalarMapper = scalarMapper;
m_polygonOffset = polygonOffset;
m_opacityLevel = 1.0f;
m_cullBackfaces = FC_NONE;
m_faceCulling = FC_NONE;
}
//--------------------------------------------------------------------------------------------------
@@ -491,18 +491,18 @@ void ScalarMapperEffectGenerator::updateCommonEffect(cvf::Effect* effect) const
}
// Backface culling
if (m_cullBackfaces != FC_NONE)
if (m_faceCulling != FC_NONE)
{
cvf::ref<cvf::RenderStateCullFace> faceCulling = new cvf::RenderStateCullFace;
if (m_cullBackfaces == FC_BACK)
if (m_faceCulling == FC_BACK)
{
faceCulling->setMode(cvf::RenderStateCullFace::BACK);
}
else if (m_cullBackfaces == FC_FRONT)
else if (m_faceCulling == FC_FRONT)
{
faceCulling->setMode(cvf::RenderStateCullFace::FRONT);
}
else if (m_cullBackfaces == FC_FRONT_AND_BACK)
else if (m_faceCulling == FC_FRONT_AND_BACK)
{
faceCulling->setMode(cvf::RenderStateCullFace::FRONT_AND_BACK);
}
@@ -525,7 +525,7 @@ bool ScalarMapperEffectGenerator::isEqual(const EffectGenerator* other) const
&& m_polygonOffset == otherTextureResultEffect->m_polygonOffset
&& m_opacityLevel == otherTextureResultEffect->m_opacityLevel
&& m_undefinedColor == otherTextureResultEffect->m_undefinedColor
&& m_cullBackfaces == otherTextureResultEffect->m_cullBackfaces)
&& m_faceCulling == otherTextureResultEffect->m_faceCulling)
{
cvf::ref<cvf::TextureImage> texImg2 = new cvf::TextureImage;
otherTextureResultEffect->m_scalarMapper->updateTexture(texImg2.p());
@@ -546,7 +546,7 @@ EffectGenerator* ScalarMapperEffectGenerator::copy() const
scEffGen->m_textureImage = m_textureImage;
scEffGen->m_opacityLevel = m_opacityLevel;
scEffGen->m_undefinedColor = m_undefinedColor;
scEffGen->m_cullBackfaces = m_cullBackfaces;
scEffGen->m_faceCulling = m_faceCulling;
return scEffGen;
}

View File

@@ -157,7 +157,7 @@ public:
void setOpacityLevel(float opacity) { m_opacityLevel = cvf::Math::clamp(opacity, 0.0f , 1.0f ); }
void setUndefinedColor(cvf::Color3f color) { m_undefinedColor = color; }
void setCullBackfaces(FaceCulling cullBackFaces) { m_cullBackfaces = cullBackFaces; }
void setCullBackfaces(FaceCulling faceCullMode) { m_faceCulling = faceCullMode; }
public:
static cvf::ref<cvf::TextureImage> addAlphaAndUndefStripes(const cvf::TextureImage* texImg, const cvf::Color3f& undefScalarColor, float opacityLevel);
static bool isImagesEqual(const cvf::TextureImage* texImg1, const cvf::TextureImage* texImg2);
@@ -178,7 +178,7 @@ private:
PolygonOffset m_polygonOffset;
float m_opacityLevel;
cvf::Color3f m_undefinedColor;
FaceCulling m_cullBackfaces;
FaceCulling m_faceCulling;
};