Version: 9.15.0
SVTK_SelectorDef Class Reference

#include <SVTK_SelectorDef.h>

Inheritance diagram for SVTK_SelectorDef:
Inheritance graph

Classes

struct  TIndexedMapOfInteger
 
struct  TIOLessThan
 

Public Member Functions

 SVTK_SelectorDef ()
 
virtual ~SVTK_SelectorDef ()
 
virtual void SetSelectionMode (Selection_Mode theMode)
 
virtual Selection_Mode SelectionMode () const
 Get current Selection_Mode. More...
 
virtual void ClearIObjects ()
 
virtual SALOME_ActorGetActor (const Handle(SALOME_InteractiveObject)&theIO) const
 
virtual bool IsSelected (const Handle(SALOME_InteractiveObject)&theIO) const
 
virtual bool IsSelected (SALOME_Actor *theActor) const
 
virtual bool AddIObject (const Handle(SALOME_InteractiveObject)&theIO)
 
virtual bool AddIObject (SALOME_Actor *theActor)
 
virtual bool RemoveIObject (const Handle(SALOME_InteractiveObject)&theIO)
 
virtual bool RemoveIObject (SALOME_Actor *theActor)
 
virtual const SALOME_ListIOStoredIObjects () const
 
virtual int IObjectCount () const
 
virtual bool HasIndex (const Handle(SALOME_InteractiveObject)&theIO) const
 
virtual void GetIndex (const Handle(SALOME_InteractiveObject)&theIO, SVTK_TIndexedMapOfVtkId &theIndex)
 
virtual bool AddOrRemoveIndex (const Handle(SALOME_InteractiveObject)&theIO, const SVTK_TIndexedMapOfVtkId &theIndices, bool theIsModeShift)
 
virtual bool AddOrRemoveIndex (const Handle(SALOME_InteractiveObject)&theIO, const SVTK_TVtkIDsMap &theIndices, bool theIsModeShift)
 
virtual bool AddOrRemoveIndex (const Handle(SALOME_InteractiveObject)&theIO, int theIndex, bool theIsModeShift)
 
virtual void RemoveIndex (const Handle(SALOME_InteractiveObject)&theIO, int theIndex)
 
virtual bool IsIndexSelected (const Handle(SALOME_InteractiveObject)&theIO, int theIndex) const
 
virtual void ClearIndex ()
 
virtual bool HasCompositeIndex (const Handle(SALOME_InteractiveObject)&theIO) const
 ! Composite indexes More...
 
virtual void GetCompositeIndex (const Handle(SALOME_InteractiveObject)&theIO, SVTK_IndexedMapOfVtkIds &theIds)
 
virtual bool AddOrRemoveCompositeIndex (const Handle(SALOME_InteractiveObject)&theIO, const SVTK_IndexedMapOfVtkIds &theIds, bool theIsModeShift)
 
virtual bool AddOrRemoveCompositeIndex (const Handle(SALOME_InteractiveObject)&theIO, SVTK_ListOfVtk theIds, bool theIsModeShift)
 
virtual void RemoveCompositeIndex (const Handle(SALOME_InteractiveObject)&theIO, SVTK_ListOfVtk theIds)
 
virtual bool IsCompositeIndexSelected (const Handle(SALOME_InteractiveObject)&theIO, SVTK_ListOfVtk theIds) const
 
virtual void ClearCompositeIndex ()
 
virtual void SetFilter (const Handle(VTKViewer_Filter)&theFilter)
 
virtual Handle (VTKViewer_Filter) GetFilter(const TFilterID theId) const
 To get a section filter by its number. More...
 
virtual bool IsFilterPresent (const TFilterID theId) const
 
virtual void RemoveFilter (const int theId)
 
virtual bool IsValid (SALOME_Actor *theActor, const TFilterID theId, const bool theIsNode=false) const
 
virtual void StartPickCallback ()
 
virtual void EndPickCallback ()
 
virtual vtkActorCollection * Pick (const SVTK_SelectionEvent *theEvent, vtkRenderer *theRenderer) const
 
