]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Fix for the bug #262: Problem with scale Z in VTK.
authorrkv <rkv@opencascade.com>
Fri, 20 Dec 2013 09:07:38 +0000 (09:07 +0000)
committerrkv <rkv@opencascade.com>
Fri, 20 Dec 2013 09:07:38 +0000 (09:07 +0000)
src/HYDROGUI/HYDROGUI_Actor.cxx
src/HYDROGUI/HYDROGUI_Actor.h
src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.cxx

index 4848a0b11435e5d1360004e84f942f5f5416f8c0..9b27a1fdd5e52a66b21916cab6591a038b78c2ae 100644 (file)
@@ -6,6 +6,25 @@
 #include <GEOM_EdgeSource.h>
 #include <GEOM_WireframeFace.h>
 #include <GEOM_ShadingFace.h>
+#include <VTKViewer_TransformFilter.h>
+#include <vtkAppendPolyData.h>
+#include <VTKViewer_Transform.h>
+
+HYDROGUI_Actor::HYDROGUI_Actor()
+{ 
+  myVertexActor->GetDeviceActor()->SetMapper( myVertexActor->GetDeviceActor()->GetMapper() );
+  myIsolatedEdgeActor->GetDeviceActor()->SetMapper( myIsolatedEdgeActor->GetDeviceActor()->GetMapper() );
+  myOneFaceEdgeActor->GetDeviceActor()->SetMapper( myOneFaceEdgeActor->GetDeviceActor()->GetMapper() );
+  mySharedEdgeActor->GetDeviceActor()->SetMapper( mySharedEdgeActor->GetDeviceActor()->GetMapper() );
+  myWireframeFaceActor->GetDeviceActor()->SetMapper( myWireframeFaceActor->GetDeviceActor()->GetMapper() );
+  myShadingFaceActor->GetDeviceActor()->SetMapper( myShadingFaceActor->GetDeviceActor()->GetMapper() );
+  GEOM_Actor::myHighlightActor->GetDeviceActor()->SetMapper( GEOM_Actor::myHighlightActor->GetDeviceActor()->GetMapper() );
+} 
+HYDROGUI_Actor::~HYDROGUI_Actor() 
+{ 
+} 
 
 HYDROGUI_Actor* HYDROGUI_Actor::New()
 {
@@ -15,26 +34,20 @@ HYDROGUI_Actor* HYDROGUI_Actor::New()
 }
 
 void HYDROGUI_Actor::SetMapper( vtkMapper* theMapper )
-{ 
-  SALOME_Actor::SetMapper(theMapper); 
-}
-
-/*double* HYDROGUI_Actor::GetBounds()
 {
-  double* aBounds = GEOM_Actor::GetBounds();
-  return aBounds;
-}*/
+  SALOME_Actor::SetMapper( theMapper );
+}
 
 void HYDROGUI_Actor::SetTransform( VTKViewer_Transform* theTransform )
 {
-  SALOME_Actor::SetTransform( theTransform );
+  Superclass::SetTransform(theTransform);
   myVertexActor       ->GetDeviceActor()->SetTransform( theTransform );
   myIsolatedEdgeActor ->GetDeviceActor()->SetTransform( theTransform );
   myOneFaceEdgeActor  ->GetDeviceActor()->SetTransform( theTransform );
   mySharedEdgeActor   ->GetDeviceActor()->SetTransform( theTransform );
   myWireframeFaceActor->GetDeviceActor()->SetTransform( theTransform );
   myShadingFaceActor  ->GetDeviceActor()->SetTransform( theTransform );
-  myHighlightActor    ->GetDeviceActor()->SetTransform( theTransform );
+  GEOM_Actor::myHighlightActor->GetDeviceActor()->SetTransform( theTransform );
 }
 
 void HYDROGUI_Actor::SetShape( const TopoDS_Shape& theShape,
index 19d6eb53e9a6ca0955cb46747e7f213635907a34..68b6e996353b88665d18f0a4ca8e7cd6c0771227 100644 (file)
@@ -10,14 +10,17 @@ public:
   vtkTypeMacro( HYDROGUI_Actor, GEOM_Actor );
   static HYDROGUI_Actor* New();
 
-  void SetMapper( vtkMapper* theMapper );
-
-  //virtual double* GetBounds();
   virtual void SetTransform( VTKViewer_Transform* theTransform );
 
   void SetShape(const TopoDS_Shape& theShape,
                 float theDeflection,
                 bool theIsVector = false);
+
+  protected:
+  virtual void SetMapper(vtkMapper*);
+
+  HYDROGUI_Actor();
+  ~HYDROGUI_Actor();
 };
 
 #endif
index a75f52a9966f60e4309a4e5df1f50506ff69fd02..94d0d405972527c74849cca6030e536cece42ea7 100644 (file)
@@ -265,7 +265,7 @@ void HYDROGUI_VTKPrsDisplayer::Display( const HYDROData_SequenceOfObjects& theOb
       } 
       else if ( isChanged )
       {
-        aView->Repaint();
+        aView->Repaint( true );
       }
     }
   }