Salome HOME
Merge from BR_PORTING_VTK6 01/03/2013
[modules/geom.git] / src / OCC2VTK / GEOM_ShadingFace.cxx
index ad2ae5b186eff507d53547bb900ddd193901ed0a..7352e5eb64afd805856a0f92e767e856fa689ef2 100755 (executable)
 
 #include <vtkPolyDataMapper.h>  
 #include <vtkPolyData.h>  
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
 
 #include <BRep_Tool.hxx>
 #include <Poly_Triangulation.hxx>
+
 
 vtkStandardNewMacro(GEOM_ShadingFace);
  
 GEOM_ShadingFace::GEOM_ShadingFace() 
 { 
+  this->SetNumberOfInputPorts(0);
 } 
  
 GEOM_ShadingFace::~GEOM_ShadingFace() 
 { 
 } 
  
-void
-GEOM_ShadingFace:: 
-Execute()
+int GEOM_ShadingFace::RequestData(vtkInformation *vtkNotUsed(request),
+                                  vtkInformationVector **vtkNotUsed(inputVector),
+                                  vtkInformationVector *outputVector)
 {
-  vtkPolyData* aPolyData = GetOutput();
+  vtkInformation *outInfo = outputVector->GetInformationObject(0);
+  vtkPolyData *aPolyData = vtkPolyData::SafeDownCast(
+    outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
   aPolyData->Allocate();
   vtkPoints* aPts = vtkPoints::New();
   aPolyData->SetPoints(aPts);
@@ -56,6 +62,7 @@ Execute()
     const TopoDS_Face& aFace = anIter.Value();
     OCC2VTK(aFace,aPolyData,aPts);
   }
+  return 1;
 }
 
 void