virtual void SetTolerance (const double &theTolerance)
 
virtual void SetDynamicPreSelection (bool theIsDynPreselect)
 
virtual bool GetDynamicPreSelection () const
 
virtual void SetPreSelectionEnabled (bool theEnabled)
 
virtual bool IsPreSelectionEnabled () const
 
virtual void SetSelectionEnabled (bool theEnabled)
 
virtual bool IsSelectionEnabled () const
 
- Public Member Functions inherited from SVTK_Selector
 vtkTypeMacro (SVTK_Selector, vtkObject) virtual void SetSelectionMode(Selection_Mode theMode)=0
 To change current Selection_Mode (as outside effect, it invokes selectionChange signal) More...
 

Private Types

typedef std::set< Handle(SALOME_InteractiveObject), TIOLessThanTIObjects
 
typedef std::map< Handle(SALOME_InteractiveObject), vtkSmartPointer< SALOME_Actor >, TIOLessThanTIO2Actors
 
typedef std::map< Handle(SALOME_InteractiveObject), TIndexedMapOfInteger, TIOLessThanTMapIOSubIndex
 
typedef std::map< Handle(SALOME_InteractiveObject), SVTK_IndexedMapOfVtkIds, TIOLessThanTMapIOSubCompositeIndex
 
typedef std::map< TFilterID, Handle(VTKViewer_Filter)> TFilters
 

Private Attributes

int mySelectionMode
 
bool myDynamicPreselection
 
bool myPreselectionEnabled
 
bool mySelectionEnabled
 
SALOME_ListIO myIObjectList
 
TIObjects myIObjects
 
TIO2Actors myIO2Actors
 
TMapIOSubIndex myMapIOSubIndex
 
TMapIOSubCompositeIndex myMapIOSubCompositeIndex
 
TFilters myFilters
 
vtkSmartPointer< vtkPicker > myPicker
 
vtkSmartPointer< vtkCellPicker > myCellPicker
 

Additional Inherited Members

- Public Types inherited from SVTK_Selector
typedef int TFilterID
 
- Static Public Member Functions inherited from SVTK_Selector
static SVTK_SelectorNew ()
 

Member Typedef Documentation

◆ TFilters

◆ TIO2Actors

◆ TIObjects

◆ TMapIOSubCompositeIndex

◆ TMapIOSubIndex

Constructor & Destructor Documentation

◆ SVTK_SelectorDef()

SVTK_SelectorDef::SVTK_SelectorDef ( )

Default constructor

References ActorSelection.

◆ ~SVTK_SelectorDef()

SVTK_SelectorDef::~SVTK_SelectorDef ( )
virtual

Destructor

Member Function Documentation

◆ AddIObject() [1/2]

bool SVTK_SelectorDef::AddIObject ( const Handle(SALOME_InteractiveObject)&  theIO)
virtual

Adds SALOME_InteractiveObject into selection

Parameters
theIO- SALOME_InteractiveObject

Implements SVTK_Selector.

◆ AddIObject() [2/2]

bool SVTK_SelectorDef::AddIObject ( SALOME_Actor theActor)
virtual

Adds SALOME_Actor into selection

Parameters
theActor- SALOME_Actor

Implements SVTK_Selector.

References Handle().

◆ AddOrRemoveCompositeIndex() [1/2]

bool SVTK_SelectorDef::AddOrRemoveCompositeIndex ( const Handle(SALOME_InteractiveObject)&  theIO,
const SVTK_IndexedMapOfVtkIds theIds,
bool  theIsModeShift 
)
virtual

Changes composite indices of subselection for SALOME_InteractiveObject

Parameters
theIO- SALOME_InteractiveObject
theIndices- composite id
theIsModeShift- if it is false, then map will be cleared before indices are added

Implements SVTK_Selector.

◆ AddOrRemoveCompositeIndex() [2/2]

bool SVTK_SelectorDef::AddOrRemoveCompositeIndex ( const Handle(SALOME_InteractiveObject)&  theIO,
SVTK_ListOfVtk  theIds,
bool  theIsModeShift 
)
virtual

