//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));
}
//=============================================================================
virtual SALOMEDS::TMPFile* GetShapeStream();
- long getShape();
+ virtual CORBA::Long getShape();
virtual bool IsMainShape() { return _impl->IsMainShape(); }
// 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 =
// 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 =
//============================================================================
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();
//============================================================================
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();
CORBA::Boolean GEOM_Superv_i::Load(SALOMEDS::SComponent_ptr theComponent,
const SALOMEDS::TMPFile& theStream,
const char* theURL,
- bool isMultiFile)
+ CORBA::Boolean isMultiFile)
{
return false;
}
CORBA::Boolean GEOM_Superv_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
const SALOMEDS::TMPFile& theStream,
const char* theURL,
- bool isMultiFile)
+ CORBA::Boolean isMultiFile)
{
return false;
}
// 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();
//-----------------------------------------------------------//
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 //
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();
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,
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);
// 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];
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:
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;
};
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 );
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();
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 )
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 ] );
myMapper->Delete();
}
-void GEOM_VTKTrihedron::SetSize( float theSize )
+void GEOM_VTKTrihedron::SetSize( vtkFloatingPointType theSize )
{
mySize = theSize;
for ( int i = 0; i < 3; i++ )
( (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;
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 ];
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 ); }
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
double position[3];
anActiveCamera->GetPosition(position);
- float bounds[6];
+ vtkFloatingPointType bounds[6];
aRenderer->ComputeVisiblePropBounds(bounds);
double center[3];
(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]);
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 );
double position[3];
anActiveCamera->GetPosition(position);
- float bounds[6];
+ vtkFloatingPointType bounds[6];
aRenderer->ComputeVisiblePropBounds(bounds);
double center[3];
(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]);