]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Porting on Mandriva 64
authorapo <apo@opencascade.com>
Fri, 7 Apr 2006 12:26:49 +0000 (12:26 +0000)
committerapo <apo@opencascade.com>
Fri, 7 Apr 2006 12:26:49 +0000 (12:26 +0000)
src/GEOM_I/GEOM_Object_i.cc
src/GEOM_I/GEOM_Object_i.hh
src/GEOM_I_Superv/GEOM_Superv_i.cc
src/GEOM_I_Superv/GEOM_Superv_i.hh
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 66e85cbf3bdf9f790de1b0abd4716a461d97c8be..ce27e0ee0e64389e04cb91481c56f160f8ab8d4e 100644 (file)
@@ -253,9 +253,9 @@ SALOMEDS::TMPFile* GEOM_Object_i::GetShapeStream()
 //function : getShape
 //purpose  : return the TopoDS_Shape when client and servant are colocated, be careful
 //=======================================================================
-long GEOM_Object_i::getShape() {
+CORBA::Long GEOM_Object_i::getShape() {
   _geom = _impl->GetValue();
-  return((long)(&_geom));
+  return CORBA::Long(size_t(&_geom));
 }
 
 //=============================================================================
index ab57795893edff68a12aa2dfb9545da202bd9eca..60b97be24b52cae7968801ffc9bddc5246958c61 100644 (file)
@@ -60,7 +60,7 @@ class GEOM_Object_i : public virtual POA_GEOM::GEOM_Object, public virtual SALOM
 
   virtual SALOMEDS::TMPFile* GetShapeStream();
 
-  long getShape();
+  virtual CORBA::Long getShape();
 
   virtual bool IsMainShape() { return _impl->IsMainShape(); }
 
index 9826fc65d14bbebe50ecab878f20b3300543f478..ff1ebd242fb519046b0d151e6c705b669739bacf 100644 (file)
@@ -173,7 +173,7 @@ GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfLong()
 //  AddItemToListOfLong:
 //=============================================================================
 void GEOM_Superv_i::AddItemToListOfLong(GEOM::GEOM_List_ptr& theList, 
-                                       long                     theObject)
+                                       CORBA::Long theObject)
 {
   MESSAGE("GEOM_Superv_i::AddItemToListOfLong(...)");
   if (GEOM_List_i<GEOM::ListOfLong>* aList = 
@@ -197,7 +197,7 @@ GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfDouble()
 //  AddItemToListOfDouble:
 //=============================================================================
 void GEOM_Superv_i::AddItemToListOfDouble(GEOM::GEOM_List_ptr& theList, 
-                                         double                   theObject)
+                                         CORBA::Double theObject)
 {
   MESSAGE("GEOM_Superv_i::AddItemToListOfDouble(...)");
   if (GEOM_List_i<GEOM::ListOfDouble>* aList = 
@@ -344,7 +344,7 @@ PortableServer::ServantBase_var GEOM_Superv_i::GetServant(CORBA::Object_ptr
 //============================================================================
 SALOMEDS::TMPFile* GEOM_Superv_i::Save(SALOMEDS::SComponent_ptr theComponent,
                                       const char* theURL,
-                                      bool isMultiFile)
+                                      CORBA::Boolean isMultiFile)
 {
   SALOMEDS::TMPFile_var aStreamFile;
   return aStreamFile._retn();
@@ -356,7 +356,7 @@ SALOMEDS::TMPFile* GEOM_Superv_i::Save(SALOMEDS::SComponent_ptr theComponent,
 //============================================================================ 
 SALOMEDS::TMPFile* GEOM_Superv_i::SaveASCII(SALOMEDS::SComponent_ptr theComponent,
                                            const char* theURL,
-                                           bool isMultiFile)
+                                           CORBA::Boolean isMultiFile)
 {
   SALOMEDS::TMPFile_var aStreamFile;
   return aStreamFile._retn();
@@ -369,7 +369,7 @@ SALOMEDS::TMPFile* GEOM_Superv_i::SaveASCII(SALOMEDS::SComponent_ptr theComponen
 CORBA::Boolean GEOM_Superv_i::Load(SALOMEDS::SComponent_ptr theComponent,
                                   const SALOMEDS::TMPFile& theStream,
                                   const char* theURL,
-                                  bool isMultiFile)
+                                  CORBA::Boolean isMultiFile)
 {
   return false;
 }
@@ -381,7 +381,7 @@ CORBA::Boolean GEOM_Superv_i::Load(SALOMEDS::SComponent_ptr theComponent,
 CORBA::Boolean GEOM_Superv_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
                                        const SALOMEDS::TMPFile& theStream,
                                        const char* theURL,
-                                       bool isMultiFile)
+                                       CORBA::Boolean isMultiFile)
 {
   return false;
 }
@@ -433,7 +433,7 @@ char* GEOM_Superv_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
 // function : CanPublishInStudy
 // purpose  : 
 //============================================================================
-bool GEOM_Superv_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
+CORBA::Boolean GEOM_Superv_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
 {
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
index 6e64e0b83aa7f4d2e6cb93a769002bcb98e8734c..d64bfb9121e07d87faad6abe3c35ba6b8bc5ae4b 100644 (file)
@@ -66,21 +66,21 @@ public:
   //-----------------------------------------------------------//
   GEOM::GEOM_List_ptr CreateListOfGO();
   void AddItemToListOfGO(GEOM::GEOM_List_ptr& theList, 
-                        GEOM::GEOM_Object_ptr    theObject);
+                        GEOM::GEOM_Object_ptr theObject);
 
   //-----------------------------------------------------------//
   // Create ListOfLong and add items to it                     // 
   //-----------------------------------------------------------//
   GEOM::GEOM_List_ptr CreateListOfLong();
   void AddItemToListOfLong(GEOM::GEOM_List_ptr& theList, 
-                          long    theObject);
+                          CORBA::Long theObject);
   
   //-----------------------------------------------------------//
   // Create ListOfDouble and add items to it                   // 
   //-----------------------------------------------------------//
   GEOM::GEOM_List_ptr CreateListOfDouble();
   void AddItemToListOfDouble(GEOM::GEOM_List_ptr& theList, 
-                            double    theObject);
+                            CORBA::Double theObject);
 
   //-----------------------------------------------------------------------//
   // Inherited methods from SALOMEDS::Driver                               //
@@ -88,21 +88,21 @@ public:
 
   SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
                          const char* theURL,
-                         bool isMultiFile);
+                         CORBA::Boolean isMultiFile);
 
   SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
                               const char* theURL,
