case 1:
{
DEBTRACE("Subset of points detection");
- AIS_PointCloud::ComputeSelection( theSelection, SM_SubsetOfPoints );
+ AIS_PointCloud::ComputeSelection( theSelection, SM_SubsetOfPoints ); // SM_Points ?
break;
}
default:
const Handle(SelectMgr_EntityOwner)& theOwner )
{
DEBTRACE("AddPoint");
- Handle(HYDROGUI_BathymetryPointOwner) anOwner = Handle(HYDROGUI_BathymetryPointOwner)::DownCast( theOwner );
+ Handle(AIS_PointCloudOwner) anOwner = Handle(AIS_PointCloudOwner)::DownCast( theOwner );
if( anOwner.IsNull() )
return;
- gp_Pnt p = GetPoint( anOwner->GetIndex() );
- thePoints->AddVertex( p );
+// gp_Pnt p = GetPoint( anOwner->GetIndex() );
+// thePoints->AddVertex( p );
}
void HYDROGUI_BathymetryPrs::HilightOwnerWithColor( const Handle(PrsMgr_PresentationManager3d)& thePM,
const Handle(Prs3d_Drawer)& theColor,
const Handle(SelectMgr_EntityOwner)& theOwner )
{
- DEBTRACE("HilightOwnerWithColor");
- Handle(Prs3d_Presentation) aHilightPrs = GetHilightPresentation( thePM );
- aHilightPrs->SetZLayer( Graphic3d_ZLayerId_Topmost );
- aHilightPrs->Clear();
- Handle(Graphic3d_ArrayOfPoints) points = new Graphic3d_ArrayOfPoints( 1 );
- AddPoint( points, theOwner );
-
- Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup( aHilightPrs );
- Handle(Graphic3d_AspectMarker3d) anAspect = new Graphic3d_AspectMarker3d( Aspect_TOM_X, Quantity_NOC_WHITE, 1.0 );
- aGroup->SetGroupPrimitivesAspect( anAspect );
- aGroup->AddPrimitiveArray( points );
-
- if( thePM->IsImmediateModeOn() )
- thePM->AddToImmediateList( aHilightPrs );
+ DEBTRACE("HilightOwnerWithColor"); // appel si AIS_PointCloud::ComputeSelection( theSelection, SM_Points);
+ Handle(AIS_PointCloudOwner) anOwner = Handle(AIS_PointCloudOwner)::DownCast( theOwner );
+ if (anOwner.IsNull())
+ return;
+ DEBTRACE("---"); // jamais appelé : on n'a pas de AIS_PointCloudOwner
+
+// Handle(Prs3d_Presentation) aHilightPrs = GetHilightPresentation( thePM );
+// aHilightPrs->SetZLayer( Graphic3d_ZLayerId_Topmost );
+// aHilightPrs->Clear();
+// Handle(Graphic3d_ArrayOfPoints) points = new Graphic3d_ArrayOfPoints( 1 );
+// AddPoint( points, theOwner );
+//
+// Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup( aHilightPrs );
+// Handle(Graphic3d_AspectMarker3d) anAspect = new Graphic3d_AspectMarker3d( Aspect_TOM_X, Quantity_NOC_WHITE, 1.0 );
+// aGroup->SetGroupPrimitivesAspect( anAspect );
+// aGroup->AddPrimitiveArray( points );
+//
+// if( thePM->IsImmediateModeOn() )
+// thePM->AddToImmediateList( aHilightPrs );
}
void HYDROGUI_BathymetryPrs::HilightSelected( const Handle(PrsMgr_PresentationManager3d)& thePM,
const SelectMgr_SequenceOfOwner& theOwners )
{
- DEBTRACE("HilightSelected " << theOwners.Size());
+ DEBTRACE("HilightSelected " << theOwners.Size()); // appel si AIS_PointCloud::ComputeSelection( theSelection, SM_SubsetOfPoints );
+ //AIS_PointCloud::HilightSelected(thePM, theOwners); // Non, fige la machine !
if (theOwners.Size() == 0)
return;
Handle(SelectMgr_EntityOwner) owner = theOwners.First();
Handle(AIS_PointCloudOwner) anOwner = Handle(AIS_PointCloudOwner)::DownCast( owner );
if (anOwner.IsNull())
return;
- Handle(TColStd_HPackedMapOfInteger) thePointsH = anOwner->SelectedPoints();
- TColStd_PackedMapOfInteger thePoints = thePointsH->Map();
- DEBTRACE("thePoints.Extent() :" << thePoints.Extent());
- Handle(TColStd_HPackedMapOfInteger) thePointsDH = anOwner->DetectedPoints();
- TColStd_PackedMapOfInteger thePointsD = thePointsDH->Map();
- DEBTRACE("thePointsD.Extent() :" << thePointsD.Extent());
+ DEBTRACE("immediateMode: " << thePM->IsImmediateModeOn()); // semble sans effet
+ const Handle(TColStd_HPackedMapOfInteger)& aSMap = anOwner->SelectedPoints();
+ DEBTRACE("selectedPoints.Extent() :" << aSMap->Map().Extent());
+ const Handle(TColStd_HPackedMapOfInteger)& aDMap = anOwner->DetectedPoints();
+ DEBTRACE("detectedPoints.Extent() :" << aDMap->Map().Extent());
// Handle(Prs3d_Presentation) aSelectPrs = GetSelectPresentation( thePM );