Salome HOME
Remove obsolete conditionals
[modules/geom.git] / src / GEOMGUI / GEOM_Displayer.cxx
index 86b330c586f904c48852fe84490e3cbc2e82958f..b8551a6910b7958369fed45ae17e26ccc605bb22 100644 (file)
 
 #include <GEOMImpl_Types.hxx>
 
-#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
 #include <TColStd_HArray1OfByte.hxx>
-#else
-#include <Graphic3d_HArray1OfBytes.hxx>
-#endif
 
 // If the next macro is defined, autocolor feature works for all sub-shapes;
 // if it is undefined, autocolor feature works for groups only
 // Hard-coded value of shape deflection coefficient for VTK viewer
 const double VTK_MIN_DEFLECTION = 0.001;
 
-#if OCC_VERSION_LARGE > 0x06070000
 // Pixmap caching support
 namespace
 {
@@ -258,7 +253,6 @@ namespace
     }
   }
 }
-#endif
 
 //================================================================
 // Function : getActiveStudy
@@ -485,7 +479,6 @@ GEOM_Displayer::GEOM_Displayer( SalomeApp_Study* st )
   myToActivate = true;
   // This parameter is used for activisation/deactivisation of objects to be displayed
 
-  #if OCC_VERSION_LARGE > 0x06050100 // Functionnality available only in OCCT 6.5.2
   // Activate parallel vizualisation only for testing purpose
   // and if the corresponding env variable is set to 1
   char* parallel_visu = getenv("PARALLEL_VISU");
@@ -494,7 +487,6 @@ GEOM_Displayer::GEOM_Displayer( SalomeApp_Study* st )
     MESSAGE("Parallel visualisation on");
     BRepMesh_IncrementalMesh::SetParallelDefault(Standard_True);
   }
-  #endif
 
   myViewFrame = 0;
 
@@ -884,7 +876,6 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
     aImagePath = propMap.value( GEOM::propertyName( GEOM::Texture ) ).toString();
   }
 
-#if OCC_VERSION_LARGE > 0x06070000
   Handle(Image_PixMap) aPixmap;
   if ( !aImagePath.isEmpty() )
     aPixmap = cacheTextureFor( aImagePath, AISShape );
@@ -900,13 +891,6 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
   else {
     AISShape->SetTextureMapOff();
   }
-#else
-  if ( !aImagePath.isEmpty() ) {
-    AISShape->SetTextureFileName( TCollection_AsciiString( aImagePath.toUtf8().constData() ) );
-    AISShape->SetTextureMapOn();
-    AISShape->DisableTextureModulate();
-  }
-#endif
 
   // set line width
   AISShape->SetWidth( HasWidth() ?
@@ -939,14 +923,9 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
       // custom marker string contains "IdOfTexture"
       int textureId = aList[0].toInt();
       Standard_Integer aWidth, aHeight;
-#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
       Handle(TColStd_HArray1OfByte) aTexture =
-#else
-        Handle(Graphic3d_HArray1OfBytes) aTexture =
-#endif
         GeometryGUI::getTexture( study, textureId, aWidth, aHeight );
       if ( !aTexture.IsNull() ) {
-#if OCC_VERSION_LARGE > 0x06060000 // Porting to OCCT higher 6.6.0 version
         Handle(Prs3d_PointAspect) aTextureAspect =
           new Prs3d_PointAspect( HasColor() ? 
                                 // predefined color, manually set to displayer via GEOM_Displayer::SetColor() function
@@ -955,18 +934,6 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
                                  SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::PointColor ) ).value<QColor>() ),
                                  aWidth, aHeight,
                                  aTexture );
-#else
-       int TextureId = 0;
-        Handle(Prs3d_PointAspect) aTextureAspect =
-          new Prs3d_PointAspect( HasColor() ? 
-                                // predefined color, manually set to displayer via GEOM_Displayer::SetColor() function
-                                (Quantity_NameOfColor)GetColor() : 
-                                // color from properties 
-                                 SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::PointColor ) ).value<QColor>() ), 
-                                ++TextureId,
-                                 aWidth, aHeight,
-                                 aTexture );
-#endif
         AISShape->Attributes()->SetPointAspect( aTextureAspect );
       }
     }
@@ -1973,13 +1940,11 @@ void GEOM_Displayer::AfterDisplay( SALOME_View* v, const SALOME_OCCPrs* p )
   UpdateColorScale(false,false);
 }
 
-#if OCC_VERSION_LARGE > 0x06070000
 void GEOM_Displayer::BeforeErase( SALOME_View* v, const SALOME_OCCPrs* p )
 {
   LightApp_Displayer::BeforeErase( v, p );
   releaseTextures( p );
 }
-#endif
 
 void GEOM_Displayer::AfterErase( SALOME_View* v, const SALOME_OCCPrs* p )
 {