Salome HOME
Update Help for VISU module.
[modules/visu.git] / src / PIPELINE / VISU_DeformedShapePL.cxx
index 9b200331a11350a366748ed4aa4ae466eb48accf..c276548df7820aa02e608f686d19ac9fd9e3f663 100644 (file)
@@ -1,23 +1,23 @@
 //  VISU OBJECT : interactive object for VISU entities implementation
 //
 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-//  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. 
-// 
-//  This library is distributed in the hope that it will be useful, 
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-//  Lesser General Public License for more details. 
-// 
-//  You should have received a copy of the GNU Lesser General Public 
-//  License along with this library; if not, write to the Free Software 
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  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.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
 //
 //
 // File:    VISU_PipeLine.cxx
 
 #include "VISU_DeformedShapePL.hxx"
 #include "VISU_PipeLineUtils.hxx"
-#include "SALOME_Transform.h"
+#include "VTKViewer_Transform.h"
 
 #include <vtkWarpVector.h>
 
-#ifdef _DEBUG_
-static int MYDEBUG = 1;
-#else
-static int MYDEBUG = 0;
-#endif
-
 vtkStandardNewMacro(VISU_DeformedShapePL);
 
 VISU_DeformedShapePL::VISU_DeformedShapePL(){
@@ -70,7 +64,7 @@ float VISU_DeformedShapePL::GetScaleFactor(vtkDataSet* theDataSet){
   for(int i = 0; i < 6; i += 2){
     aVol = fabs(aBounds[i+1] - aBounds[i]);
     if(aVol > 0) {
-      idim++; 
+      idim++;
       aVolume *= aVol;
     }
   }
@@ -79,13 +73,13 @@ float VISU_DeformedShapePL::GetScaleFactor(vtkDataSet* theDataSet){
 }
 
 
-void VISU_DeformedShapePL::SetScale(float theScale) { 
+void VISU_DeformedShapePL::SetScale(float theScale) {
   if(myScaleFactor == theScale) return;
   myScaleFactor = theScale;
   myWarpVector->SetScaleFactor(myScaleFactor);
   Modified();
 }
-float VISU_DeformedShapePL::GetScale() { 
+float VISU_DeformedShapePL::GetScale() {
   return myWarpVector->GetScaleFactor();
 }
 
@@ -93,11 +87,11 @@ void VISU_DeformedShapePL::Init(){
   VISU_ScalarMapPL::Init();
   float aScalarRange[2];
   GetSourceRange(aScalarRange);
-  SetScale(GetScaleFactor(myInput)/aScalarRange[1]);
+  SetScale(GetScaleFactor(GetInput2())/aScalarRange[1]);
 }
 
 VISU_ScalarMapPL::THook* VISU_DeformedShapePL::DoHook(){
-  VISU::CellDataToPoint(myWarpVector,myCellDataToPointData,myInput,myFieldTransform);
+  VISU::CellDataToPoint(myWarpVector,myCellDataToPointData,GetInput2(),myFieldTransform);
   return myWarpVector->GetOutput();
 }