Compilation with ParaView built without option "-DVTK_LEGACY_REMOVE:BOOL=OFF".
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() ) {
/* 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);
SALOME_Actor::highlight(highlight);
}
-void GEOM_Actor::SetOpacity(vtkFloatingPointType opa)
+void GEOM_Actor::SetOpacity(double opa)
{
// enk:tested OK
myShadingFaceProp->SetOpacity(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)
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];
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;
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);
GetVectorMode();
//! Edges in shading color management
- void SetEdgesInShadingColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b);
+ void SetEdgesInShadingColor(double r,double g,double b);
void
StoreIsoNumbers();
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
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;
};
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 };
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();
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 ] );
#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 ] );
}
myMapper->Delete();
}
-void GEOM_VTKTrihedron::SetSize( vtkFloatingPointType theSize )
+void GEOM_VTKTrihedron::SetSize( double theSize )
{
mySize = theSize;
for ( int i = 0; i < 3; i++ )
( (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;
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 ];
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] );
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 );
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; }
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
double position[3];
anActiveCamera->GetPosition( position );
- vtkFloatingPointType bounds[6];
+ double bounds[6];
aRenderer->ComputeVisiblePropBounds( bounds );
double center[3];
( 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] );
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 );
double position[3];
anActiveCamera->GetPosition( position );
- vtkFloatingPointType bounds[6];
+ double bounds[6];
aRenderer->ComputeVisiblePropBounds( bounds );
double center[3];
( 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] );