Back to index

salome-geom  6.5.0
Functions
GEOMGUI_OCCSelector.cxx File Reference
#include "GEOMGUI_OCCSelector.h"
#include <LightApp_DataSubOwner.h>
#include <OCCViewer_ViewModel.h>
#include <SUIT_Session.h>
#include <SalomeApp_Study.h>
#include <SALOME_InteractiveObject.hxx>
#include <StdSelect_BRepOwner.hxx>
#include <SelectMgr_Selection.hxx>
#include <SelectMgr_EntityOwner.hxx>
#include <SelectMgr_IndexedMapOfOwner.hxx>
#include <SelectBasics_SensitiveEntity.hxx>
#include <AIS_Shape.hxx>
#include <AIS_ListOfInteractive.hxx>
#include <AIS_ListIteratorOfListOfInteractive.hxx>
#include <TopExp.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <TColStd_IndexedMapOfInteger.hxx>
#include <NCollection_DataMap.hxx>

Go to the source code of this file.

Functions

static void getEntityOwners (const Handle(AIS_InteractiveObject)&theObj, const Handle(AIS_InteractiveContext)&theIC, SelectMgr_IndexedMapOfOwner &theMap)

Function Documentation

static void getEntityOwners ( const Handle(AIS_InteractiveObject)&  theObj,
const Handle(AIS_InteractiveContext)&  theIC,
SelectMgr_IndexedMapOfOwner &  theMap 
) [static]

Definition at line 159 of file GEOMGUI_OCCSelector.cxx.

{
  if ( theObj.IsNull() || theIC.IsNull() )
    return;

  TColStd_ListOfInteger modes;
  theIC->ActivatedModes( theObj, modes );

  TColStd_ListIteratorOfListOfInteger itr( modes );
  for (; itr.More(); itr.Next() ) {
    int m = itr.Value();
    if ( !theObj->HasSelection( m ) )
      continue;

    Handle(SelectMgr_Selection) sel = theObj->Selection( m );

    for ( sel->Init(); sel->More(); sel->Next() ) {
      Handle(SelectBasics_SensitiveEntity) entity = sel->Sensitive();
      if ( entity.IsNull() )
        continue;

      Handle(SelectMgr_EntityOwner) owner =
        Handle(SelectMgr_EntityOwner)::DownCast(entity->OwnerId());
      if ( !owner.IsNull() )
        theMap.Add( owner );
    }
  }
}

Here is the call graph for this function: