Salome HOME
Join modifications from branch OCC_debug_for_3_2_0b1
[modules/gui.git] / src / VTKViewer / VTKViewer_ShrinkFilter.cxx
index e6dfc3f86c2b488ec165368b4778a57be2e2151e..c485a7092c7b628906315a4d7f38e9fdfdbbf4dd 100755 (executable)
 #include <vtkPointData.h>
 #include <vtkUnstructuredGrid.h>
 
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-static int MYDEBUGWITHFILES = 0;
-#else
-static int MYDEBUG = 0;
-static int MYDEBUGWITHFILES = 0;
-#endif
-
 vtkCxxRevisionMacro(VTKViewer_ShrinkFilter, "$Revision$");
 vtkStandardNewMacro(VTKViewer_ShrinkFilter);
 
-
+/*!Constructor. Sets store mapping to zero.*/
 VTKViewer_ShrinkFilter::VTKViewer_ShrinkFilter(): 
   myStoreMapping(0)
 {}
 
-
+/*!Destructor.*/
 VTKViewer_ShrinkFilter::~VTKViewer_ShrinkFilter()
 {}
 
 
+/*!Execute method. Calculate output.*/
 void VTKViewer_ShrinkFilter::Execute()
 {
   vtkPoints *newPts;
   int i, j, numIds, abort=0;
   vtkIdType cellId, numCells, numPts;
   vtkIdType oldId, newId;
-  float center[3], *p, pt[3];
+  vtkFloatingPointType center[3], *p, pt[3];
   vtkPointData *pd, *outPD;;
   vtkIdList *ptIds, *newPtIds;
   vtkDataSet *input= this->GetInput();
   vtkUnstructuredGrid *output = this->GetOutput();
   vtkIdType tenth;
-  float decimal;
+  vtkFloatingPointType decimal;
 
   vtkDebugMacro(<<"Shrinking cells");
 
@@ -163,13 +156,16 @@ void VTKViewer_ShrinkFilter::Execute()
   newPts->Delete();
 }
 
-
+/*!Sets store mapping.*/
 void VTKViewer_ShrinkFilter::SetStoreMapping(int theStoreMapping){
   myStoreMapping = theStoreMapping;
   this->Modified();
 }
 
 
+/*!Return node object id by vtk node id.
+ *\retval -1 - if no object, else return id.
+ */
 vtkIdType VTKViewer_ShrinkFilter::GetNodeObjId(int theVtkID){
   if(myVTK2ObjIds.empty() || theVtkID > myVTK2ObjIds.size()) return -1;
   return myVTK2ObjIds.at(theVtkID);