Changes indices of subselection for SALOME_InteractiveObject

Parameters
theIO- SALOME_InteractiveObject
theIds- composite ids
theIsModeShift- if it is false, then map will be cleared before indices are added

Implements SVTK_Selector.

References removeCompositeIndex().

◆ AddOrRemoveIndex() [1/3]

bool SVTK_SelectorDef::AddOrRemoveIndex ( const Handle(SALOME_InteractiveObject)&  theIO,
const SVTK_TIndexedMapOfVtkId theIndices,
bool  theIsModeShift 
)
virtual

Changes indices of subselection for SALOME_InteractiveObject

Parameters
theIO- SALOME_InteractiveObject
theIndices- indices
theIsModeShift- if it is false, then map will be cleared before indices are added

Implements SVTK_Selector.

References SVTK_SelectorDef::TIndexedMapOfInteger::myMap.

◆ AddOrRemoveIndex() [2/3]

bool SVTK_SelectorDef::AddOrRemoveIndex ( const Handle(SALOME_InteractiveObject)&  theIO,
const SVTK_TVtkIDsMap theIndices,
bool  theIsModeShift 
)
virtual

Changes indices of subselection for SALOME_InteractiveObject

Parameters
theIO- SALOME_InteractiveObject
theIndices- indices
theIsModeShift- if it is false, then map will be cleared before indices are added

Implements SVTK_Selector.

References SVTK_SelectorDef::TIndexedMapOfInteger::myMap.

◆ AddOrRemoveIndex() [3/3]

bool SVTK_SelectorDef::AddOrRemoveIndex ( const Handle(SALOME_InteractiveObject)&  theIO,
int  theIndex,
bool  theIsModeShift 
)
virtual

Changes indices of subselection for SALOME_InteractiveObject

Parameters
theIO- SALOME_InteractiveObject
theIndex- index
theIsModeShift- if it is false, then map will be cleared before indices are added

Implements SVTK_Selector.

References SVTK_SelectorDef::TIndexedMapOfInteger::myMap, and removeIndex().

◆ ClearCompositeIndex()

void SVTK_SelectorDef::ClearCompositeIndex ( )
virtual

Clears all composite indices of subselection

Implements SVTK_Selector.

◆ ClearIndex()

void SVTK_SelectorDef::ClearIndex ( )
virtual

Clears all indices of subselection

Implements SVTK_Selector.

◆ ClearIObjects()

void SVTK_SelectorDef::ClearIObjects ( )
virtual

Clear selection

Implements SVTK_Selector.

◆ EndPickCallback()

void SVTK_SelectorDef::EndPickCallback ( )
virtual

To invoke selectionChanged signals

Implements SVTK_Selector.

◆ GetActor()

SALOME_Actor * SVTK_SelectorDef::GetActor ( const Handle(SALOME_InteractiveObject)&  theIO) const
virtual
Returns
corresponding SALOME_Actor for SALOME_InteractiveObject
Parameters
theIO- SALOME_InteractiveObject

Implements SVTK_Selector.

◆ GetCompositeIndex()

void SVTK_SelectorDef::GetCompositeIndex ( const Handle(SALOME_InteractiveObject)&  theIO,
SVTK_IndexedMapOfVtkIds theIds 
)
virtual

Gets composite indices of subselection for SALOME_InteractiveObject

Parameters
theIO- SALOME_InteractiveObject

Implements SVTK_Selector.

◆ GetDynamicPreSelection()

bool SVTK_SelectorDef::GetDynamicPreSelection ( ) const
virtual

Implements SVTK_Selector.

◆ GetIndex()

void SVTK_SelectorDef::GetIndex ( const Handle(SALOME_InteractiveObject)&  theIO,
SVTK_TIndexedMapOfVtkId theIndex 
)
virtual

Gets indices of subselection for SALOME_InteractiveObject

Parameters
theIO- SALOME_InteractiveObject

Implements SVTK_Selector.

◆ Handle()

