Salome HOME
Minimize external dependencies: libxml2 is only needed locally for XAO package
[modules/geom.git] / src / OBJECT / GEOM_DeviceActor.cxx
index 266814569d523efd6066d03b4a504f2ae753dee9..4001640e95e324cffaeeb62de21e7ad085943a2c 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2013  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
@@ -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)