Salome HOME
0022777: [CEA 1291] Display the name of an object in the 3D View (fixed problem for...
[modules/geom.git] / src / OBJECT / GEOM_DeviceActor.cxx
index 266814569d523efd6066d03b4a504f2ae753dee9..bc85bb36652804fed0a360bc2bef13afc48f603d 100755 (executable)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -38,8 +38,8 @@ GEOM_DeviceActor::GEOM_DeviceActor():
   myPolyDataNormals(vtkPolyDataNormals::New(),true), 
   myActor(VTKViewer_Actor::New(),true) 
 { 
-  myStripper->SetInput(myPolyDataNormals->GetOutput()); 
-  myPolyDataMapper->SetInput(myStripper->GetOutput()); 
+  myStripper->SetInputConnection(myPolyDataNormals->GetOutputPort()); 
+  myPolyDataMapper->SetInputConnection(myStripper->GetOutputPort()); 
  
   myActor->SetMapper(myPolyDataMapper.Get()); 
   myActor->PickableOff(); 
@@ -51,12 +51,16 @@ GEOM_DeviceActor::~GEOM_DeviceActor()
  
 void 
 GEOM_DeviceActor:: 
-SetInput(vtkPolyData* thePolyData, bool theUseStripper)
+SetInput(vtkAlgorithmOutput* thePolyData, bool theUseStripper)
 { 
   if(theUseStripper)
-    myPolyDataNormals->SetInput(thePolyData); 
+  {
+    myPolyDataNormals->SetInputConnection(thePolyData); 
+    myStripper->SetInputConnection(myPolyDataNormals->GetOutputPort()); 
+    myPolyDataMapper->SetInputConnection(myStripper->GetOutputPort()); 
+  }
   else 
-    myPolyDataMapper->SetInput(thePolyData); 
+    myPolyDataMapper->SetInputConnection(thePolyData); 
 }
  
 void 
@@ -72,7 +76,21 @@ GetProperty()
 {
   return myActor->GetProperty();
 }
-
+void
+GEOM_DeviceActor::
+SetBackfaceProperty(vtkProperty* theProperty)
+{
+  myActor->SetBackfaceProperty(theProperty);
+}
+vtkProperty*
+GEOM_DeviceActor::
+GetBackfaceProperty()
+{
+  return myActor->GetBackfaceProperty();
+}
 void 
 GEOM_DeviceActor:: 
 SetVisibility(int theVisibility)