From 53cb6afc242bc76c100df6d4f51e8f316ef37551 Mon Sep 17 00:00:00 2001 From: apo Date: Fri, 7 Apr 2006 12:26:49 +0000 Subject: [PATCH] Porting on Mandriva 64 --- src/GEOM_I/GEOM_Object_i.cc | 4 +-- src/GEOM_I/GEOM_Object_i.hh | 2 +- src/GEOM_I_Superv/GEOM_Superv_i.cc | 14 +++++----- src/GEOM_I_Superv/GEOM_Superv_i.hh | 16 +++++------ src/OBJECT/GEOM_Actor.cxx | 16 +++++------ src/OBJECT/GEOM_Actor.h | 8 +++--- src/OBJECT/GEOM_VTKTrihedron.cxx | 28 +++++++++---------- src/OBJECT/GEOM_VTKTrihedron.hxx | 12 ++++---- src/OperationGUI/OperationGUI_ClippingDlg.cxx | 10 +++---- 9 files changed, 55 insertions(+), 55 deletions(-) diff --git a/src/GEOM_I/GEOM_Object_i.cc b/src/GEOM_I/GEOM_Object_i.cc index 66e85cbf3..ce27e0ee0 100644 --- a/src/GEOM_I/GEOM_Object_i.cc +++ b/src/GEOM_I/GEOM_Object_i.cc @@ -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)); } //============================================================================= diff --git a/src/GEOM_I/GEOM_Object_i.hh b/src/GEOM_I/GEOM_Object_i.hh index ab5779589..60b97be24 100644 --- a/src/GEOM_I/GEOM_Object_i.hh +++ b/src/GEOM_I/GEOM_Object_i.hh @@ -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(); } diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.cc b/src/GEOM_I_Superv/GEOM_Superv_i.cc index 9826fc65d..ff1ebd242 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.cc +++ b/src/GEOM_I_Superv/GEOM_Superv_i.cc @@ -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* 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* 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(); diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.hh b/src/GEOM_I_Superv/GEOM_Superv_i.hh index 6e64e0b83..d64bfb912 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.hh +++ b/src/GEOM_I_Superv/GEOM_Superv_i.hh @@ -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, diff --git a/src/OBJECT/GEOM_Actor.cxx b/src/OBJECT/GEOM_Actor.cxx index d549193b1..8d7a0f414 100644 --- a/src/OBJECT/GEOM_Actor.cxx +++ b/src/OBJECT/GEOM_Actor.cxx @@ -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]; diff --git a/src/OBJECT/GEOM_Actor.h b/src/OBJECT/GEOM_Actor.h index 7229b9e2b..6bd3f7faf 100644 --- a/src/OBJECT/GEOM_Actor.h +++ b/src/OBJECT/GEOM_Actor.h @@ -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: diff --git a/src/OBJECT/GEOM_VTKTrihedron.cxx b/src/OBJECT/GEOM_VTKTrihedron.cxx index 3e79afb81..177c326d6 100644 --- a/src/OBJECT/GEOM_VTKTrihedron.cxx +++ b/src/OBJECT/GEOM_VTKTrihedron.cxx @@ -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 ]; diff --git a/src/OBJECT/GEOM_VTKTrihedron.hxx b/src/OBJECT/GEOM_VTKTrihedron.hxx index b67ad3fbb..a439f9f8c 100644 --- a/src/OBJECT/GEOM_VTKTrihedron.hxx +++ b/src/OBJECT/GEOM_VTKTrihedron.hxx @@ -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 diff --git a/src/OperationGUI/OperationGUI_ClippingDlg.cxx b/src/OperationGUI/OperationGUI_ClippingDlg.cxx index 7bbafa785..ec03e2774 100644 --- a/src/OperationGUI/OperationGUI_ClippingDlg.cxx +++ b/src/OperationGUI/OperationGUI_ClippingDlg.cxx @@ -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]); -- 2.39.2