mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-05 04:44:18 +05:00
solved a remaining issue about puting textures on shapes
This commit is contained in:
parent
1aff347400
commit
bd4d3a51c9
@ -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();
|
||||
|
||||
|
@ -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
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user