C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2
VSN::SelectionManager Class Reference

SelectionManager class controls a list of selected items. More...

#include <vsn_selectionmanager.h>

+ Inheritance diagram for VSN::SelectionManager:
+ Collaboration diagram for VSN::SelectionManager:

Public Types

enum  SelectionMode { }
 

Public Member Functions

 SelectionManager ()
 Default constructor.
 
virtual ~SelectionManager ()
 Destructor.
 
SceneContentPtr GetSceneContent () const
 Returns a pointer to the scene content.
 
void SetSceneContent (SceneContentPtr ptrSceneContent)
 Sets a pointer to the scene content.
 
ObjectPickSelectionGetObjectPickSelection () const
 Returns a pointer to the object search tool.
 
void SetObjectPickSelection (ObjectPickSelection *pPickSelection)
 Sets a pointer to the object search tool.
 
ActivateMethod GetMouseActivateSelection () const
 Returns the activation method of the object selection with the mouse.
 
void SetMouseActivateSelection (ActivateMethod method)
 Sets the activation method of the object selection with the mouse.
 
std::vector< int > GetMouseButtonsSelection () const
 Returns the mouse buttons for the object selection. More...
 
void SetMouseButtonsSelection (const std::vector< int > &vecKey)
 Sets the mouse buttons for the objects selection. The following buttons can be set: mb_LButton; mb_MButton; mb_RButton. More...
 
std::vector< int > GetKeyboardButtonsMultiSelection () const
 Returns the keyboard keys for the object selection in MultiSelection mode. More...
 
void SetKeyboardButtonsMultiSelection (const std::vector< int > &vecKey)
 Sets the keyboard keys for the object selection in MultiSelection mode. The following keys can be set: mb_Control; mb_Shift; mb_Alt. More...
 
bool IsDynamicHighlighting () const
 Returns true if the dynamic selection is turned on. Otherwise, returns false.
 
void SetDynamicHighlighting (bool state)
 Turns on/off the dynamic selection for a geometry in the scene.
 
SelectionManager::SelectionMode GetSelectionMode () const
 Returns the scene object selection mode.
 
void SetSelectionMode (SelectionManager::SelectionMode mode)
 Sets the scene object selection mode.
 
virtual SelectionItemGetHighlightItem () const
 Returns a pointer to the highlighted object.
 
virtual std::list< SelectionItem * > GetSelectionList () const
 Returns the list of the SelectionItem pointers.
 
virtual const ObjectList< SelectionItem * > & GetSelectionItems () const
 Returns the list of the SelectionItem pointers.
 
virtual bool IsSelected (const NodeKey &key, int currenyindexBody=-1, uint currentPrimitiveId=0)
 Returns true if the item is in the list of selected items.
 
virtual bool IsSelected (const NodeKey &key, const NodeKey &itemKey, int currenyindexBody=-1, uint currentPrimitiveId=0)
 Returns true if the item is in the list of selected items.
 
virtual SelectionItemGetSelection (const NodeKey &key, const NodeKey &itemKey, int currenyindexBody=-1, uint currentPrimitiveId=0)
 Returns the SelectionItem pointers.
 
virtual void Select (const ObjectList< SelectionItem * > &items)
 Adds the itemы to the selection list.
 
virtual void Select (const NodeKey &key, int currenyindexBody=-1, uint currentPrimitiveId=0, const PointI &pntCursor=PointI())
 Adds the item to the selection list.
 
virtual void Select (const NodeKey &key, const NodeKey &itemKey, int currenyindexBody=-1, uint currentPrimitiveId=0, const PointI &pntCursor=PointI())
 Adds the item to the selection list.
 
virtual void Unselect (const NodeKey &key, int currenyindexBody=-1, uint currentPrimitiveId=0)
 Removes the item from the selection list.
 
virtual void Unselect (const NodeKey &key, const NodeKey &itemKey, int currenyindexBody=-1, uint currentPrimitiveId=0)
 Removes the item from the selection list.
 
virtual void UnselectAll ()
 Removes all items from the selection list to make them no more selected.
 
virtual void Highlight (const NodeKey &key, int currenyindexBody=-1, uint currentPrimitiveId=0)
 Highlights the item that has the unique key.
 
virtual void Highlight (const NodeKey &key, const NodeKey &itemKey, int currenyindexBody=-1, uint currentPrimitiveId=0)
 Highlights the item that has the unique key.
 
virtual void Unhighlight ()
 Unhighlights item.
 
virtual std::list< InstCustomItem * > GetSelectionCustomList () const
 Returns the InstCustomItem pointer list.
 
virtual const ObjectList< InstCustomItem * > & GetSelectionCustomItems () const
 Returns the list of the SelectionItem pointers.
 
virtual bool IsCustomSelected (const NodeKey &key, int currenyindexBody=-1, uint currentPrimitiveId=0)
 Returns true if the item is in the list of selected objects.
 
virtual void CustomSelect (const NodeKey &key, int currenyindexBody=-1, uint currentPrimitiveId=0)
 Adds the item to the custom selection list.
 
virtual void CustomUnselect (const NodeKey &key, int currenyindexBody=-1, uint currentPrimitiveId=0)
 Removes the item from the list of custom objects.
 
virtual void CustomUnselectAll ()
 Returns all items from the selection list to make them no more selected.
 
virtual void ResetCustomSelect ()
 Resets the selection list.
 
virtual Color GetCustomSelectionColor () const
 Returns the selection color.
 
virtual void SetCustomSelectionColor (const Color &clr)
 Sets the selection color.
 
int GetSelectedObjectCount () const
 Returns the selection list size.
 
virtual void ResetSelect ()
 Resets the selection list.
 
