From: apo Date: Thu, 13 Jan 2005 05:43:37 +0000 (+0000) Subject: Fix on Bug PAL5370 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c4d1c2bbcf87b9b800fdac937fcfdb743f7baa6f;p=modules%2Fvisu.git Fix on Bug PAL5370 ScalarMap colors depend on the current view angle --- diff --git a/src/OBJECT/VISU_Actor.cxx b/src/OBJECT/VISU_Actor.cxx index 74036d0c..d26af3b9 100644 --- a/src/OBJECT/VISU_Actor.cxx +++ b/src/OBJECT/VISU_Actor.cxx @@ -56,10 +56,8 @@ static int MYVTKDEBUG = 0; #ifdef _DEBUG_ static int MYDEBUG = 1; -static int MYDEBUGWITHFILES = 0; #else static int MYDEBUG = 0; -static int MYDEBUGWITHFILES = 0; #endif //======================================================================= @@ -84,15 +82,6 @@ VISU_Actor::VISU_Actor(){ myIO = NULL; myName = ""; - - vtkProperty* aProperty = GetProperty(); - aProperty->SetAmbient(0.5); - aProperty->SetDiffuse(0.2); - aProperty->SetSpecular(0.2); - aProperty->SetAmbientColor(1, 1, 1); - aProperty->SetDiffuseColor(1, 1, 1); - aProperty->SetSpecularColor(0.5, 0.5, 0.5); - this->SetProperty(aProperty); } VISU_Actor::~VISU_Actor(){ @@ -205,14 +194,6 @@ int VISU_Actor::GetVisibility(){ return SALOME_Actor::GetVisibility(); } -void VISU_Actor::SetProperty(vtkProperty* theProperty){ - SALOME_Actor::SetProperty(theProperty); -} - -vtkProperty* VISU_Actor::GetProperty(){ - return SALOME_Actor::GetProperty(); -} - void VISU_Actor::SetLineWidth(float theLineWidth){ GetProperty()->SetLineWidth(theLineWidth); } diff --git a/src/OBJECT/VISU_Actor.h b/src/OBJECT/VISU_Actor.h index 83b8e75c..eb401ed8 100644 --- a/src/OBJECT/VISU_Actor.h +++ b/src/OBJECT/VISU_Actor.h @@ -73,7 +73,6 @@ class VTKOCC_EXPORT VISU_Actor : public SALOME_Actor { virtual void SetRepresentation(int theMode); - virtual bool IsShrunkable() { return myIsShrinkable;} virtual bool IsShrunk() { return myIsShrunk;} virtual void SetShrink(); @@ -83,21 +82,15 @@ class VTKOCC_EXPORT VISU_Actor : public SALOME_Actor { virtual void SetShrinkFactor(float theFactor = 0.8); virtual float GetShrinkFactor(); - virtual void SetVisibility(int theMode); virtual int GetVisibility(); - virtual void SetProperty(vtkProperty* theProperty); - virtual vtkProperty* GetProperty(); - virtual void SetLineWidth(float theLineWidth); virtual float GetLineWidth(); - - + virtual int GetNodeObjId(int theVtkID); virtual int GetElemObjId(int theVtkID); - std::string myFieldName; protected: diff --git a/src/OBJECT/VISU_ScalarMapAct.cxx b/src/OBJECT/VISU_ScalarMapAct.cxx index 0a138e2c..d50fc26c 100644 --- a/src/OBJECT/VISU_ScalarMapAct.cxx +++ b/src/OBJECT/VISU_ScalarMapAct.cxx @@ -37,8 +37,13 @@ vtkStandardNewMacro(VISU_ScalarMapAct); VISU_ScalarMapAct::VISU_ScalarMapAct(){ myScalarBar = VISU_ScalarBarActor::New(); - GetProperty()->FrontfaceCullingOff(); - GetProperty()->BackfaceCullingOff(); + + vtkProperty* aProperty = GetProperty(); + aProperty->SetAmbient(1.0); + aProperty->SetDiffuse(0.0); + aProperty->SetSpecular(0.0); + + myProperty->DeepCopy(aProperty); } VISU_ScalarMapAct::~VISU_ScalarMapAct(){