virtual SVTK_SelectorDef::Handle ( VTKViewer_Filter  ) const
virtual

To get a section filter by its number.

Implements SVTK_Selector.

◆ HasCompositeIndex()

bool SVTK_SelectorDef::HasCompositeIndex ( const Handle(SALOME_InteractiveObject)&  theIO) const
virtual

! Composite indexes

Returns
true if the SALOME_InteractiveObject has a composite index subselection
Parameters
theIO- SALOME_InteractiveObject

Implements SVTK_Selector.

◆ HasIndex()

bool SVTK_SelectorDef::HasIndex ( const Handle(SALOME_InteractiveObject)&  theIO) const
virtual
Returns
true if the SALOME_InteractiveObject has a subselection
Parameters
theIO- SALOME_InteractiveObject

Implements SVTK_Selector.

◆ IObjectCount()

int SVTK_SelectorDef::IObjectCount ( ) const
virtual
Returns
number of selected objects

< TODO: conversion from size_t to int

Implements SVTK_Selector.

◆ IsCompositeIndexSelected()

bool SVTK_SelectorDef::IsCompositeIndexSelected ( const Handle(SALOME_InteractiveObject)&  theIO,
SVTK_ListOfVtk  theIds 
) const
virtual
Returns
true if the composite index presents in subselection
Parameters
theIO- SALOME_InteractiveObject
theIds- index

Implements SVTK_Selector.

◆ IsFilterPresent()

bool SVTK_SelectorDef::IsFilterPresent ( const TFilterID  theId) const
virtual
Returns
true if filter with given number is applyed
Parameters
theId- filter id

Implements SVTK_Selector.

◆ IsIndexSelected()

bool SVTK_SelectorDef::IsIndexSelected ( const Handle(SALOME_InteractiveObject)&  theIO,
int  theIndex 
) const
virtual
Returns
true if the index presents in subselection
Parameters
theIO- SALOME_InteractiveObject
theIndex- index

Implements SVTK_Selector.

◆ IsPreSelectionEnabled()

bool SVTK_SelectorDef::IsPreSelectionEnabled ( ) const
virtual

Implements SVTK_Selector.

◆ IsSelected() [1/2]

bool SVTK_SelectorDef::IsSelected ( const Handle(SALOME_InteractiveObject)&  theIO) const
virtual
Returns
true if the SALOME_InteractiveObject presents into selection

Implements SVTK_Selector.

◆ IsSelected() [2/2]

bool SVTK_SelectorDef::IsSelected ( SALOME_Actor theActor) const
virtual
Returns
true if the SALOME_Actor presents into selection

Implements SVTK_Selector.

References Handle().

◆ IsSelectionEnabled()

bool SVTK_SelectorDef::IsSelectionEnabled ( ) const
virtual

Implements SVTK_Selector.

◆ IsValid()

bool SVTK_SelectorDef::IsValid ( SALOME_Actor theActor,
const TFilterID  theId,
const bool  theIsNode = false 
) const
virtual
Returns
true if the index satisfy installed filters
Parameters
theActor- actor
theId- filter id
theIsNode- whether it is node

Implements SVTK_Selector.

References Handle().

◆ Pick()

virtual vtkActorCollection* SVTK_SelectorDef::Pick ( const SVTK_SelectionEvent theEvent,
vtkRenderer *  theRenderer 
) const
virtual

Implements SVTK_Selector.

◆ RemoveCompositeIndex()

void SVTK_SelectorDef::RemoveCompositeIndex ( const Handle(SALOME_InteractiveObject)&  theIO,
SVTK_ListOfVtk  theIds 
)
virtual

Removes composite index of subselection for SALOME_InteractiveObject

Parameters
theIO- SALOME_InteractiveObject
theIds- index

Implements SVTK_Selector.

References removeCompositeIndex().

◆ RemoveFilter()

void SVTK_SelectorDef::RemoveFilter ( const int  theId)
virtual

To remove a filter from the selection

Parameters
theId- filter id

Implements SVTK_Selector.

◆ RemoveIndex()

