From: gdd Date: Mon, 26 Sep 2011 15:15:41 +0000 (+0000) Subject: solved a remaining issue about puting textures on shapes X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bd4d3a51c9709fa9896bc04e09637d3ee8cc29f6;p=modules%2Fgeom.git solved a remaining issue about puting textures on shapes --- diff --git a/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx b/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx index c068d3870..e597f78e2 100644 --- a/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx +++ b/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx @@ -60,6 +60,7 @@ #include #include +#include #include @@ -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(); diff --git a/src/GEOMGUI/GEOM_Displayer.cxx b/src/GEOMGUI/GEOM_Displayer.cxx index 716d2961d..880b98a3e 100644 --- a/src/GEOMGUI/GEOM_Displayer.cxx +++ b/src/GEOMGUI/GEOM_Displayer.cxx @@ -73,6 +73,7 @@ #include #include #include +#include #include #include #include @@ -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() = "<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 diff --git a/src/OBJECT/GEOM_AISShape.cxx b/src/OBJECT/GEOM_AISShape.cxx index af0be3e5e..860d6c14c 100644 --- a/src/OBJECT/GEOM_AISShape.cxx +++ b/src/OBJECT/GEOM_AISShape.cxx @@ -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())