virtual void ResetHighlight ()
 Resets the highlighted item.
 
virtual Color GetHighlightColor () const
 Returns the highligthing color.
 
virtual void SetHighlightColor (const Color &clr)
 Sets the highligthing color.
 
virtual Color GetSelectionColor () const
 Returns the selection color.
 
virtual void SetSelectionColor (const Color &clr)
 Sets the selection color.
 
bool GetSelectionMatchesTransparency ()
 Select with the same transparency as the material being selected.
 
Filter GetFilterObject () const
 Returns the object filter value. (It is a convenient function. Calls the ObjectPickSelection function).
 
virtual bool IsBodySelectionEnabled () const
 Returns true if the flag for searching segments is set. (It is a convenient function. Calls the ObjectPickSelection function).
 
virtual void SetBodySelectionEnabled (bool bSelect)
 Sets the flag for searching segments. (It is a convenient function. Calls the ObjectPickSelection function).
 
virtual bool IsFaceSelectionEnabled () const
 Returns true if the flag for searching faces is set. (It is a convenient function. Calls the ObjectPickSelection function).
 
virtual void SetFaceSelectionEnabled (bool bSelect)
 Sets the flag for searching faces. (It is a convenient function. Calls the ObjectPickSelection function).
 
virtual bool IsEdgeSelectionEnabled () const
 Returns true if the flag for searching edges is set. (It is a convenient function. Calls the ObjectPickSelection function).
 
virtual void SetEdgeSelectionEnabled (bool bSelect)
 Sets the flag for searching edges. (It is a convenient function. Calls the ObjectPickSelection function).
 
virtual bool IsVertexSelectionEnabled () const
 Returns true if the flag for searching vertices is set. (It is a convenient function. Calls the ObjectPickSelection function).
 
virtual void SetVertexSelectionEnabled (bool bSelect)
 Sets the flag for searching vertices. (It is a convenient function. Calls the ObjectPickSelection function).
 
- Public Member Functions inherited from VSN::Object
 Object (Object *pParent=nullptr)
 Default constructor. More...
 
virtual ~Object ()
 Destructor.
 
void SetParent (Object *pParent)
 NO TRANSLATION.
 
MutexGetMutex ()
 Object mutex.
 
String GetObjectName () const
 Returns name.
 
void SetObjectName (const String &name)
 Sets name.
 
bool IsControlType () const
 TRANSLATION.
 
ObjectGetParent () const
 NO TRANSLATION.
 
Variant GetProperty (const String &name) const
 NO TRANSLATION.
 
bool IsSignalsBlocked () const
 NO TRANSLATION.
 
bool SetBlockSignals (bool bBlock)
 NO TRANSLATION.
 
void AddEventListener (Object *pObject)
 NO TRANSLATION.
 
void RemoveEventListener (Object *pObject)
 NO TRANSLATION.
 
ObjectGetSender () const
 NO TRANSLATION.
 
Thread * GetThread () const
 NO TRANSLATION.
 
void BindWithThread (Thread *thread)
 NO TRANSLATION.
 
int StartTimer (int interval, TimerType timerType=tt_CoarseTimer)
 NO TRANSLATION.
 
void KillTimer (int id)
 NO TRANSLATION.
 
const ObjectList< Object * > & GetChildren () const
 NO TRANSLATION.
 
template<typename T >
FindChild (const String &objName=String()) const
 NO TRANSLATION.
 
template<typename T >
ObjectList< T > FindChildren (const String &objName=String(), VSN::ChildFindingPolicies policies=VSN::FindAllNestedChildren) const
 NO TRANSLATION.
 
- Public Member Functions inherited from VSN::BasicObject
 BasicObject ()
 Default constructor.
 
virtual ~BasicObject ()
 Destructor.
 

Detailed Description

SelectionManager class controls a list of selected items.

SelectionManager class creates and stores a list of geometric primitives or Vision segments. For the list, the class has functions for adding and deleting an individual and several SelectionItem. SelectionManager encapsulates certain logic with checking if an item is selected. All items selected (i.e. put in the list) will be selected in the scene with a special color that the SetSelectionColor function sets. Also the class provides support for controlling the selection mode and the selection style. Note: SelectionManager class can operate both separately and together with the ObjectPickSelection tool. With SetMouseButtonsSelection and SetKeyboardButtonsMultiSelection functions the user can configure activity of object selection for SingleSelection, MultiSelection modes.

Member Enumeration Documentation

◆ SelectionMode

Enumerator
Append 

Adds the selected item to the selection group.

Member Function Documentation

◆ GetMouseButtonsSelection()

std::vector<int> VSN::SelectionManager::GetMouseButtonsSelection ( ) const

Returns the mouse buttons for the object selection.

Returns
Returns the array of the button codes.

◆ SetMouseButtonsSelection()

void VSN::SelectionManager::SetMouseButtonsSelection ( const std::vector< int > &  vecKey)

Sets the mouse buttons for the objects selection. The following buttons can be set: mb_LButton; mb_MButton; mb_RButton.

Parameters
[in]vecKey- The array of the button codes.

◆ GetKeyboardButtonsMultiSelection()

std::vector<int> VSN::SelectionManager::GetKeyboardButtonsMultiSelection ( ) const

Returns the keyboard keys for the object selection in MultiSelection mode.

Returns
Returns the array of the key codes.

◆ SetKeyboardButtonsMultiSelection()

void VSN::SelectionManager::SetKeyboardButtonsMultiSelection ( const std::vector< int > &  vecKey)

Sets the keyboard keys for the object selection in MultiSelection mode. The following keys can be set: mb_Control; mb_Shift; mb_Alt.

Parameters
[in]vecKey- The array of the key codes.

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