customizing highlighter

Hello forum,

I have a MeshVS_Mesh object, that I displayed using a certain presentation builder

occHandle(MeshVS_MeshPrsBuilder) aBuilder = new MeshVS_MeshPrsBuilder(aMesh,
MeshVS_DMF_OCCMask,
aMesh->GetDataSource());

customized through its drawer

aBuilder->GetDrawer()->SetDouble(MeshVS_DA_EdgeWidth, 1.0);
aBuilder->GetDrawer()->SetBoolean(MeshVS_DA_DisplayNodes,false);
aBuilder->GetDrawer()->SetBoolean(MeshVS_DA_ShowEdges,true);
[...]

finally I added

aMesh->AddBuilder(aBuilder,false);

Then I define another builder, which I use as highlighter:

occHandle(MeshVS_MeshPrsBuilder) aHBuilder = new MeshVS_MeshPrsBuilder(aMesh,
MeshVS_DMF_HilightPrs | MeshVS_DMF_SelectionPrs,
aMesh->GetDataSource());

aMesh->AddBuilder(aHBuilder,true);

Results:
1) The mesh is displayed with the graphic characteristics defined within the drawer of the first builder "aBuilder"

2) When activating a mesh selection mode, the highlight and the selection is graphically occurring
as in Fig.1 and Fig.2, irrespective of the parameters of the highlight builder "aHBuilder"

Any help?

En passant, at the moment only the line

aMesh->DynamicHilightAttributes()->SetColor(Quantity_NOC_RED);

is able to change at least the highlight style, since, as stated in the header file

//! Returns the hilight attributes settings.
//! When not NULL, overrides both Prs3d_TypeOfHighlight_LocalDynamic and Prs3d_TypeOfHighlight_Dynamic defined within AIS_InteractiveContext.

Ciao e grazie mille
Giovanni

Attachments: 
Giovanni Bettega's picture

I used a MeshVS_ElementalColorPrsBuilder as highlighter and I solved
see the attached picture
Ciao
Giovanni