]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
bos #17888 VTK viewer: scaling is not applied to GEOM objects occ/17888
authorvsr <vsr@opencascade.com>
Mon, 27 Jan 2020 15:54:27 +0000 (18:54 +0300)
committervsr <vsr@opencascade.com>
Mon, 27 Jan 2020 15:54:27 +0000 (18:54 +0300)
src/OBJECT/GEOM_Actor.cxx
src/OBJECT/GEOM_Actor.h
src/OBJECT/GEOM_DeviceActor.cxx
src/OBJECT/GEOM_DeviceActor.h

index dcda7f7c74b08cf16a99310dc36774c37a4435d2..6d2cef06432707759e20bc522a3fc531c4f3605c 100644 (file)
@@ -1166,3 +1166,20 @@ void GEOM_Actor::SetWidth(const int width) {
 int GEOM_Actor::GetWidth() const {
   return (int)myIsolatedEdgeActor->GetProperty()->GetLineWidth();
 }
+
+void GEOM_Actor::SetTransform(VTKViewer_Transform* theTransform)
+{
+  SALOME_Actor::SetTransform(theTransform);
+
+  myVertexActor->SetTransform(theTransform);
+  myStandaloneVertexActor->SetTransform(theTransform);
+  myIsolatedEdgeActor->SetTransform(theTransform);
+  myOneFaceEdgeActor->SetTransform(theTransform);
+  mySharedEdgeActor->SetTransform(theTransform);
+  myWireframeFaceActor->SetTransform(theTransform);
+  myShadingFaceActor->SetTransform(theTransform);
+  myHighlightActor->SetTransform(theTransform);
+  //myTextActor->SetTransform(theTransform);
+
+  Modified();
+}
index fe7fd4e913604d39b266d9615ebc53bc136fb765..c449ceb15165f947379481094f9abc78b1b3986b 100644 (file)
@@ -80,6 +80,8 @@ public:
   void SetSelected(bool theIsSelected);
   bool IsSelected() const { return myIsSelected;}
 
+  void SetTransform(VTKViewer_Transform* theTransform); 
+
   // OLD METHODS
   // Properties
   void SetHighlightProperty(vtkProperty* Prop);
index fd48878f148f26fe70284af43e386d35fc174752..307cbb15e197a23c7fa896a37c7abe9f4e266034 100644 (file)
@@ -28,6 +28,7 @@
 #include <vtkPolyDataNormals.h>  
 #include <vtkActor.h> 
 #include <VTKViewer_Actor.h>
+#include <VTKViewer_Transform.h>
 #include <vtkRenderer.h> 
  
 vtkStandardNewMacro(GEOM_DeviceActor);
@@ -118,3 +119,10 @@ RemoveFromRender(vtkRenderer* theRenderer)
 {
   theRenderer->RemoveActor(myActor.GetPointer());
 }
+
+void
+GEOM_DeviceActor:: 
+SetTransform(VTKViewer_Transform* theTransform)
+{
+  myActor->SetTransform(theTransform);
+}
index 4432592a99c11bf8159c29a2fa3513674374fe87..7cdaab652971da1d4096f8d4b1b28046485d6dde 100644 (file)
@@ -44,6 +44,7 @@ class vtkRenderer;
 #include <vtkObject.h> 
  
 class vtkAlgorithmOutput;
+class VTKViewer_Transform;
  
 class VTK_EXPORT GEOM_DeviceActor: public vtkObject 
 {  
@@ -66,6 +67,8 @@ public:
   void RemoveFromRender(vtkRenderer* theRenderer);
   
   PActor GetDeviceActor() {return myActor;}
+
+  void SetTransform(VTKViewer_Transform* theTransform); 
  
 protected: 
   PPolyDataNormals myPolyDataNormals;