-                              bool isMultiFile);
+                              CORBA::Boolean isMultiFile);
   
   CORBA::Boolean Load(SALOMEDS::SComponent_ptr theComponent,
                      const SALOMEDS::TMPFile& theStream,
                      const char* theURL,
-                     bool isMultiFile);
+                     CORBA::Boolean isMultiFile);
 
   CORBA::Boolean LoadASCII(SALOMEDS::SComponent_ptr theComponent,
                           const SALOMEDS::TMPFile& theStream,
                           const char* theURL,
-                          bool isMultiFile);
+                          CORBA::Boolean isMultiFile);
 
   void Close(SALOMEDS::SComponent_ptr theComponent);
   char* ComponentDataType();
@@ -117,7 +117,7 @@ public:
                               CORBA::Boolean isMultiFile,
                               CORBA::Boolean isASCII);
 
-  bool CanPublishInStudy(CORBA::Object_ptr theIOR);
+  CORBA::Boolean CanPublishInStudy(CORBA::Object_ptr theIOR);
   SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
                                       SALOMEDS::SObject_ptr theSObject,
                                       CORBA::Object_ptr theObject,
index d549193b17b801fe7ff15cbfc11e665b05457bf7..8d7a0f4149bce6b23db225334adb17b2e88b8758 100644 (file)
@@ -275,10 +275,10 @@ void GEOM_Actor::Render(vtkRenderer *ren, vtkMapper *Mapper)
   if(myShape.ShapeType() == TopAbs_VERTEX) {
     if(ren){
       //The parameter determine size of vertex actor relate to diagonal of RendererWindow
-      static float delta = 0.01;
-      float X1 = -1, Y1 = -1, Z1 = 0;
+      static vtkFloatingPointType delta = 0.01;
+      vtkFloatingPointType X1 = -1, Y1 = -1, Z1 = 0;
       ren->ViewToWorld(X1,Y1,Z1);
-      float X2 = +1, Y2 = +1, Z2 = 0;
+      vtkFloatingPointType 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);
@@ -308,26 +308,26 @@ void GEOM_Actor::SubShapeOff()
 // Opacity methods
 //-------------------------------------------------------------
 
-void GEOM_Actor::SetOpacity(float opa)
+void GEOM_Actor::SetOpacity(vtkFloatingPointType opa)
 {
   //HighlightProperty->SetOpacity(opa);
   SALOME_Actor::SetOpacity(opa);
   ShadingProperty->SetOpacity(opa);
 }
 
-float GEOM_Actor::GetOpacity() {
+vtkFloatingPointType GEOM_Actor::GetOpacity() {
   return ShadingProperty->GetOpacity();
 }
 
 //-------------------------------------------------------------
 // Color methods
 //-------------------------------------------------------------
-void GEOM_Actor::SetColor(float r,float g,float b) {
+void GEOM_Actor::SetColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) {
   ShadingProperty->SetColor(r,g,b);  
 }
 
-void GEOM_Actor::GetColor(float& r,float& g,float& b) {
-  float color[3];
+void GEOM_Actor::GetColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) {
+  vtkFloatingPointType color[3];
   ShadingProperty->GetColor(color);
   r = color[0];
   g = color[1];
index 7229b9e2b934989d7f826dbfe2424f6cb39fbdca..6bd3f7faf0ddcbd527feddbd949b69cc6de236d2 100644 (file)
@@ -86,12 +86,12 @@ class SALOME_WNT_EXPORT GEOM_Actor : public SALOME_Actor {
   void SetShadingProperty(vtkProperty* Prop);
 
   // Opacity
-  void SetOpacity(float opa);
-  float GetOpacity();
+  void SetOpacity(vtkFloatingPointType opa);
+  vtkFloatingPointType GetOpacity();
 
   // Color
-  void SetColor(float r,float g,float b);
-  void GetColor(float& r,float& g,float& b);
+  void SetColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b);
+  void GetColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b);
 
   virtual bool IsInfinite() {return myIsInfinite;}  
  protected:
index 3e79afb81199d92cf0aa34aaedca51af742d154a..177c326d62cd15eead95e44a54e49eb50b240653 100644 (file)
@@ -78,15 +78,15 @@ public:
                                 vtkTypeMacro( GEOM_VTKTrihedronAxis, VTKViewer_Axis );
   static GEOM_VTKTrihedronAxis* New();
 
-  void                          SetAxis( const gp_Ax1& theAxis, const int theRot, float theColor[ 3 ] );
+  void                          SetAxis( const gp_Ax1& theAxis, const int theRot, vtkFloatingPointType theColor[ 3 ] );
   virtual void                  Render( vtkRenderer* theRenderer );
-  virtual void                  SetSize( float theSize );
+  virtual void                  SetSize( vtkFloatingPointType theSize );
   gp_Pnt                        GetOri() const;
-  void                          SetColor( const float theColor[ 3 ] );
+  void                          SetColor( const vtkFloatingPointType theColor[ 3 ] );
 
 private:
 
-  float                         myOri[ 3 ];
+  vtkFloatingPointType          myOri[ 3 ];
   vtkMatrix4x4*                 myMatrix;
   vtkTransform*                 myTrsf;
 };
@@ -109,11 +109,11 @@ GEOM_VTKTrihedronAxis::~GEOM_VTKTrihedronAxis()
   myTrsf->Delete();
 }
 
