]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix on Bug PAL5370
authorapo <apo@opencascade.com>
Thu, 13 Jan 2005 05:43:37 +0000 (05:43 +0000)
committerapo <apo@opencascade.com>
Thu, 13 Jan 2005 05:43:37 +0000 (05:43 +0000)
   ScalarMap colors depend on the current view angle

src/OBJECT/VISU_Actor.cxx
src/OBJECT/VISU_Actor.h
src/OBJECT/VISU_ScalarMapAct.cxx

index 74036d0c95feaf8803f1ee9f6f825a76415898b2..d26af3b9bae2171a4753b8f9e99bcec9a57cc806 100644 (file)
@@ -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);
 }
index 83b8e75c6c254bb5469b5ba27dd942ae6136050a..eb401ed8c0110dfca32bfdf99261e5736b5a3354 100644 (file)
@@ -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:
index 0a138e2cc4cf9cdff9b048a4f88b78b6fdf5bfb0..d50fc26cf023e1d7beaf5580581a3da52a6ca4a1 100644 (file)
@@ -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(){