]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Porting to VTK 6.
authorouv <ouv@opencascade.com>
Wed, 30 Jan 2013 12:30:57 +0000 (12:30 +0000)
committerouv <ouv@opencascade.com>
Wed, 30 Jan 2013 12:30:57 +0000 (12:30 +0000)
Compilation with ParaView built without option "-DVTK_LEGACY_REMOVE:BOOL=OFF".

src/GEOMGUI/GEOM_Displayer.cxx
src/OBJECT/GEOM_Actor.cxx
src/OBJECT/GEOM_Actor.h
src/OBJECT/GEOM_VTKTrihedron.cxx
src/OBJECT/GEOM_VTKTrihedron.hxx
src/OperationGUI/OperationGUI_ClippingDlg.cxx

index 873c61f7c000f6bd9d77c74588c977a5dd5bf96d..dd716f4d6f4d60d891e01b69ff55ce445deb55b9 100644 (file)
@@ -1192,7 +1192,7 @@ void GEOM_Displayer::Update( SALOME_VTKPrs* prs )
         aProps.push_back( material.getMaterialVTKProperty( false) );
         aGeomGActor->SetMaterial(aProps);
 
-        vtkFloatingPointType aColor[3] = {1.,0.,0.};
+        double aColor[3] = {1.,0.,0.};
         if ( useObjCol ) { //Get Color from geom object
           Handle( SALOME_InteractiveObject ) anIO = aGeomGActor->getIO();
           if ( !anIO.IsNull() ) {
index 6c92ed63d252ab33031e1f29d66fe41afd0a1eaf..4797f809253b4ffb993fcbb41c8f89ce62bbe5e6 100644 (file)
@@ -578,10 +578,10 @@ void GEOM_Actor::Render(vtkRenderer *ren, vtkMapper *theMapper)
   /*  if(myShape.ShapeType() == TopAbs_VERTEX) {
     if(ren){
       //The parameter determine size of vertex actor relate to diagonal of RendererWindow
-      static vtkFloatingPointType delta = 0.01;
-      vtkFloatingPointType X1 = -1, Y1 = -1, Z1 = 0;
+      static double delta = 0.01;
+      double X1 = -1, Y1 = -1, Z1 = 0;
       ren->ViewToWorld(X1,Y1,Z1);
-      vtkFloatingPointType X2 = +1, Y2 = +1, Z2 = 0;
+      double X2 = +1, Y2 = +1, Z2 = 0;
       ren->ViewToWorld(X2,Y2,Z2);
       Z2 = sqrt((X2-X1)*(X2-X1) + (Y2-Y1)*(Y2-Y1) + (Z2-Z1)*(Z2-Z1));
       this->SetScale(Z2*delta);
@@ -673,7 +673,7 @@ void GEOM_Actor::highlight(bool highlight)
   SALOME_Actor::highlight(highlight);  
 }
 
-void GEOM_Actor::SetOpacity(vtkFloatingPointType opa)
+void GEOM_Actor::SetOpacity(double opa)
 {
   // enk:tested OK
   myShadingFaceProp->SetOpacity(opa);
@@ -683,13 +683,13 @@ void GEOM_Actor::SetOpacity(vtkFloatingPointType opa)
   myVertexActor->GetProperty()->SetOpacity(opa);
 }
 
-vtkFloatingPointType GEOM_Actor::GetOpacity()
+double GEOM_Actor::GetOpacity()
 {
   // enk:tested OK
   return myShadingFaceProp->GetOpacity(); 
 }
 
-void GEOM_Actor::SetColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b)
+void GEOM_Actor::SetColor(double r,double g,double b)
 {
   // enk:tested OK
   myShadingFaceProp->SetColor(r,g,b);                          // shading color (Shading)
@@ -704,10 +704,10 @@ void GEOM_Actor::SetColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloat
   StoreBoundaryColors();
 }
 
-void GEOM_Actor::GetColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b)
+void GEOM_Actor::GetColor(double& r,double& g,double& b)
 {
   // enk:tested OK
-  vtkFloatingPointType aRGB[3];
+  double aRGB[3];
   myShadingFaceProp->GetColor(aRGB);
   r = aRGB[0];
   g = aRGB[1];
@@ -995,7 +995,7 @@ void GEOM_Actor::GetMatrix(vtkCamera* theCam, vtkMatrix4x4 *result)
   this->Transform->Pop();  
 }  
 
-void GEOM_Actor::SetEdgesInShadingColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b)
+void GEOM_Actor::SetEdgesInShadingColor(double r,double g,double b)
 {
   myEdgesInShadingColor[0] = r;
   myEdgesInShadingColor[1] = g;
index f3acde3030d583da1316d6bb81c4238f8a2cbd63..8f30e8588107eb8ae2214a0562e03db7923ea583 100644 (file)
@@ -117,12 +117,12 @@ public:
   void ShallowCopy(vtkProp *prop);
 
   // Opacity
-  void SetOpacity(vtkFloatingPointType opa);
-  vtkFloatingPointType GetOpacity();
+  void SetOpacity(double opa);
+  double GetOpacity();
 
   // Color
-  void SetColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b);
-  void GetColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b);
+  void SetColor(double r,double g,double b);
+  void GetColor(double& r,double& g,double& b);
 
   // Material
   void SetMaterial(std::vector<vtkProperty*> theProps);
@@ -186,7 +186,7 @@ public:
   GetVectorMode();
   
   //! Edges in shading color management
-  void SetEdgesInShadingColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b);
+  void SetEdgesInShadingColor(double r,double g,double b);
 
   void
   StoreIsoNumbers();
@@ -252,8 +252,8 @@ private:
   GEOM_Actor(const GEOM_Actor&);
   void operator=(const GEOM_Actor&);
 
-  vtkFloatingPointType myEdgesInWireframeColor[3];
-  vtkFloatingPointType myEdgesInShadingColor[3];
+  double myEdgesInWireframeColor[3];
+  double myEdgesInShadingColor[3];
 };
 
 #endif //GEOM_ACTOR_H
index e984c7d54f653c78bbf164a1a150dfc32b3b2148..74bf48e0ced51d7e639f6a44f6e6fc240c715067 100644 (file)
@@ -66,15 +66,15 @@ public:
                                 vtkTypeMacro( GEOM_VTKTrihedronAxis, VTKViewer_Axis );
   static GEOM_VTKTrihedronAxis* New();
 
-  void                          SetAxis( const gp_Ax1& theAxis, const int theRot, vtkFloatingPointType theColor[ 3 ] );
+  void                          SetAxis( const gp_Ax1& theAxis, const int theRot, double theColor[ 3 ] );
   virtual void                  Render( vtkRenderer* theRenderer );
-  virtual void                  SetSize( vtkFloatingPointType theSize );
+  virtual void                  SetSize( double theSize );
   gp_Pnt                        GetOri() const;
-  void                          SetColor( const vtkFloatingPointType theColor[ 3 ] );
+  void                          SetColor( const double theColor[ 3 ] );
 
 private:
 
-  vtkFloatingPointType          myOri[ 3 ];
+  double          myOri[ 3 ];
   vtkMatrix4x4*                 myMatrix;
   vtkTransform*                 myTrsf;
 };
@@ -94,9 +94,9 @@ GEOM_VTKTrihedronAxis::~GEOM_VTKTrihedronAxis()
   myTrsf->Delete();
 }
 
-void GEOM_VTKTrihedronAxis::SetSize( vtkFloatingPointType theSize )
+void GEOM_VTKTrihedronAxis::SetSize( double theSize )
 {
-  vtkFloatingPointType aPosition[ 3 ] = { myOri[ 0 ] + myDir[ 0 ] * theSize,
+  double aPosition[ 3 ] = { myOri[ 0 ] + myDir[ 0 ] * theSize,
                                           myOri[ 1 ] + myDir[ 1 ] * theSize,
                                           myOri[ 2 ] + myDir[ 2 ] * theSize };
                            
@@ -154,7 +154,7 @@ gp_Pnt GEOM_VTKTrihedronAxis::GetOri() const
 
 void GEOM_VTKTrihedronAxis::SetAxis( const gp_Ax1& theAxis,
                                      const int     theRot,
-                                     vtkFloatingPointType theColor[ 3 ] )
+                                     double theColor[ 3 ] )
 {
   gp_Pnt aLoc = theAxis.Location();
   gp_Dir aDir = theAxis.Direction();
@@ -167,7 +167,7 @@ void GEOM_VTKTrihedronAxis::SetAxis( const gp_Ax1& theAxis,
   myDir[ 1 ] = aDir.Y();
   myDir[ 2 ] = aDir.Z();
 
-  vtkFloatingPointType aColor[ 3 ] = { 0, 0, 0 };
+  double aColor[ 3 ] = { 0, 0, 0 };
   aColor[ theRot ] = 1;
   if ( theColor[ 0 ] == -1 )
     VTKViewer_Axis::SetColor( aColor[ 0 ], aColor[ 1 ], aColor[ 2 ] );
@@ -185,7 +185,7 @@ void GEOM_VTKTrihedronAxis::SetAxis( const gp_Ax1& theAxis,
 #endif
 }
 
-void GEOM_VTKTrihedronAxis::SetColor( const vtkFloatingPointType theColor[ 3 ] )
+void GEOM_VTKTrihedronAxis::SetColor( const double theColor[ 3 ] )
 {
   VTKViewer_Axis::SetColor( theColor[ 0 ], theColor[ 1 ], theColor[ 2 ] );
 }
@@ -227,7 +227,7 @@ GEOM_VTKTrihedron::~GEOM_VTKTrihedron()
     myMapper->Delete();
 }
 
-void GEOM_VTKTrihedron::SetSize( vtkFloatingPointType theSize )
+void GEOM_VTKTrihedron::SetSize( double theSize )
 {
   mySize = theSize;
   for ( int i = 0; i < 3; i++ )
@@ -362,7 +362,7 @@ void GEOM_VTKTrihedron::Render(vtkRenderer* r, vtkMapper *)
   ( (GEOM_VTKTrihedronAxis*)myAxis[ 2 ] )->Render( r );
 }
 
-void GEOM_VTKTrihedron::SetColor( vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b )
+void GEOM_VTKTrihedron::SetColor( double r, double g, double b )
 {
   myColor[ 0 ] = r;
   myColor[ 1 ] = g;
@@ -373,7 +373,7 @@ void GEOM_VTKTrihedron::SetColor( vtkFloatingPointType r, vtkFloatingPointType g
   if ( myAxis[ 2 ] ) ( (GEOM_VTKTrihedronAxis*)myAxis[ 2 ] )->SetColor( myColor );
 }
 
-void GEOM_VTKTrihedron::GetColor( vtkFloatingPointType& r, vtkFloatingPointType& g, vtkFloatingPointType& b )
+void GEOM_VTKTrihedron::GetColor( double& r, double& g, double& b )
 {
   r = myColor[ 0 ];
   g = myColor[ 1 ];
@@ -426,7 +426,7 @@ void GEOM_VTKTrihedron::ResetAxesColors()
     SetAxesColors( myDefaultColor, true );
 }
 
-void GEOM_VTKTrihedron::SetAxesColors( vtkFloatingPointType theColor[3], bool theIsDiffuse )
+void GEOM_VTKTrihedron::SetAxesColors( double theColor[3], bool theIsDiffuse )
 {
   myAxis[ 0 ]->SetColor( theColor[0], theIsDiffuse ? 0.0 : theColor[1], theIsDiffuse ? 0.0 : theColor[2] );
   myAxis[ 1 ]->SetColor( theIsDiffuse ? 0.0 : theColor[0], theColor[1], theIsDiffuse ? 0.0 : theColor[2] );
index 897312ae006538a19a7d55e44601ce17b6277677..34b97d17ceb07769314c1c367704d87f47ef7a32 100644 (file)
@@ -55,7 +55,7 @@ public:
                                     vtkTypeMacro( GEOM_VTKTrihedron, SALOME_Actor );
   static GEOM_VTKTrihedron*         New();
 
-  virtual vtkFloatingPointType      GetSize() { return mySize;}
+  virtual double      GetSize() { return mySize;}
 
   virtual void                      SetVisibility( int theVisibility );
   virtual void                      SetVisibility( VTKViewer_Trihedron::TVisibility theVis );
@@ -74,11 +74,11 @@ public:
   virtual void                      Render(vtkRenderer *, vtkMapper *);
   virtual bool                      IsSetCamera() const;
   virtual bool                      IsResizable() const;
-  virtual void                      SetSize( vtkFloatingPointType );
+  virtual void                      SetSize( double );
   virtual void                      SetCamera( vtkCamera* );
 
-  void                              SetColor( vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b );
-  void                              GetColor( vtkFloatingPointType& r, vtkFloatingPointType& g, vtkFloatingPointType& b );
+  void                              SetColor( double r, double g, double b );
+  void                              GetColor( double& r, double& g, double& b );
 
   virtual bool                      hasHighlight() { return true; } 
 
@@ -89,18 +89,18 @@ public:
 
 protected:
   virtual void                      ResetAxesColors();
-  virtual void                      SetAxesColors( vtkFloatingPointType theColor[3], bool theIsDiffuse = false );
+  virtual void                      SetAxesColors( double theColor[3], bool theIsDiffuse = false );
 
 protected:
   VTKViewer_Axis*                   myAxis[3];
   vtkPolyDataMapper*                myMapper;
-  vtkFloatingPointType              mySize;
+  double              mySize;
   gp_Pnt                            myLocation;
   gp_Dir                            myDirX, myDirY, myDirZ;
-  vtkFloatingPointType              myColor[ 3 ];
-  vtkFloatingPointType              myDefaultColor[ 3 ];
-  vtkFloatingPointType              myPreHighlightColor[ 3 ];
-  vtkFloatingPointType              myHighlightColor[ 3 ];
+  double              myColor[ 3 ];
+  double              myDefaultColor[ 3 ];
+  double              myPreHighlightColor[ 3 ];
+  double              myHighlightColor[ 3 ];
 };
 
 #endif
index 9e93a9cdbe4189c4de4d6a5ded924e913c48dccb..47f8b5b04f1ec6a58d5db15ef9885521e33c47d0 100644 (file)
@@ -154,7 +154,7 @@ void OperationGUI_ClippingDlg::Init()
     double  position[3];
     anActiveCamera->GetPosition( position );
 
-    vtkFloatingPointType bounds[6];
+    double bounds[6];
     aRenderer->ComputeVisiblePropBounds( bounds );
 
     double center[3];
@@ -170,7 +170,7 @@ void OperationGUI_ClippingDlg::Init()
                             ( position[1]-center[1] ) * ( position[1]-center[1] ) +
                             ( position[2]-center[2] ) * ( position[2]-center[2] ) );
 
-    vtkFloatingPointType range[2] = { distance - width/2.0, distance + width/2.0 };
+    double range[2] = { distance - width/2.0, distance + width/2.0 };
 
     SpinBox_Near->setValue( range[0] );
     SpinBox_Far->setValue( range[1] );
@@ -220,7 +220,7 @@ bool OperationGUI_ClippingDlg::ClickOnApply()
       return false;
     }
 
-    vtkFloatingPointType range[2] = { SpinBox_Near->value(), SpinBox_Far->value() };
+    double range[2] = { SpinBox_Near->value(), SpinBox_Far->value() };
     if ( range[0] < 0.0 ) range[0] = 0.0;
     anActiveCamera->SetClippingRange( range );
 
@@ -302,7 +302,7 @@ void OperationGUI_ClippingDlg::onReset()
     double  position[3];
     anActiveCamera->GetPosition( position );
 
-    vtkFloatingPointType bounds[6];
+    double bounds[6];
     aRenderer->ComputeVisiblePropBounds( bounds );
 
     double center[3];
@@ -318,7 +318,7 @@ void OperationGUI_ClippingDlg::onReset()
                             ( position[1]-center[1] ) * ( position[1]-center[1] ) +
                             ( position[2]-center[2] ) * ( position[2]-center[2] ) );
 
-    vtkFloatingPointType range[2] = { distance - width/2.0, distance + width/2.0 };
+    double range[2] = { distance - width/2.0, distance + width/2.0 };
 
     SpinBox_Near->setValue( range[0] );
     SpinBox_Far->setValue( range[1] );