Version: 6.3.1
Data Structures | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Attributes

SVTK_SelectorDef Class Reference

#include <SVTK_SelectorDef.h>

Inheritance diagram for SVTK_SelectorDef:
Inheritance graph

Data Structures

struct  TIndexedMapOfInteger
struct  TIOLessThan

Public Types

typedef int TFilterID

Public Member Functions

 SVTK_SelectorDef ()
virtual ~SVTK_SelectorDef ()
virtual void SetSelectionMode (Selection_Mode theMode)
virtual Selection_Mode SelectionMode () const
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, TColStd_IndexedMapOfInteger &theIndex)
virtual bool AddOrRemoveIndex (const Handle(SALOME_InteractiveObject)&theIO, const TColStd_IndexedMapOfInteger &theIndices, bool theIsModeShift)
virtual bool AddOrRemoveIndex (const Handle(SALOME_InteractiveObject)&theIO, const TColStd_MapOfInteger &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 void SetFilter (const Handle(VTKViewer_Filter)&theFilter)
virtual Handle (VTKViewer_Filter) GetFilter(const TFilterID theId) const
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)
 vtkTypeMacro (SVTK_Selector, vtkObject)

Static Public Member Functions

static SVTK_SelectorNew ()

Private Types

typedef std::set< Handle(SALOME_InteractiveObject),
TIOLessThan
TIObjects
typedef std::map< Handle(SALOME_InteractiveObject),
vtkSmartPointer< SALOME_Actor >
, TIOLessThan
TIO2Actors
typedef std::map< Handle(SALOME_InteractiveObject),
TIndexedMapOfInteger,
TIOLessThan
TMapIOSubIndex
typedef std::map< TFilterID,
Handle(VTKViewer_Filter)> 
TFilters

Private Attributes

int mySelectionMode
SALOME_ListIO myIObjectList
TIObjects myIObjects
TIO2Actors myIO2Actors
TMapIOSubIndex myMapIOSubIndex
TFilters myFilters
vtkSmartPointer< vtkPicker > myPicker
vtkSmartPointer< vtkCellPicker > myCellPicker

Member Typedef Documentation

typedef std::map<Handle(SALOME_InteractiveObject), vtkSmartPointer<SALOME_Actor>, TIOLessThan> SVTK_SelectorDef.TIO2Actors [private]
typedef int SVTK_Selector.TFilterID [inherited]

Constructor & Destructor Documentation

SVTK_SelectorDef::SVTK_SelectorDef ( )

Default constructor

References ActorSelection.

SVTK_SelectorDef::~SVTK_SelectorDef ( ) [virtual]

Destructor


Member Function Documentation

void SVTK_SelectorDef::SetSelectionMode ( Selection_Mode  theMode) [virtual]

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

Implements SVTK_Selector.

virtual Selection_Mode SVTK_SelectorDef.SelectionMode ( ) const [virtual]

Implements SVTK_Selector.

References mySelectionMode.

void SVTK_SelectorDef::ClearIObjects ( ) [virtual]

Clear selection

Implements SVTK_Selector.

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.

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

Implements SVTK_Selector.

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

Implements SVTK_Selector.

References Handle().

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

Adds SALOME_InteractiveObject into selection

Parameters:
theIO- SALOME_InteractiveObject

Implements SVTK_Selector.

bool SVTK_SelectorDef::AddIObject ( SALOME_Actor theActor) [virtual]

Adds SALOME_Actor into selection

Parameters:
theActor- SALOME_Actor

Implements SVTK_Selector.

References Handle().

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

Removes SALOME_InteractiveObject from selection

Parameters:
theIO- SALOME_InteractiveObject

Implements SVTK_Selector.

bool SVTK_SelectorDef::RemoveIObject ( SALOME_Actor theActor) [virtual]

Removes SALOME_Actor from selection

Parameters:
theActor- SALOME_Actor

Implements SVTK_Selector.

References Handle().

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

Implements SVTK_Selector.

References SALOME_ListIO.Clear().

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

Implements SVTK_Selector.

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.

void SVTK_SelectorDef::GetIndex ( const Handle(SALOME_InteractiveObject)&  theIO,
TColStd_IndexedMapOfInteger &  theIndex 
) [virtual]

Gets indices of subselection for SALOME_InteractiveObject

Parameters:
theIO- SALOME_InteractiveObject

Implements SVTK_Selector.

bool SVTK_SelectorDef::AddOrRemoveIndex ( const Handle(SALOME_InteractiveObject)&  theIO,
const TColStd_IndexedMapOfInteger &  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.

bool SVTK_SelectorDef::AddOrRemoveIndex ( const Handle(SALOME_InteractiveObject)&  theIO,
const TColStd_MapOfInteger &  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.

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().

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().

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.

void SVTK_SelectorDef::ClearIndex ( ) [virtual]

Clears all indices of subselection

Implements SVTK_Selector.

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

To apply a filter on the selection

Parameters:
theFilter- new filter

Implements SVTK_Selector.

References VTKViewer_Filter.GetId().

virtual SVTK_SelectorDef.Handle ( VTKViewer_Filter  ) const [virtual]

Implements SVTK_Selector.

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.

void SVTK_SelectorDef::RemoveFilter ( const int  theId) [virtual]

To remove a filter from the selection

Parameters:
theId- filter id

Implements SVTK_Selector.

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().

void SVTK_SelectorDef::StartPickCallback ( ) [virtual]

To invoke selectionChanged signals

Implements SVTK_Selector.

void SVTK_SelectorDef::EndPickCallback ( ) [virtual]

To invoke selectionChanged signals

Implements SVTK_Selector.

vtkActorCollection * SVTK_SelectorDef::Pick ( const SVTK_SelectionEvent theEvent,
vtkRenderer *  theRenderer 
) const [virtual]
void SVTK_SelectorDef::SetTolerance ( const double &  theTolerance) [virtual]

Implements SVTK_Selector.

SVTK_Selector * SVTK_Selector::New ( ) [static, inherited]
Returns:
new SVTK_Selector
SVTK_Selector.vtkTypeMacro ( SVTK_Selector  ,
vtkObject   
) [inherited]

Field Documentation

vtkSmartPointer<vtkPicker> SVTK_SelectorDef.myPicker [private]
vtkSmartPointer<vtkCellPicker> SVTK_SelectorDef.myCellPicker [private]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS