case GEOMOp::OpShading: // POPUP MENU - DISPLAY MODE - SHADING
ChangeDisplayMode( 1 );
break;
+ case GEOMOp::OpTexture: // POPUP MENU - DISPLAY MODE - TEXTURE
+ ChangeDisplayMode( 3 );
+ break;
case GEOMOp::OpVectors: // POPUP MENU - DISPLAY MODE - SHOW EDGE DIRECTION
ChangeDisplayMode( 2 );
break;
ic->SetDisplayMode( interIter.Value(), AIS_WireFrame, false );
else if ( mode == 1 )
ic->SetDisplayMode( interIter.Value(), AIS_Shaded, false );
- if (mode == 2 ) {
+ else if ( mode == 3 )
+ ic->SetDisplayMode( interIter.Value(), AIS_ExactHLR, false );
+ else if (mode == 2 ) {
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( interIter.Value() );
if ( !aSh.IsNull() ) {
- vectorMode = !aSh->isShowVectors();
+ vectorMode = !aSh->isShowVectors();
aSh->SetDisplayVectors(vectorMode);
ic->RecomputePrsOnly(interIter.Value());
}
}
}
- if(mode == 0 || mode == 1) {
- aStudy->setObjectProperty(mgrId, It.Value()->getEntry(),DISPLAY_MODE_PROP, mode);
- } else if (mode == 2) {
- aStudy->setObjectProperty(mgrId, It.Value()->getEntry(),VECTOR_MODE_PROP, vectorMode);
- }
+ if(mode == 0 || mode == 1) {
+ aStudy->setObjectProperty(mgrId, It.Value()->getEntry(),DISPLAY_MODE_PROP, mode);
+ } else if (mode == 2) {
+ aStudy->setObjectProperty(mgrId, It.Value()->getEntry(),VECTOR_MODE_PROP, vectorMode);
+ }
}
}
ic->UpdateCurrentViewer();
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((Standard_Integer) StdSelect_DM_HLR);
+ getDisplayer()->SetDisplayMode( 3 );
// OCCViewer_Viewer* anOCCViewer =((OCCViewer_ViewWindow*)theViewWindow)->getViewManager())->getOCCViewer();
// Handle(AIS_InteractiveContext) aContext = anOCCViewer->getAISContext();
} else
useObjColor = true;
}else {
+ MESSAGE("myDisplayMode = "<< myDisplayMode)
AISShape->SetDisplayMode( myDisplayMode );
AISShape->SetShadingColor( myShadingColor );
}
AISShape->SetTextureFileName(TCollection_AsciiString(myTexture.c_str()));
AISShape->SetTextureMapOn();
AISShape->DisableTextureModulate();
+ AISShape->SetDisplayMode(3);
// AISShape->SetDisplayMode( (Standard_Integer) StdSelect_DM_HLR );
}
else
case GEOMOp::OpSwitchVectors: // MENU VIEW - VECTOR MODE
case GEOMOp::OpWireframe: // POPUP MENU - WIREFRAME
case GEOMOp::OpShading: // POPUP MENU - SHADING
+ case GEOMOp::OpTexture: // POPUP MENU - TEXTURE
case GEOMOp::OpVectors: // POPUP MENU - VECTORS
libName = "DisplayGUI";
break;
createGeomAction( GEOMOp::OpWireframe, "POP_WIREFRAME", "", 0, true );
createGeomAction( GEOMOp::OpShading, "POP_SHADING", "", 0, true );
+ createGeomAction( GEOMOp::OpTexture, "POP_TEXTURE", "", 0, true );
createGeomAction( GEOMOp::OpVectors, "POP_VECTORS", "", 0, true );
createGeomAction( GEOMOp::OpDeflection, "POP_DEFLECTION" );
createGeomAction( GEOMOp::OpColor, "POP_COLOR" );
mgr->insert( action( GEOMOp::OpShading ), dispmodeId, -1 ); // shading
mgr->setRule( action( GEOMOp::OpShading ), clientOCCorVTK_AndSomeVisible, QtxPopupMgr::VisibleRule );
mgr->setRule( action( GEOMOp::OpShading ), clientOCCorVTK + " and displaymode='Shading'", QtxPopupMgr::ToggleRule );
+ mgr->insert( action( GEOMOp::OpTexture ), dispmodeId, -1 ); // wireframe
+ mgr->setRule( action( GEOMOp::OpTexture ), clientOCCorVTK_AndSomeVisible, QtxPopupMgr::VisibleRule );
+ mgr->setRule( action( GEOMOp::OpTexture), clientOCCorVTK + " and displaymode='Texture'", QtxPopupMgr::ToggleRule );
mgr->insert( separator(), dispmodeId, -1 );
mgr->insert( action( GEOMOp::OpVectors ), dispmodeId, -1 ); // vectors
mgr->setRule( action( GEOMOp::OpVectors ), clientOCCorVTK_AndSomeVisible, QtxPopupMgr::VisibleRule );
OpWireframe = 2200, // POPUP MENU - DISPLAY MODE - WIREFRAME
OpShading = 2201, // POPUP MENU - DISPLAY MODE - SHADING
OpVectors = 2202, // POPUP MENU - DISPLAY MODE - SHOW EDGE DIRECTION
+ OpTexture = 2203, // POPUP MENU - DISPLAY MODE - TEXTURE
// BasicGUI ------------------//--------------------------------
OpPoint = 3000, // MENU NEW ENTITY - BASIC - POINT
OpLine = 3001, // MENU NEW ENTITY - BASIC - LINE
{
if (IsInfinite()) aPrs->SetInfiniteState(Standard_True); //pas de prise en compte lors du FITALL
- StdSelect_DisplayMode d = (StdSelect_DisplayMode) aMode;
-
- switch (d) {
- case StdSelect_DM_Wireframe:
+// StdSelect_DisplayMode d = (StdSelect_DisplayMode) aMode;
+ std::cout<<"aMode = "<<aMode<<" ======================= GEOM_AISShape::Compute ========================="<<std::endl;
+ switch (aMode) {
+ case 0://StdSelect_DM_Wireframe:
{
StdPrs_WFDeflectionShape::Add(aPrs,myshape,myDrawer);
break;
}
- case StdSelect_DM_Shading:
+ case 1://StdSelect_DM_Shading:
{
myDrawer->ShadingAspect()->Aspect()->SetDistinguishOn();
AIS_Shape::Compute(aPresentationManager, aPrs, aMode);
break;
}
- case StdSelect_DM_HLR:
+ case 3: //StdSelect_DM_HLR:
{
- AIS_TexturedShape::Compute(aPresentationManager, aPrs, 3);
+ AIS_TexturedShape::Compute(aPresentationManager, aPrs, aMode);
break;
}
}