Developer Documentation
|
Interface for all plugins which want to use selection functions. More...
#include <OpenFlipper/BasePlugin/SelectionInterface.hh>
Public Types | |
typedef std::vector< DataType > | TypeList |
typedef unsigned int | PrimitiveType |
Public Member Functions | |
virtual | ~SelectionInterface () |
Destructor. | |
Registering Selection Environments and primitives | |
These functions are used to register your selection environment to the selection system. The environment is basically a collection of selection metaphors that will be available for a set of DataTypes. You Register the Environment via addSelectionEnvironment(). Afterwards you can register DataTypes to the previously created environment with registerType(). The selection interactions defined in the environment will only be available, if the registered DataTypes exist. Each DataType can consist of different primitives (e.g. a mesh usually consists of vertices edges and faces). Use addPrimitiveType() to register these primitives and remember the handles you got. Here is a short example of how to add a new selection environment and register some data type and primitive type: So in our plugin we first want to add a new selection environment: someIconPath + "mesh_selection.png", environmentHandle_); Now, our handle to the newly created environment is in environmentHandle_. We should now see a new tab widget in the selection base tool box displaying our selection environment: We now want to register a specific data type for which we want to enable selection. Say DATA_TRIANGLE_MESH: emit registerType(environmentHandle_, DATA_TRIANGLE_MESH); Repeat this for as many data types as you want to handle in your plugin. Since triangle meshes normally consist of vertex, edge and face primitives, we want to enable selection for the three of them: emit addPrimitiveType(environmentHandle_, "Select Vertices", iconPath + "vertexType.png", vertexType_); The three variables of type SelectionInterface::PrimitiveType vertexType_, edgeType_ and faceType_ now hold the handles to the newly added primitive types. We use these to reference the types later on. For each registered primitive type, we now see a button appearing in the recently created environment tab in selection base plugin's tool box: The user can now chose which primitive type she wants to select via simply clicking one of these buttons (or more than one by holding the control key while clicking). We then go on with requesting the available selection metaphors in the next section. | |
virtual void | registerType (QString _handleName, DataType _type) |
Register data type for a selection environment. More... | |
virtual void | addPrimitiveType (QString _handleName, QString _name, QString _icon, PrimitiveType &_typeHandle) |
Provide selection for primitives other than the standard ones. More... | |
virtual void | addSelectionEnvironment (QString _modeName, QString _description, QString _icon, QString &_handleName) |
Add a selection environment in order to provide selection functions for specific data type(s) More... | |
Enabling Selection Metaphors | |
The selection system provides a set of basic selection operations. These include toggle selection, volume lasso, surface lasso, painting, closest boundary and flood fill selection. The interactions for these metaphors are controlled by the Base Selection Plugin. The results of these interactions are than passed on to the specific selection plugins. These functions are used to tell the system, that you can handle the given selection metaphors in your plugin. You can also add your custom selection mode via addCustomSelectionMode(). To continue the above example, we now want to make toggle, volume lasso as well a custom selection mode available for our data types: emit showToggleSelectionMode(environmentHandle_, true, vertexType_ | edgeType_ | faceType_); emit showVolumeLassoSelectionMode(environmentHandle_, true, vertexType_ | edgeType_ | faceType_); emit addCustomSelectionMode(environmentHandle_, "My Custom Selection", "Description of my mode", someIconFile, vertexType_ | edgeType_); In the last parameter we determine for which of the registered primitive types the selection metaphor will be available. Note that multiple primitive types have to be OR'ed. The selection metaphors as well as the available primitive types will be displayed in the selection pick tool bar: Now each time the user uses the toggle selection metaphor slotToggleSelection() is called. See below for code examples on this. | |
virtual void | showLassoSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes) |
Show lasso selection mode in a specified selection environment. More... | |
virtual void | showVolumeLassoSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes) |
Show volume lasso selection mode in a specified selection environment. More... | |
virtual void | showSurfaceLassoSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes) |
Show surface lasso selection mode in a specified selection environment. More... | |
virtual void | showSphereSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes) |
Show sphere selection mode in a specified selection environment. More... | |
virtual void | showClosestBoundarySelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes) |
Show closest boundary selection mode in a specified selection environment. More... | |
virtual void | showFloodFillSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes) |
Show flood fill selection mode in a specified selection environment. More... | |
virtual void | showComponentsSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes) |
Show connected components selection mode in a specified selection environment. More... | |
virtual void | addCustomSelectionMode (QString _handleName, QString _modeName, QString _description, QString _icon, PrimitiveType _associatedTypes, QString &_customIdentifier) |
Add a custom interactive selection mode. More... | |
virtual void | addCustomSelectionMode (QString _handleName, QString _modeName, QString _description, QString _icon, PrimitiveType _associatedTypes, QString &_customIdentifier, DataType _objectTypeRestriction) |
Add a custom interactive selection mode. More... | |
virtual void | showToggleSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes) |
Show toggle selection mode in a specified selection environment. More... | |
States of the selection system. | |
You can get the active data types, primitive types and if only target objects should be affected. | |
virtual void | getActiveDataTypes (TypeList &_types) |
Get the data types that the currently active selection environment supports. More... | |
virtual void | getActivePrimitiveType (PrimitiveType &_type) |
Get the primitive type that is selected. More... | |
virtual void | targetObjectsOnly (bool &_targetsOnly) |
Indicates whether selection should be performed on target objects only. More... | |
File Interaction | |
Store and load selection data in an INI file. In the above example we would want something like this in order to store the current selection: void MySelectionPlugin::slotSaveSelection(INIFile& _file) { // Iterate over all triangle meshes and save // the selections for all entity types for (PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS, DataType(DATA_TRIANGLE_MESH)); o_it != PluginFunctions::objectsEnd(); ++o_it) { // Create section for each object // Append object name to section identifier QString section = QString("TriangleMeshSelection") + "//" + o_it->name(); if(!_file.section_exists(section)) { _file.add_section(section); } else { continue; } // Store vertex selection _file.add_entry(section, "VertexSelection", getVertexSelection(o_it->id())); // Store edge selection _file.add_entry(section, "EdgeSelection", getEdgeSelection(o_it->id())); // Store face selection _file.add_entry(section, "FaceSelection", getFaceSelection(o_it->id())); } } This works analogously for loading selections. | |
virtual void | slotLoadSelection (const INIFile &_file) |
Load selection for specific objects in the scene. More... | |
virtual void | slotSaveSelection (INIFile &_file) |
Save selection for all objects in the scene. More... | |
virtual void | loadSelection (int _objId, const QString &_filename) |
Scripting slot for loading selections. More... | |
Keyboard Interactions | |
Register keyboard shortcuts for your selection plugin by emitting the registerKeyShortcut() slot. For example: // Select (a)ll, Control + A keys emit registerKeyShortcut(Qt::Key_A, Qt::ControlModifier); // (C)lear selection, C key emit registerKeyShortcut(Qt::Key_C, Qt::NoModifier); Now if the user presses a key, we can handle this by overriding slotKeyShortcutEvent(). Don't forget to test whether at least one of the registered primitives is active and whether we want to restrict to target objects only: void MySelectionPlugin::slotKeyShortcutEvent(int _key, Qt::KeyboardModifiers _modifiers) { SelectionInterface::PrimitiveType type = 0u; emit getActivePrimitiveType(type); if((type & (vertexType_ | edgeType_ | faceType_)) == 0) { // No supported type is active return; } bool targetsOnly = false; emit targetObjectsOnly(targetsOnly); PluginFunctions::IteratorRestriction restriction = (targetsOnly ? PluginFunctions::TARGET_OBJECTS : PluginFunctions::ALL_OBJECTS); // And so on... } | |
virtual void | registerKeyShortcut (int _key, Qt::KeyboardModifiers _modifiers=Qt::NoModifier) |
Register key shortcut. More... | |
virtual void | slotKeyShortcutEvent (int _key, Qt::KeyboardModifiers _modifiers) |
One of the previously registered keys has been pressed. More... | |
User Interface controls | |
In many cases it is desired to offer selection operations such as "select all vertices" or "invert edge selection". For this purpose, use the addSelectionOperations() slot. In our example, we now add some of these functions using the following code: QStringList vertexOperations; vertexOperations.append("Select All Vertices"); vertexOperations.append("Invert Vertex Selection"); vertexOperations.append("Delete All Selected Vertices"); emit addSelectionOperations(environmentHandle_, vertexOperations, "Vertex Operations"); These operations will now appear in the selection environment tab of the selection base plugin: The user can now perform these operations by simply clicking the buttons. Each time one of the buttons has been pressed, slotSelectionOperation() is called. You will have to override this in order to provide such operations. An example would be: void MySelectionPlugin::slotSelectionOperation(QString _operation) { SelectionInterface::PrimitiveType type = 0u; emit getActivePrimitiveType(type); // If none of our primitives is currently active if((type & (vertexType_ | edgeType_ | faceType_)) == 0) return; // Test if operation should be applied to target objects only bool targetsOnly = false; emit targetObjectsOnly(targetsOnly); PluginFunctions::IteratorRestriction restriction = (targetsOnly ? PluginFunctions::TARGET_OBJECTS : PluginFunctions::ALL_OBJECTS); if(_operation == "Select All Vertices") { o_it != PluginFunctions::objectsEnd(); ++o_it) { if (o_it->visible()) { selectAllVertices(o_it->id()); } // Don't forget this in order to update the render buffers emit updatedObject(o_it->id(), UPDATE_SELECTION); } } // ...and so on... } | |
virtual void | addSelectionOperations (QString _handleName, QStringList _operationsList, QString _category, PrimitiveType _type=0u) |
Add non-interactive selection operations for a specific primitive type. More... | |
virtual void | slotSelectionOperation (QString _operation) |
A specific operation is requested. More... | |
Slots which have to be implemented to use the global interaction metaphors | |
If you enabled selection metaphors for your environment via the control functions you will have to implement the corresponding slots here. These will be called when the events occur. Continuing the above example, we should now override the slots for the metaphors that we have already requested above. For instance, when using the toggle metaphor, we would want to handle a toggle operation only if the currently selected primitive type belongs to our plugin: void MySelectionPlugin::slotToggleSelection(QPoint _mousePosition, PrimitiveType _currentType, bool _deselect) { // Return if none of the currently active types is handled by this plugin if((_currentType & (vertexType_ | edgeType_ | faceType_)) == 0) return; // Only toggle target objects if requested bool targetsOnly = false; emit targetObjectsOnly(targetsOnly); // Do the picking... // ...and the actual selection if(_currentType & vertexType_) { // Vertex selection } if(_currentType & edgeType_) { // Edge selection } // ...and so on... } | |
virtual void | slotToggleSelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect) |
Called whenever the user performs a toggle selection. More... | |
virtual void | slotLassoSelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect) |
Called whenever the user performs a lasso selection. More... | |
virtual void | slotVolumeLassoSelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect) |
Called whenever the user performs a volume lasso selection. More... | |
virtual void | slotSurfaceLassoSelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect) |
Called whenever the user performs a surface lasso selection. More... | |
virtual void | slotSphereSelection (QMouseEvent *_event, double _radius, PrimitiveType _currentType, bool _deselect) |
Called whenever the user performs a sphere selection. More... | |
virtual void | slotClosestBoundarySelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect) |
Called whenever the user performs a closest boundary selection. More... | |
virtual void | slotFloodFillSelection (QMouseEvent *_event, double _maxAngle, PrimitiveType _currentType, bool _deselect) |
Called whenever the user performs a flood fill selection. More... | |
virtual void | slotComponentsSelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect) |
Called whenever the user performs a connected components selection. More... | |
virtual void | slotCustomSelection (QMouseEvent *_event, PrimitiveType _currentType, QString _customIdentifier, bool _deselect) |
Called whenever the user performs a custom selection. More... | |
Signals emitted by the SelectionBasePlugin | |
The following signals are emitted by the selection base plugin. You should not use them! | |
virtual void | toggleSelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect) |
Emitted by selection base plugin whenever the user performs a toggle selection. More... | |
virtual void | lassoSelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect) |
Emitted by selection base plugin whenever the user performs a lasso selection. More... | |
virtual void | volumeLassoSelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect) |
Emitted by selection base plugin whenever the user performs a volume lasso selection. More... | |
virtual void | surfaceLassoSelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect) |
Emitted by selection base plugin whenever the user performs a surface lasso selection. More... | |
virtual void | sphereSelection (QMouseEvent *_event, double _radius, PrimitiveType _currentType, bool _deselect) |
Emitted by selection base plugin whenever the user performs a sphere selection. More... | |
virtual void | closestBoundarySelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect) |
Emitted by selection base plugin whenever the user performs a closest boundary selection. More... | |
virtual void | floodFillSelection (QMouseEvent *_event, double _maxAngle, PrimitiveType _currentType, bool _deselect) |
Emitted by selection base plugin whenever the user performs a flood fill selection. More... | |
virtual void | componentsSelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect) |
Emitted by selection base plugin whenever the user performs a connected components selection. More... | |
virtual void | customSelection (QMouseEvent *_event, PrimitiveType _currentType, QString _customIdentifier, bool _deselect) |
Emitted by selection base plugin whenever the user performs a custom selection. More... | |
virtual void | loadSelection (const INIFile &_file) |
Load selections from ini-file. More... | |
virtual void | saveSelection (INIFile &_file) |
Save selections into ini-file. More... | |
virtual void | keyShortcutEvent (int _key, Qt::KeyboardModifiers _modifiers=Qt::NoModifier) |
Key shortcut event happened. More... | |
virtual void | selectionOperation (QString _operation) |
Emitted by selection base plugin when a non-interactive selection operation is requested. More... | |
Slots handled by the SelectionBasePlugin | |
The following slots are implemented by the selection base plugin. You should not use them! | |
virtual void | slotAddSelectionEnvironment (QString _modeName, QString _description, QString _icon, QString &_handleName) |
Do not use. Implemented in SelectionBasePlugin. More... | |
virtual void | slotRegisterType (QString _handleName, DataType _type) |
Do not use. Implemented in SelectionBasePlugin. More... | |
virtual void | slotAddPrimitiveType (QString _handleName, QString _name, QString _icon, PrimitiveType &_typeHandle) |
Do not use. Implemented in SelectionBasePlugin. More... | |
virtual void | slotAddCustomSelectionMode (QString _handleName, QString _modeName, QString _description, QString _icon, PrimitiveType _associatedTypes, QString &_customIdentifier) |
Do not use. Implemented in SelectionBasePlugin. More... | |
virtual void | slotAddCustomSelectionMode (QString _handleName, QString _modeName, QString _description, QString _icon, PrimitiveType _associatedTypes, QString &_customIdentifier, DataType _objectTypeRestriction) |
Do not use. Implemented in SelectionBasePlugin. More... | |
virtual void | slotShowToggleSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes) |
virtual void | slotShowLassoSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes) |
virtual void | slotShowVolumeLassoSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes) |
virtual void | slotShowSurfaceLassoSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes) |
virtual void | slotShowSphereSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes) |
virtual void | slotShowClosestBoundarySelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes) |
virtual void | slotShowFloodFillSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes) |
virtual void | slotComponentsSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes) |
virtual void | slotRegisterKeyShortcut (int _key, Qt::KeyboardModifiers _modifiers) |
virtual void | slotGetActiveDataTypes (TypeList &_types) |
virtual void | slotGetActivePrimitiveType (PrimitiveType &_type) |
virtual void | slotTargetObjectsOnly (bool &_targetsOnly) |
virtual void | slotAddSelectionOperations (QString _handleName, QStringList _operationsList, QString _category, PrimitiveType _type) |
Interface for all plugins which want to use selection functions.
Detailed description
Using this interface you can instruct the core to select objects and different primitive types.
Definition at line 81 of file SelectionInterface.hh.
|
inlinevirtual |
Add a custom interactive selection mode.
If a plugin should provide an interactive selection mode other than the standard ones (which include toggle, lasso, volume lasso, sphere, closest boundary and flood fill selection), one can add a custom interactive selection mode via this signal. Once the custom mode is added, it will appear in the sub-menu for the associated selection environment. If the user chooses this mode in order to do selection, slotCustomSelection(QMouseEvent*,QString) is called. This signal returns the added identifier for this selection mode in parameter _identifier.
_handleName | The handle of the selection environment in which this mode should be available |
_modeName | The name of this mode (also button caption) |
_description | A brief description of what the selection mode does |
_icon | Path to an icon which is used for this selection mode |
_associatedTypes | Make this mode available only for the specified types (OR'ed) |
_customIdentifier | Holds the identifier of the custom selection modes |
Definition at line 363 of file SelectionInterface.hh.
|
inlinevirtual |
Add a custom interactive selection mode.
If a plugin should provide an interactive selection mode other than the standard ones (which include toggle, lasso, volume lasso, sphere, closest boundary and flood fill selection), one can add a custom interactive selection mode via this signal. Once the custom mode is added, it will appear in the sub-menu for the associated selection environment. If the user chooses this mode in order to do selection, slotCustomSelection(QMouseEvent*,QString) is called. This signal returns the added identifier for this selection mode in parameter _identifier.
_handleName | The handle of the selection environment in which this mode should be available |
_modeName | The name of this mode (also button caption) |
_description | A brief description of what the selection mode does |
_icon | Path to an icon which is used for this selection mode |
_associatedTypes | Make this mode available only for the specified types (OR'ed) |
_customIdentifier | Holds the identifier of the custom selection modes |
_objectTypeRestriction | Restrict the mode to this specific data type |
Definition at line 385 of file SelectionInterface.hh.
|
inlinevirtual |
Provide selection for primitives other than the standard ones.
Use this signal to add a new primitive type that can be selected. This returns a handle to the newly added primitive type which will be of use later on.
_handleName | The handle of the selection environment to which this type should be added |
_name | The name of the primitive type, e.g. "B-Spline Surface Control Point" |
_icon | Path to the icon for the primitive type |
_typeHandle | The returned handle to the added primitive type |
Definition at line 194 of file SelectionInterface.hh.
|
inlinevirtualsignal |
Add a selection environment in order to provide selection functions for specific data type(s)
This adds a toolbar button and initializes a new selection environment that supports all objects/entities of a specified data type. The type for which the selection applies is later registered via the signal registerType(QString,DataType). Use the returned _handleName for referencing the selection environment.
_modeName | The name of the selection mode, e.g. "Mesh Selection" |
_description | The description for the selection mode (also tooltip) |
_icon | Path to the icon for this mode (basically a type icon) |
_handleName | The handle of the recently added selection environment. Needed for referencing |
Definition at line 169 of file SelectionInterface.hh.
|
inlinevirtualsignal |
Add non-interactive selection operations for a specific primitive type.
One can add non-interactive selection operations for each primitive type that will appear as buttons in the selection base toolbar. An example for this would be "Clear selection", "Invert", "Delete", etc. If one of this operations is requested, slotSelectionOperation(QString) is called. These functions are listed in categories which are mainly used to improve usability.
_handleName | The handle of the selection environment in which this operation should be available |
_operationsList | The list of operations that can be performed for a given primitive type |
_category | The category under which the specified operations will be listed |
_type | The primitive type for which the specified operations will be available (0u if operation should always be available) |
Definition at line 660 of file SelectionInterface.hh.
|
inlinevirtual |
Emitted by selection base plugin whenever the user performs a closest boundary selection.
This connects to slotClosestBoundarySelection() which has to be implemented by each type selection plugin if this interactive selection mode should be provided.
_event | The mouse event that currently is performed |
_currentType | The currently active primitive type |
_deselect | True if entities should be deselected |
Definition at line 925 of file SelectionInterface.hh.
|
inlinevirtual |
Emitted by selection base plugin whenever the user performs a connected components selection.
This connects to slotComponentsSelection() which has to be implemented by each type selection plugin if this interactive selection mode should be provided.
_event | The mouse event that currently is performed |
_currentType | The currently active primitive type |
_deselect | True if entities should be deselected |
Definition at line 948 of file SelectionInterface.hh.
|
inlinevirtual |
Emitted by selection base plugin whenever the user performs a custom selection.
This connects to slotCustomSelection(QMouseEvent*,QString) which has to be implemented by each type selection plugin if this interactive selection mode should be provided.
_event | The mouse event that currently is performed |
_currentType | The currently active primitive type |
_customIdentifier | Holds the identifier of the custom selection modes |
_deselect | True if entities should be deselected |
Definition at line 960 of file SelectionInterface.hh.
|
inlinevirtual |
Emitted by selection base plugin whenever the user performs a flood fill selection.
This connects to slotFloodFillSelection() which has to be implemented by each type selection plugin if this interactive selection mode should be provided.
_event | The mouse event that currently is performed |
_maxAngle | The maximum angle used for flood filling |
_currentType | The currently active primitive type |
_deselect | True if entities should be deselected |
Definition at line 937 of file SelectionInterface.hh.
|
inlinevirtual |
Get the data types that the currently active selection environment supports.
This fetches a list of data types that are supported by the currently activated selection environment.
_types | The list of currently active data types |
Definition at line 410 of file SelectionInterface.hh.
|
inlinevirtual |
Get the primitive type that is selected.
This returns the id of the primitive type that is selected.
_type | Id of selected primitive type |
Definition at line 418 of file SelectionInterface.hh.
|
inlinevirtual |
Key shortcut event happened.
Emitted by selection base plugin whenever a registered key shortcut has been pressed.
_key | Key to register |
_modifiers | Key modifiers (i.e. shift, control, meta keys, defaults to none) |
Definition at line 991 of file SelectionInterface.hh.
|
inlinevirtual |
Emitted by selection base plugin whenever the user performs a lasso selection.
This connects to slotLassoSelection() which has to be implemented by each type selection plugin if this interactive selection mode should be provided.
_event | The mouse event that currently is performed |
_currentType | The currently active primitive type |
_deselect | True if entities should be deselected |
Definition at line 880 of file SelectionInterface.hh.
|
inlinevirtualslot |
Scripting slot for loading selections.
Override this slot in order to directly load selections from files.
_objId | The target object's id |
_filename | The file in which the data is stored |
Definition at line 500 of file SelectionInterface.hh.
|
inlinevirtual |
Load selections from ini-file.
This signal is emitted by SelectionBase-Plugin each time a selection should be read from a file. This ini-file handle is then passed to each object type selection plugin where object specific selections can be extracted.
_file | The ini-file handle |
Definition at line 971 of file SelectionInterface.hh.
|
inlinevirtualsignal |
Register key shortcut.
This signal is emitted whenever a type selection plugin wants to provide key shortcuts for its functions. Note that multiple registration of one key will be possible. Key events will be passed to ALL type selection plugins that want to listen to key events of this key, thus, one has to ignore the event if the currently active primitive type (request via signal getActivePrimitiveType(PrimitiveType&) ) is not handled by the type selection plugin.
_key | Key to register |
_modifiers | Key modifiers (i.e. shift, control, meta keys, defaults to none) |
Definition at line 562 of file SelectionInterface.hh.
|
inlinevirtual |
Register data type for a selection environment.
After adding a new selection environment, one can register types which the selection environment accounts for. For example, if we added a selection environment for polylines, we would have to call registerType(environmentHandle,DATA_POLY_LINE) in order to enable polyline selections.
_handleName | The handle of the selection environment for this type |
_type | The data type that should be added |
Definition at line 181 of file SelectionInterface.hh.
|
inlinevirtual |
Save selections into ini-file.
This signal is emitted by SelectionBase-Plugin each time a selection should be written into a file. This ini-file handle is then passed to each object type selection plugin where object specific selections can be saved.
_file | The ini-file handle |
Definition at line 982 of file SelectionInterface.hh.
|
inlinevirtualsignal |
Emitted by selection base plugin when a non-interactive selection operation is requested.
This connects to slot slotSelectionOperation and is called whenever a non-interactive selection operation is requested.
_operation | The name of the requested operation |
Definition at line 857 of file SelectionInterface.hh.
|
inlinevirtual |
Show closest boundary selection mode in a specified selection environment.
Show or hide the closest boundary selection mode for the specified selection environment. Note that per default no interactive selection mode will be available. One will always have to explicitly add the required selection modes for each selection environment.
_handleName | The handle of the selection environment in which this mode should be available |
_show | Indicates whether the mode should be available or not |
_associatedTypes | Make this mode available only for the specified types (OR'ed) |
Definition at line 317 of file SelectionInterface.hh.
|
inlinevirtual |
Show connected components selection mode in a specified selection environment.
Show or hide the connected components selection mode for the specified selection environment. Note that per default no interactive selection mode will be available. One will always have to explicitly add the required selection modes for each selection environment.
_handleName | The handle of the selection environment in which this mode should be available |
_show | Indicates whether the mode should be available or not |
_associatedTypes | Make this mode available only for the specified types (OR'ed) |
Definition at line 343 of file SelectionInterface.hh.
|
inlinevirtual |
Show flood fill selection mode in a specified selection environment.
Show or hide the flood fill selection mode for the specified selection environment. Note that per default no interactive selection mode will be available. One will always have to explicitly add the required selection modes for each selection environment.
_handleName | The handle of the selection environment in which this mode should be available |
_show | Indicates whether the mode should be available or not |
_associatedTypes | Make this mode available only for the specified types (OR'ed) |
Definition at line 330 of file SelectionInterface.hh.
|
inlinevirtual |
Show lasso selection mode in a specified selection environment.
Show or hide the lasso selection mode for the specified selection environment. Note that per default no interactive selection mode will be available. One will always have to explicitly add the required selection modes for each selection environment.
_handleName | The handle of the selection environment in which this mode should be available |
_show | Indicates whether the mode should be available or not |
_associatedTypes | Make this mode available only for the specified types (OR'ed) |
Definition at line 265 of file SelectionInterface.hh.
|
inlinevirtual |
Show sphere selection mode in a specified selection environment.
Show or hide the sphere selection mode for the specified selection environment. Note that per default no interactive selection mode will be available. One will always have to explicitly add the required selection modes for each selection environment.
_handleName | The handle of the selection environment in which this mode should be available |
_show | Indicates whether the mode should be available or not |
_associatedTypes | Make this mode available only for the specified types (OR'ed) |
Definition at line 304 of file SelectionInterface.hh.
|
inlinevirtual |
Show surface lasso selection mode in a specified selection environment.
Show or hide the surface lasso selection mode for the specified selection environment. Note that per default no interactive selection mode will be available. One will always have to explicitly add the required selection modes for each selection environment.
_handleName | The handle of the selection environment in which this mode should be available |
_show | Indicates whether the mode should be available or not |
_associatedTypes | Make this mode available only for the specified types (OR'ed) |
Definition at line 291 of file SelectionInterface.hh.
|
inlinevirtualsignal |
Show toggle selection mode in a specified selection environment.
Show or hide the toggle selection mode for the specified selection environment. Note that per default no interactive selection mode will be available. One will always have to explicitly add the required selection modes for each selection environment.
_handleName | The handle of the selection environment in which this mode should be available |
_show | Indicates whether the mode should be available or not |
_associatedTypes | Make this mode available only for the specified types (OR'ed) |
Definition at line 252 of file SelectionInterface.hh.
|
inlinevirtual |
Show volume lasso selection mode in a specified selection environment.
Show or hide the volume lasso selection mode for the specified selection environment. Note that per default no interactive selection mode will be available. One will always have to explicitly add the required selection modes for each selection environment.
_handleName | The handle of the selection environment in which this mode should be available |
_show | Indicates whether the mode should be available or not |
_associatedTypes | Make this mode available only for the specified types (OR'ed) |
Definition at line 278 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Do not use. Implemented in SelectionBasePlugin.
Do not use! Implemented in SelectionBasePlugin
_handleName | Handle of the selection mode |
_modeName | User visible name of the selection mode |
_description | Description of the mode |
_icon | Path to an icon displayed in the selection toolbar |
_associatedTypes | primitive types supported by this mode |
_customIdentifier | Identifier of this mode |
Definition at line 1044 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Do not use. Implemented in SelectionBasePlugin.
_handleName | Handle of the selection mode |
_modeName | User visible name of the selection mode |
_description | Description of the mode |
_icon | Path to an icon displayed in the selection toolbar |
_associatedTypes | primitive types supported by this mode |
_customIdentifier | Identifier of this mode |
_objectTypeRestriction | Object types supported by this mode |
Definition at line 1057 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Do not use. Implemented in SelectionBasePlugin.
Do not use! Implemented in SelectionBasePlugin
_handleName | Handle of the selection mode |
_name | User visible name of the selection mode |
_icon | Path to an icon displayed in the selection toolbar |
_typeHandle | Handle for the type |
Definition at line 1031 of file SelectionInterface.hh.
|
inlineprivatevirtualslot |
Do not use. Implemented in SelectionBasePlugin.
_modeName | User visible name of the selection mode |
_description | Description of the mode |
_icon | Path to an icon displayed in the selection toolbar |
_handleName | Handle of the selection mode |
Definition at line 1013 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Do not use. Implemented in SelectionBasePlugin
_handleName | handle of the mode |
_operationsList | List of operations |
_category | Category |
_type | primitive types |
Definition at line 1157 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Called whenever the user performs a closest boundary selection.
This has to be implemented by each type selection plugin if this interactive selection mode should be provided. The metaphor behind it is that the user clicks on an object and the primitives at the closest boundary get selected.
_event | The mouse event that currently is performed |
_currentType | The currently active primitive type |
_deselect | True if entities should be deselected |
Reimplemented in MeshObjectSelectionPlugin.
Definition at line 795 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Called whenever the user performs a connected components selection.
This has to be implemented by each type selection plugin if this interactive selection mode should be provided. The metaphor behind it is that the user clicks on an object and all primitives that are connected to the clicked primitive are selected as well.
_event | The mouse event that currently is performed |
_currentType | The currently active primitive type |
_deselect | True if entities should be deselected |
Reimplemented in MeshObjectSelectionPlugin.
Definition at line 821 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Do not use. Implemented in SelectionBasePlugin
_handleName | handle of the mode |
_show | Hide or show it |
_associatedTypes | Types associated with this mode |
Definition at line 1123 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Called whenever the user performs a custom selection.
This has to be implemented by each type selection plugin if this interactive selection mode should be provided.
_event | The mouse event that currently is performed |
_currentType | The currently active primitive type |
_customIdentifier | Holds the identifier of the custom selection modes |
_deselect | True if entities should be deselected |
Reimplemented in VolumeMeshSelectionPlugin.
Definition at line 833 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Called whenever the user performs a flood fill selection.
This has to be implemented by each type selection plugin if this interactive selection mode should be provided. The metaphor behind it is that the user clicks on an object and all primitives close to this point get selected, if the angle between the clicked point and the next point does not differ more than the specified angle.
_event | The mouse event that currently is performed |
_maxAngle | The maximum angle used for flood filling |
_currentType | The currently active primitive type |
_deselect | True if entities should be deselected |
Reimplemented in MeshObjectSelectionPlugin, and VolumeMeshSelectionPlugin.
Definition at line 809 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Do not use. Implemented in SelectionBasePlugin
_types | Returns the active types |
Definition at line 1136 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Do not use. Implemented in SelectionBasePlugin
_type | Returns the active primitive types |
Definition at line 1142 of file SelectionInterface.hh.
|
inlineprivatevirtualslot |
One of the previously registered keys has been pressed.
This slot is called whenever the user has pressed one of the registered keys. Note that this is actually handled by the selection base plugin since the different plugins might want to register the same key multiple times.
_key | The pressed key |
_modifiers | Indicates whether mod-keys have been pressed synchronously |
Reimplemented in MeshObjectSelectionPlugin, SplatCloudObjectSelectionPlugin, VolumeMeshSelectionPlugin, BSplineCurveSelectionPlugin, BSplineSurfaceSelectionPlugin, ObjectSelectionPlugin, and PolyLineSelectionPlugin.
Definition at line 576 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Called whenever the user performs a lasso selection.
This has to be implemented by each type selection plugin if this interactive selection mode should be provided. The metaphor behind it is that the user draws a polygonal line and all primitives which are visible get selected.
_event | The mouse event that currently is performed |
_currentType | The currently active primitive type |
_deselect | True if entities should be deselected |
Reimplemented in MeshObjectSelectionPlugin, and SplatCloudObjectSelectionPlugin.
Definition at line 741 of file SelectionInterface.hh.
|
inlineprivatevirtualslot |
Load selection for specific objects in the scene.
OpenFlipper allows for saving of selections in an INI file (implemented by the different selection plugins by overriding function slotSaveSelection()). So this slot is called each time such INI file is about to be loaded.
_file | The file from which one can read the selection data |
Reimplemented in MeshObjectSelectionPlugin, SplatCloudObjectSelectionPlugin, VolumeMeshSelectionPlugin, BSplineCurveSelectionPlugin, BSplineSurfaceSelectionPlugin, ObjectSelectionPlugin, and PolyLineSelectionPlugin.
Definition at line 479 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Do not use. Implemented in SelectionBasePlugin
_key | Key to use |
_modifiers | Modifier for this key |
Definition at line 1130 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Do not use. Implemented in SelectionBasePlugin.
_handleName | Handle of the selection mode |
_type | Datatype to register |
Definition at line 1020 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Save selection for all objects in the scene.
Override this slot in order to save selections for a specific data type. These selections are then stored within an INI file and can be loaded via slotLoadSelection().
_file | The file into which one can store selection data |
Reimplemented in MeshObjectSelectionPlugin, SplatCloudObjectSelectionPlugin, VolumeMeshSelectionPlugin, BSplineCurveSelectionPlugin, BSplineSurfaceSelectionPlugin, ObjectSelectionPlugin, and PolyLineSelectionPlugin.
Definition at line 489 of file SelectionInterface.hh.
|
inlineprivatevirtualslot |
A specific operation is requested.
This slot is called each time the user has pressed one of the operations buttons (for the various primitive types) offered in the tool box.
_operation | The identifier of the operation just as registered via addSelectionOperations |
Reimplemented in MeshObjectSelectionPlugin, SplatCloudObjectSelectionPlugin, VolumeMeshSelectionPlugin, BSplineCurveSelectionPlugin, BSplineSurfaceSelectionPlugin, ObjectSelectionPlugin, and PolyLineSelectionPlugin.
Definition at line 671 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Do not use. Implemented in SelectionBasePlugin
_handleName | handle of the mode |
_show | Hide or show it |
_associatedTypes | Types associated with this mode |
Definition at line 1107 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Do not use. Implemented in SelectionBasePlugin
_handleName | handle of the mode |
_show | Hide or show it |
_associatedTypes | Types associated with this mode |
Definition at line 1115 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Do not use. Implemented in SelectionBasePlugin
_handleName | handle of the mode |
_show | Hide or show it |
_associatedTypes | Types associated with this mode |
Definition at line 1075 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Do not use. Implemented in SelectionBasePlugin
_handleName | handle of the mode |
_show | Hide or show it |
_associatedTypes | Types associated with this mode |
Definition at line 1099 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Do not use. Implemented in SelectionBasePlugin
_handleName | handle of the mode |
_show | Hide or show it |
_associatedTypes | Types associated with this mode |
Definition at line 1091 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Do not use. Implemented in SelectionBasePlugin
_handleName | handle of the mode |
_show | Hide or show it |
_associatedTypes | Types associated with this mode |
Definition at line 1067 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Do not use. Implemented in SelectionBasePlugin
_handleName | handle of the mode |
_show | Hide or show it |
_associatedTypes | Types associated with this mode |
Definition at line 1083 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Called whenever the user performs a sphere selection.
This has to be implemented by each type selection plugin if this interactive selection mode should be provided. The metaphor behind it is that the user draws the selection with a sphere. All primitives inside the current sphere get selected.
_event | The mouse event that currently is performed |
_radius | The current radius of the selection sphere |
_currentType | The currently active primitive type |
_deselect | True if entities should be deselected |
Reimplemented in MeshObjectSelectionPlugin, and SplatCloudObjectSelectionPlugin.
Definition at line 782 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Called whenever the user performs a surface lasso selection.
This has to be implemented by each type selection plugin if this interactive selection mode should be provided. The metaphor behind it is that the user draws a polygonal line on the surface of an object and all primitives which are insinde the surface patch defined by the line get selected.
_event | The mouse event that currently is performed |
_currentType | The currently active primitive type |
_deselect | True if entities should be deselected |
Definition at line 768 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Do not use. Implemented in SelectionBasePlugin
_targetsOnly | use target objects only |
Definition at line 1148 of file SelectionInterface.hh.
|
inlineprivatevirtualslot |
Called whenever the user performs a toggle selection.
This has to be implemented by each type selection plugin if this interactive selection mode should be provided.
_event | The mouse event that occurred |
_currentType | The currently active primitive type |
_deselect | True if entities should be deselected |
Reimplemented in MeshObjectSelectionPlugin, SplatCloudObjectSelectionPlugin, VolumeMeshSelectionPlugin, BSplineCurveSelectionPlugin, BSplineSurfaceSelectionPlugin, ObjectSelectionPlugin, and PolyLineSelectionPlugin.
Definition at line 728 of file SelectionInterface.hh.
|
inlineprivatevirtual |
Called whenever the user performs a volume lasso selection.
This has to be implemented by each type selection plugin if this interactive selection mode should be provided. The metaphor behind it is that the user draws a polygonal line and all primitives which are insinde the volume spanned by the eye position and the polygon get selected.
_event | The mouse event that currently is performed |
_currentType | The currently active primitive type |
_deselect | True if entities should be deselected |
Reimplemented in MeshObjectSelectionPlugin, SplatCloudObjectSelectionPlugin, VolumeMeshSelectionPlugin, BSplineCurveSelectionPlugin, BSplineSurfaceSelectionPlugin, ObjectSelectionPlugin, and PolyLineSelectionPlugin.
Definition at line 754 of file SelectionInterface.hh.
|
inlinevirtual |
Emitted by selection base plugin whenever the user performs a sphere selection.
This connects to slotSphereSelection() which has to be implemented by each type selection plugin if this interactive selection mode should be provided.
_event | The mouse event that currently is performed |
_radius | The current radius of the selection sphere |
_currentType | The currently active primitive type |
_deselect | True if entities should be deselected |
Definition at line 914 of file SelectionInterface.hh.
|
inlinevirtual |
Emitted by selection base plugin whenever the user performs a surface lasso selection.
This connects to slotSurfaceLassoSelection() which has to be implemented by each type selection plugin if this interactive selection mode should be provided.
_event | The mouse event that currently is performed |
_currentType | The currently active primitive type |
_deselect | True if entities should be deselected |
Definition at line 902 of file SelectionInterface.hh.
|
inlinevirtual |
Indicates whether selection should be performed on target objects only.
Self-explanatory
_targetsOnly | True if selection should restrict to target objects |
Definition at line 426 of file SelectionInterface.hh.
|
inlinevirtual |
Emitted by selection base plugin whenever the user performs a toggle selection.
This connects to slotToggleSelection() which has to be implemented by each type selection plugin if this interactive selection mode should be provided.
_event | The mouse event that currently is performed |
_currentType | The currently active primitive type |
_deselect | True if entities should be deselected |
Definition at line 869 of file SelectionInterface.hh.
|
inlinevirtual |
Emitted by selection base plugin whenever the user performs a volume lasso selection.
This connects to slotVolumeLassoSelection() which has to be implemented by each type selection plugin if this interactive selection mode should be provided.
_event | The mouse event that currently is performed |
_currentType | The currently active primitive type |
_deselect | True if entities should be deselected |
Definition at line 891 of file SelectionInterface.hh.