]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix for the "0021179: EDF 1654 SMESH GEOM: better look'n'feel" issue:
authorana <ana@opencascade.com>
Fri, 13 Apr 2012 11:23:02 +0000 (11:23 +0000)
committerana <ana@opencascade.com>
Fri, 13 Apr 2012 11:23:02 +0000 (11:23 +0000)
- Material Properties

src/SVTK/SVTK_View.cxx
src/SVTK/SVTK_View.h
src/VTKViewer/VTKViewer_Actor.cxx
src/VTKViewer/VTKViewer_Actor.h

index ba50f38a229f425d39f9d31f603b4c0383a3677b..03a9070fef207b3991dc4ada76c3cb8ff6b5a4f5 100644 (file)
@@ -746,20 +746,17 @@ SVTK_View
 /*!
   Change material
   \param theIObject - object
-  \param thePropF - property contained new properties of front material
-  \param thePropB - property contained new properties of back material
+  \param thePropF - property contained new properties of material
 */
 void
 SVTK_View
 ::SetMaterial(const Handle(SALOME_InteractiveObject)& theIObject,
-             vtkProperty* thePropF,
-             vtkProperty* thePropB)
+             vtkProperty* thePropF)
 {
   using namespace SVTK;
   VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors());
   std::vector<vtkProperty*> aProps;
   aProps.push_back( thePropF );
-  aProps.push_back( thePropB );
   ForEachIf<SALOME_Actor>(aCopy.GetActors(),
                           TIsSameIObject<SALOME_Actor>(theIObject),
                           TSetFunction<SALOME_Actor,std::vector<vtkProperty*> >
@@ -769,11 +766,11 @@ SVTK_View
 /*!
   Get current front material
   \param theIObject - object
-  \return property contained front material properties of the given object
+  \return property contained material properties of the given object
 */
 vtkProperty* 
 SVTK_View
-::GetFrontMaterial(const Handle(SALOME_InteractiveObject)& theIObject)
+::GetMaterial(const Handle(SALOME_InteractiveObject)& theIObject)
 {
   using namespace SVTK;
   VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors());
@@ -781,26 +778,7 @@ SVTK_View
     Find<SALOME_Actor>(aCopy.GetActors(),
                        TIsSameIObject<SALOME_Actor>(theIObject));
   if(anActor)
-    return anActor->GetFrontMaterial();
-  return NULL;
-}
-
-/*!
-  Get current back material
-  \param theIObject - object
-  \return property contained back material properties of the given object
-*/
-vtkProperty* 
-SVTK_View
-::GetBackMaterial(const Handle(SALOME_InteractiveObject)& theIObject)
-{
-  using namespace SVTK;
-  VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors());
-  SALOME_Actor* anActor = 
-    Find<SALOME_Actor>(aCopy.GetActors(),
-                       TIsSameIObject<SALOME_Actor>(theIObject));
-  if(anActor)
-    return anActor->GetBackMaterial();
+    return anActor->GetMaterial();
   return NULL;
 }
 
index 7840d442d336ec2f9460e11fe6c53afde81d811d..0542c24f9fa231426ae3ef84847a6848d81c4656 100644 (file)
@@ -212,16 +212,11 @@ public:
   //! Change material
   void
   SetMaterial(const Handle(SALOME_InteractiveObject)& theIObject,
-             vtkProperty* thePropF,
-             vtkProperty* thePropB);
+             vtkProperty* thePropF);
 
-  //! Get current front material
+  //! Get current material
   vtkProperty* 
-  GetFrontMaterial(const Handle(SALOME_InteractiveObject)& theIObject);
-
-  //! Get current back material
-  vtkProperty* 
-  GetBackMaterial(const Handle(SALOME_InteractiveObject)& theIObject);
+  GetMaterial(const Handle(SALOME_InteractiveObject)& theIObject);
 
   //----------------------------------------------------------------------------
   // Erase Display functions
index 3389a6a0163917e4fe512f851bfa354172f1e0e8..624ed1deb6c8b95429868396a59d6dfd0d76059d 100755 (executable)
@@ -621,26 +621,15 @@ VTKViewer_Actor
 }
 
 /*!
-  Get current front material
+  Get current material
 */
 vtkProperty* 
 VTKViewer_Actor
-::GetFrontMaterial()
+::GetMaterial()
 {
   return NULL;
 }
 
-/*!
-  Get current back material
-*/
-vtkProperty* 
-VTKViewer_Actor
-::GetBackMaterial()
-{
-  return NULL;
-}
-
-
 /*!
   \return display mode
 */
index c1ae2e70b27f7c9962cc81d5de281fd88f677756..5a385e56c0b460d6fef2931fbf6457134bd68b0f 100755 (executable)
@@ -124,15 +124,10 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
   void
   SetMaterial(std::vector<vtkProperty*> theProps);
 
-  //! Get current front material
+  //! Get current material
   virtual
   vtkProperty* 
-  GetFrontMaterial();
-
-  //! Get current back material
-  virtual
-  vtkProperty* 
-  GetBackMaterial();
+  GetMaterial();
 
   //----------------------------------------------------------------------------
   // For selection mapping purpose