-void GEOM_VTKTrihedronAxis::SetSize( float theSize )
+void GEOM_VTKTrihedronAxis::SetSize( vtkFloatingPointType theSize )
 {
-  float aPosition[ 3 ] = { myOri[ 0 ] + myDir[ 0 ] * theSize,
-                           myOri[ 1 ] + myDir[ 1 ] * theSize,
-                           myOri[ 2 ] + myDir[ 2 ] * theSize };
+  vtkFloatingPointType aPosition[ 3 ] = { myOri[ 0 ] + myDir[ 0 ] * theSize,
+                                         myOri[ 1 ] + myDir[ 1 ] * theSize,
+                                         myOri[ 2 ] + myDir[ 2 ] * theSize };
                            
   myLineSource->SetPoint1( myOri[ 0 ], myOri[ 1 ], myOri[ 2 ] );
   myLineSource->SetPoint2( aPosition );
@@ -158,7 +158,7 @@ gp_Pnt GEOM_VTKTrihedronAxis::GetOri() const
 
 void GEOM_VTKTrihedronAxis::SetAxis( const gp_Ax1& theAxis,
                                      const int     theRot,
-                                     float         theColor[ 3 ] )
+                                     vtkFloatingPointType theColor[ 3 ] )
 {
   gp_Pnt aLoc = theAxis.Location();
   gp_Dir aDir = theAxis.Direction();
@@ -171,7 +171,7 @@ void GEOM_VTKTrihedronAxis::SetAxis( const gp_Ax1& theAxis,
   myDir[ 1 ] = aDir.Y();
   myDir[ 2 ] = aDir.Z();
 
-  float aColor[ 3 ] = { 0, 0, 0 };
+  vtkFloatingPointType aColor[ 3 ] = { 0, 0, 0 };
   aColor[ theRot ] = 1;
   vtkProperty* aProperty = vtkProperty::New();
   if ( theColor[ 0 ] == -1 )
@@ -186,7 +186,7 @@ void GEOM_VTKTrihedronAxis::SetAxis( const gp_Ax1& theAxis,
   else if ( theRot == 2 ) myVectorText->SetText( "Z" );
 }
 
-void GEOM_VTKTrihedronAxis::SetColor( const float theColor[ 3 ] )
+void GEOM_VTKTrihedronAxis::SetColor( const vtkFloatingPointType theColor[ 3 ] )
 {
   vtkProperty* aProperty = vtkProperty::New();
   aProperty->SetColor( theColor[ 0 ], theColor[ 1 ], theColor[ 2 ] );
@@ -222,7 +222,7 @@ GEOM_VTKTrihedron::~GEOM_VTKTrihedron()
     myMapper->Delete();
 }
 
-void GEOM_VTKTrihedron::SetSize( float theSize )
+void GEOM_VTKTrihedron::SetSize( vtkFloatingPointType theSize )
 {
   mySize = theSize;
   for ( int i = 0; i < 3; i++ )
@@ -351,7 +351,7 @@ void GEOM_VTKTrihedron::Render(vtkRenderer* r, vtkMapper *)
   ( (GEOM_VTKTrihedronAxis*)myAxis[ 2 ] )->Render( r );
 }
 
-void GEOM_VTKTrihedron::SetColor( float r, float g, float b )
+void GEOM_VTKTrihedron::SetColor( vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b )
 {
   myColor[ 0 ] = r;
   myColor[ 1 ] = g;
@@ -362,7 +362,7 @@ void GEOM_VTKTrihedron::SetColor( float r, float g, float b )
   if ( myAxis[ 2 ] ) ( (GEOM_VTKTrihedronAxis*)myAxis[ 2 ] )->SetColor( myColor );
 }
 
-void GEOM_VTKTrihedron::GetColor( float& r, float& g, float& b )
+void GEOM_VTKTrihedron::GetColor( vtkFloatingPointType& r, vtkFloatingPointType& g, vtkFloatingPointType& b )
 {
   r = myColor[ 0 ];
   g = myColor[ 1 ];
index b67ad3fbb9e7a00dd6e8996ec7969f2601ced367..a439f9f8c03da55a3ca4344ca81e9e36742b515c 100644 (file)
@@ -62,7 +62,7 @@ public:
                                     vtkTypeMacro( GEOM_VTKTrihedron, SALOME_Actor );
   static GEOM_VTKTrihedron*         New();
 
-  virtual float                     GetSize() { return mySize;}
+  virtual vtkFloatingPointType      GetSize() { return mySize;}
 
   virtual void                      SetVisibility( VTKViewer_Trihedron::TVisibility theVis );
   virtual void                      VisibilityOff() { SetVisibility( VTKViewer_Trihedron::eOff ); }
@@ -80,21 +80,21 @@ public:
   virtual void                      Render(vtkRenderer *, vtkMapper *);
   virtual bool                      IsSetCamera() const;
   virtual bool                      IsResizable() const;
-  virtual void                      SetSize( float );
+  virtual void                      SetSize( vtkFloatingPointType );
   virtual void                      SetCamera( vtkCamera* );
 
-  void                              SetColor( float r, float g, float b );
-  void                              GetColor( float& r, float& g, float& b );
+  void                              SetColor( vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b );
+  void                              GetColor( vtkFloatingPointType& r, vtkFloatingPointType& g, vtkFloatingPointType& b );
 
   virtual bool                      hasHighlight() { return false; } 
 
 protected:
   VTKViewer_Axis*                   myAxis[3];
   vtkPolyDataMapper*                myMapper;
-  float                             mySize;
+  vtkFloatingPointType              mySize;
   gp_Pnt                            myLocation;
   gp_Dir                            myDirX, myDirY, myDirZ;
-  float                             myColor[ 3 ];
+  vtkFloatingPointType              myColor[ 3 ];
 };
 
 #endif
index 7bbafa785a623917e0d963736d8a42df3648ff2b..ec03e277414c91deadacb819513e4d39732acbb9 100644 (file)
@@ -166,7 +166,7 @@ void OperationGUI_ClippingDlg::Init()
       double  position[3];
       anActiveCamera->GetPosition(position);
       
-      float bounds[6];
+      vtkFloatingPointType bounds[6];
       aRenderer->ComputeVisiblePropBounds(bounds);
       
       double center[3];
@@ -182,7 +182,7 @@ void OperationGUI_ClippingDlg::Init()
                             (position[1]-center[1])*(position[1]-center[1]) +
                             (position[2]-center[2])*(position[2]-center[2]));
       
-      float range[2] = {distance - width/2.0, distance + width/2.0};
+      vtkFloatingPointType range[2] = {distance - width/2.0, distance + width/2.0};
       
       SpinBox_Near->SetValue(range[0]);
       SpinBox_Far->SetValue(range[1]);
@@ -235,7 +235,7 @@ bool OperationGUI_ClippingDlg::ClickOnApply()
        return false;
       }
       
-      float range[2] = { SpinBox_Near->GetValue(), SpinBox_Far->GetValue() };
+      vtkFloatingPointType range[2] = { SpinBox_Near->GetValue(), SpinBox_Far->GetValue() };
       if (range[0] < 0.0) range[0] = 0.0;
       anActiveCamera->SetClippingRange( range );
       
@@ -329,7 +329,7 @@ void OperationGUI_ClippingDlg::onReset()
       double  position[3];
       anActiveCamera->GetPosition(position);
       
-      float bounds[6];
+      vtkFloatingPointType bounds[6];
       aRenderer->ComputeVisiblePropBounds(bounds);
       
       double center[3];
@@ -345,7 +345,7 @@ void OperationGUI_ClippingDlg::onReset()
                             (position[1]-center[1])*(position[1]-center[1]) +
                             (position[2]-center[2])*(position[2]-center[2]));
       
-      float range[2] = {distance - width/2.0, distance + width/2.0};
+      vtkFloatingPointType range[2] = {distance - width/2.0, distance + width/2.0};
       
       SpinBox_Near->SetValue(range[0]);
       SpinBox_Far->SetValue(range[1]);