void SVTK_SelectorDef::RemoveIndex ( const Handle(SALOME_InteractiveObject)&  theIO,
int  theIndex 
)
virtual

Removes index of subselection for SALOME_InteractiveObject

Parameters
theIO- SALOME_InteractiveObject
theIndex- index

Implements SVTK_Selector.

References removeIndex().

◆ RemoveIObject() [1/2]

bool SVTK_SelectorDef::RemoveIObject ( const Handle(SALOME_InteractiveObject)&  theIO)
virtual

Removes SALOME_InteractiveObject from selection

Parameters
theIO- SALOME_InteractiveObject

Implements SVTK_Selector.

◆ RemoveIObject() [2/2]

bool SVTK_SelectorDef::RemoveIObject ( SALOME_Actor theActor)
virtual

Removes SALOME_Actor from selection

Parameters
theActor- SALOME_Actor

Implements SVTK_Selector.

References Handle().

◆ SelectionMode()

virtual Selection_Mode SVTK_SelectorDef::SelectionMode ( ) const
inlinevirtual

Get current Selection_Mode.

Implements SVTK_Selector.

References mySelectionMode.

◆ SetDynamicPreSelection()

void SVTK_SelectorDef::SetDynamicPreSelection ( bool  theIsDynPreselect)
virtual

Implements SVTK_Selector.

◆ SetFilter()

void SVTK_SelectorDef::SetFilter ( const Handle(VTKViewer_Filter)&  theFilter)
virtual

To apply a filter on the selection

Parameters
theFilter- new filter

Implements SVTK_Selector.

◆ SetPreSelectionEnabled()

void SVTK_SelectorDef::SetPreSelectionEnabled ( bool  theEnabled)
virtual

Implements SVTK_Selector.

◆ SetSelectionEnabled()

void SVTK_SelectorDef::SetSelectionEnabled ( bool  theEnabled)
virtual

Implements SVTK_Selector.

◆ SetSelectionMode()

void SVTK_SelectorDef::SetSelectionMode ( Selection_Mode  theMode)
virtual

To change current Selection_Mode (as outside effect, it invokes selectionChange signal)

◆ SetTolerance()

virtual void SVTK_SelectorDef::SetTolerance ( const double &  theTolerance)
virtual

Implements SVTK_Selector.

◆ StartPickCallback()

void SVTK_SelectorDef::StartPickCallback ( )
virtual

To invoke selectionChanged signals

Implements SVTK_Selector.

◆ StoredIObjects()

const SALOME_ListIO & SVTK_SelectorDef::StoredIObjects ( ) const
virtual
Returns
list of all SALOME_InteractiveObject presenting in selection

Implements SVTK_Selector.

Member Data Documentation

◆ myCellPicker

vtkSmartPointer<vtkCellPicker> SVTK_SelectorDef::myCellPicker
private

◆ myDynamicPreselection

bool SVTK_SelectorDef::myDynamicPreselection
private

◆ myFilters

TFilters SVTK_SelectorDef::myFilters
private

◆ myIO2Actors

TIO2Actors SVTK_SelectorDef::myIO2Actors
private

◆ myIObjectList

SALOME_ListIO SVTK_SelectorDef::myIObjectList
mutableprivate

◆ myIObjects

TIObjects SVTK_SelectorDef::myIObjects
private

◆ myMapIOSubCompositeIndex

TMapIOSubCompositeIndex SVTK_SelectorDef::myMapIOSubCompositeIndex
private

◆ myMapIOSubIndex

TMapIOSubIndex SVTK_SelectorDef::myMapIOSubIndex
private

◆ myPicker

vtkSmartPointer<vtkPicker> SVTK_SelectorDef::myPicker
private

◆ myPreselectionEnabled

bool SVTK_SelectorDef::myPreselectionEnabled
private

◆ mySelectionEnabled

bool SVTK_SelectorDef::mySelectionEnabled
private

◆ mySelectionMode

int SVTK_SelectorDef::mySelectionMode
private

The documentation for this class was generated from the following files: