mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-04-15 21:21:22 +05:00
Porting on Mandriva 64
This commit is contained in:
parent
a3677afe80
commit
106984c3ea
@ -247,17 +247,30 @@ $(top_srcdir)/configure.in: $(top_srcdir)/configure.in.base
|
||||
|
||||
|
||||
ACLOCAL_SRC = \
|
||||
ac_cxx_bool.m4 check_corba.m4 \
|
||||
ac_cxx_depend_flag.m4 check_hdf5.m4 enable_pthreads.m4 \
|
||||
ac_cxx_mutable.m4 check_mico.m4 libtool.m4 \
|
||||
ac_cxx_namespaces.m4 check_omniorb.m4 pyembed.m4 \
|
||||
ac_cxx_partial_specialization.m4 python.m4 \
|
||||
ac_cxx_typename.m4 check_pthreads.m4 check_cas.m4 \
|
||||
ac_cc_warnings.m4 check_swig.m4
|
||||
ac_cxx_bool.m4 \
|
||||
check_corba.m4 \
|
||||
ac_cxx_depend_flag.m4 \
|
||||
check_hdf5.m4 \
|
||||
enable_pthreads.m4 \
|
||||
ac_cxx_mutable.m4 \
|
||||
check_mico.m4 \
|
||||
ac_cxx_namespaces.m4 \
|
||||
check_omniorb.m4 \
|
||||
pyembed.m4 \
|
||||
ac_cxx_partial_specialization.m4 \
|
||||
python.m4 \
|
||||
ac_cxx_typename.m4 \
|
||||
check_pthreads.m4 \
|
||||
check_cas.m4 \
|
||||
ac_cc_warnings.m4 \
|
||||
check_swig.m4
|
||||
|
||||
ACLOCAL_GUI = \
|
||||
check_vtk.m4 check_opengl.m4 check_qt.m4 \
|
||||
check_GUI.m4 check_corba_in_GUI.m4
|
||||
check_vtk.m4 \
|
||||
check_opengl.m4 \
|
||||
check_qt.m4 \
|
||||
check_GUI.m4 \
|
||||
check_corba_in_GUI.m4
|
||||
|
||||
$(top_srcdir)/aclocal.m4: $(ACLOCAL_SRC:%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) \
|
||||
$(ACLOCAL_GUI:%=@GUI_ROOT_DIR@/adm_local/unix/config_files/%)
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
@ -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(); }
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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,
|
||||
|
@ -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];
|
||||
|
@ -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:
|
||||
|
@ -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 ];
|
||||
|
@ -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
|
||||
|
@ -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]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user