]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
solved a remaining issue about puting textures on shapes
authorgdd <gdd>
Mon, 26 Sep 2011 15:15:41 +0000 (15:15 +0000)
committergdd <gdd>
Mon, 26 Sep 2011 15:15:41 +0000 (15:15 +0000)
src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx
src/GEOMGUI/GEOM_Displayer.cxx
src/OBJECT/GEOM_AISShape.cxx

index c068d38708fea6cb10555b8d40a0d917dd52d702..e597f78e23e6b9bab0974d32087fbcfe749ea236 100644 (file)
@@ -60,6 +60,7 @@
 
 #include <AIS_TexturedShape.hxx>
 #include <TCollection_AsciiString.hxx>
+#include <StdSelect_DisplayMode.hxx>
 
 #include <Graphic3d_MaterialAspect.hxx>
 
@@ -739,8 +740,7 @@ bool EntityGUI_FeatureDetectorDlg::execute( ObjectList& objects )
     GEOM::GEOM_IBlocksOperations_var aBlocksOperations = myGeomGUI->GetGeomGen()->GetIBlocksOperations( getStudyId() );
     GEOM::GEOM_Object_var aFace = aBlocksOperations->MakeQuad4Vertices(P1,P2,P3,P4);
     getDisplayer()->SetTexture(theImgFileName.toStdString());
-//     getDisplayer()->SetDisplayMode(3);
-    vp->getView()->SetSurfaceDetail(V3d_TEX_ALL);
+    getDisplayer()->SetDisplayMode((Standard_Integer) StdSelect_DM_HLR);
 //     OCCViewer_Viewer*              anOCCViewer =((OCCViewer_ViewWindow*)theViewWindow)->getViewManager())->getOCCViewer();
 //     Handle(AIS_InteractiveContext) aContext = anOCCViewer->getAISContext(); 
     
index 716d2961de7f625e32ec50cf7d105619f54b03e9..880b98a3e088612e04fb62386c04f5517cc03842 100644 (file)
@@ -73,6 +73,7 @@
 #include <Prs3d_PointAspect.hxx>
 #include <StdSelect_TypeOfEdge.hxx>
 #include <StdSelect_TypeOfFace.hxx>
+#include <StdSelect_DisplayMode.hxx>
 #include <TopoDS_Face.hxx>
 #include <BRep_Tool.hxx>
 #include <Geom_Plane.hxx>
@@ -727,14 +728,10 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
         }
         if ( HasTexture() )
         {
-          MESSAGE("GEOM_Displayer::Update HasTexture() == true")
+          AISShape->SetTextureFileName(TCollection_AsciiString(myTexture.c_str()));
           AISShape->SetTextureMapOn();
           AISShape->DisableTextureModulate();
-          AISShape->SetMaterial(Graphic3d_NOM_SATIN);
-          AISShape->SetDisplayMode( 3 );
-          AISShape->SetTextureFileName(TCollection_AsciiString(myTexture.c_str()));
-//           Attributes()->ShadingAspect()
-          MESSAGE("AISShape->TextureFile() = "<<AISShape->TextureFile())
+//           AISShape->SetDisplayMode( (Standard_Integer) StdSelect_DM_HLR );
         }
         else
         {
@@ -922,6 +919,7 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
           }
         }
         // AISShape->SetName(???); ??? necessary to set name ???
+//         AISShape->SetDisplayMode(3);
         occPrs->AddObject( AISShape );
 
         // In accordance with ToActivate() value object will be activated/deactivated
index af0be3e5e33acb0f15c2f6f74a25ceb948e55c3b..860d6c14c60fc286f47fe4f0df0c6286af71ec20 100644 (file)
@@ -207,6 +207,11 @@ void GEOM_AISShape::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresent
       AIS_Shape::Compute(aPresentationManager, aPrs, aMode);
       break;
     }
+  case StdSelect_DM_HLR:
+    {
+      AIS_TexturedShape::Compute(aPresentationManager, aPrs, 3);
+      break;
+    }
   }
 
   if (isShowVectors())