Developer Documentation
MeshObjectSelectionPlugin Class Reference
Inheritance diagram for MeshObjectSelectionPlugin:
PythonInterface OptionsInterface MouseInterface SelectionInterface LoggingInterface ScriptInterface BackupInterface INIInterface LoadSaveInterface KeyInterface BaseInterface

Public Slots

void loadSelection (int _objId, const QString &_filename)
 
QString version ()
 

Signals

void updateView ()
 
void updatedObject (int, const UpdateType &)
 
void nodeVisibilityChanged (int _identifier)
 
void setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
 
void createBackup (int _objectid, QString _name, UpdateType _type=UPDATE_ALL)
 
void log (Logtype _type, QString _message)
 
void log (QString _message)
 
void addSelectionEnvironment (QString _modeName, QString _description, QString _icon, QString &_handleName)
 
void registerType (QString _handleName, DataType _type)
 
void addPrimitiveType (QString _handleName, QString _name, QString _icon, SelectionInterface::PrimitiveType &_typeHandle)
 
void addSelectionOperations (QString _handleName, QStringList _operationsList, QString _category, SelectionInterface::PrimitiveType _type=0u)
 
void addSelectionParameters (QString _handleName, QWidget *_widget, QString _category, SelectionInterface::PrimitiveType _type=0u)
 
void showToggleSelectionMode (QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
 
void showLassoSelectionMode (QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
 
void showVolumeLassoSelectionMode (QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
 
void showSphereSelectionMode (QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
 
void showClosestBoundarySelectionMode (QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
 
void showFloodFillSelectionMode (QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
 
void showComponentsSelectionMode (QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
 
void getActiveDataTypes (SelectionInterface::TypeList &_types)
 
void getActivePrimitiveType (SelectionInterface::PrimitiveType &_type)
 
void targetObjectsOnly (bool &_targetsOnly)
 
void registerKeyShortcut (int _key, Qt::KeyboardModifiers _modifiers=Qt::NoModifier)
 
void deleteObject (int _objectId)
 
void addEmptyObject (DataType _type, int &_id)
 
void scriptInfo (QString _functionName)
 
- Signals inherited from BaseInterface
virtual void updateView ()
 Update current view in Main Application. More...
 
virtual void setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
 Set a description for a public slot. More...
 
virtual void setRenderer (unsigned int _viewer, QString _rendererName)
 Set a renderer for the given viewer. More...
 
- Signals inherited from KeyInterface
virtual void registerKey (int _key, Qt::KeyboardModifiers _modifiers, QString _description, bool _multiUse=false)
 Register a key-combination for your plugin. More...
 
- Signals inherited from LoadSaveInterface
virtual void save (int _id, QString _filename)
 Save object to a file. More...
 
virtual void load (QString _filename, DataType _type, int &_id)
 Load object from file with a specific DataType. More...
 
- Signals inherited from BackupInterface
virtual void createBackup (int _objectid, QString _name, UpdateType _type=UPDATE_ALL)
 Tell Backup Plugin to create a backup. More...
 
virtual void aboutToRestore (int _objectid)
 Backup Plugin tells other Plugins that a restore will happen. More...
 
virtual void generateBackup (int _id, QString _name, UpdateType _type)
 This signal is emitted by a BackupPlugin and tells a TypePlugin to generate a backup. More...
 
- Signals inherited from ScriptInterface
virtual void scriptInfo (QString _functionWithParameters)
 Emit this signal if a scriptable function is executed. More...
 
virtual void getScriptingEngine (QScriptEngine *&_engine)
 
virtual void executeFileScript (QString _filename)
 
virtual void getAvailableFunctions (QStringList &_functions)
 
- Signals inherited from LoggingInterface
virtual void log (Logtype _type, QString _message)=0
 
virtual void log (QString _message)=0
 
- Signals inherited from SelectionInterface
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...
 
virtual void showToggleSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes)
 Show toggle selection mode in a specified selection environment. More...
 
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 selectionOperation (QString _operation)
 Emitted by selection base plugin when a non-interactive selection operation is requested. More...
 
virtual void registerKeyShortcut (int _key, Qt::KeyboardModifiers _modifiers=Qt::NoModifier)
 Register key shortcut. More...
 
- Signals inherited from PythonInterface
virtual void executePythonScript (QString _script)
 

Public Member Functions

 MeshObjectSelectionPlugin ()
 Default constructor. More...
 
 ~MeshObjectSelectionPlugin ()
 Default destructor. More...
 
bool initializeOptionsWidget (QWidget *&_widget)
 Initialize the Options Widget. More...
 
bool vertexTypeActive ()
 
bool edgeTypeActive ()
 
bool faceTypeActive ()
 
template<typename MeshType >
void update_regions (MeshType *_mesh)
 Update face selection to correspond to the vertex selection. More...
 

Private Slots

void loadIniFile (INIFile &_ini, int _id)
 
void saveIniFile (INIFile &_ini, int _id)
 
void initializePlugin ()
 
void pluginsInitialized ()
 
void noguiSupported ()
 
void applyOptions ()
 
QString name ()
 
Private slots
void conversionRequested ()
 Show selection conversion dialog. More...
 
void setDefaultColorValues ()
 sets the default color values for selection/handle/region/feature nodes for all objects of this type More...
 
- Private Slots inherited from BaseInterface
virtual void exit ()
 
virtual QString version ()
 Return a version string for your plugin. More...
 
- Private Slots inherited from KeyInterface
virtual void slotKeyEvent (QKeyEvent *_event)
 Key Event from Main App. More...
 
- Private Slots inherited from SelectionInterface
virtual void loadSelection (int _objId, const QString &_filename)
 Scripting slot for loading selections. More...
 

Private Member Functions

void slotSelectionOperation (QString _operation)
 A specific operation is requested. More...
 
void slotToggleSelection (QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
 Called whenever the user performs a toggle selection. More...
 
void slotLassoSelection (QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
 Called whenever the user performs a lasso selection. More...
 
void slotVolumeLassoSelection (QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
 Called whenever the user performs a volume lasso selection. More...
 
void slotSphereSelection (QMouseEvent *_event, double _radius, SelectionInterface::PrimitiveType _currentType, bool _deselect)
 Called whenever the user performs a sphere selection. More...
 
void slotClosestBoundarySelection (QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
 Called whenever the user performs a closest boundary selection. More...
 
void slotFloodFillSelection (QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
 Called whenever the user performs a flood fill selection. More...
 
void slotComponentsSelection (QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
 Called whenever the user performs a connected components selection. More...
 
void slotIndexSelection (int _key)
 
void slotLoadSelection (const INIFile &_file)
 Load selection for specific objects in the scene. More...
 
void slotSaveSelection (INIFile &_file)
 Save selection for all objects in the scene. More...
 
void slotKeyShortcutEvent (int _key, Qt::KeyboardModifiers _modifiers)
 One of the previously registered keys has been pressed. More...
 
void slotMouseWheelEvent (QWheelEvent *event, std::string const &mode)
 Wheel Event from main application. More...
 
void addedEmptyObject (int _id)
 An empty object has been added. More...
 
QString description ()
 Return a description of what the plugin is doing. More...
 
Private methods
void updateColorValues ()
 Set descriptions for local public slots. More...
 
void updateSlotDescriptions ()
 Set descriptions for local public slots. More...
 
void setColorForSelection (const int _objectId, const PrimitiveType _primitiveType)
 Set color for selection. More...
 
Template Functions
template<typename MeshT >
bool deleteSelection (MeshT *_mesh, PrimitiveType _primitiveType)
 Delete all selected elements of a mesh. More...
 
template<typename MeshT >
void update_regions (MeshT *_mesh)
 Update face selection to correspond to the vertex selection.
 
template<typename MeshT >
void toggleMeshSelection (int _objectId, MeshT *_mesh, uint _fh, ACG::Vec3d &_hit_point, PrimitiveType _primitiveType)
 Toggle mesh selection. More...
 
template<typename MeshT >
void paintSphereSelection (MeshT *_mesh, int _objectId, int _target_idx, typename MeshT::Point _hitpoint, double _radius, PrimitiveType _primitiveTypes, bool _deselection)
 Use the event to paint selection with a sphere. More...
 
template<class MeshT >
bool volumeSelection (MeshT *_mesh, int _objectId, ACG::GLState &_state, QRegion *_region, PrimitiveType _primitiveTypes, bool _deselection)
 Surface volume selection tool. More...
 
template<class MeshT >
void closestBoundarySelection (MeshT *_mesh, int _vh, PrimitiveType _primitiveTypes, bool _deselection)
 Select all entities that are incident to closest boundary. More...
 
template<class MeshT >
void floodFillSelection (MeshT *_mesh, int _objectId, uint _fh, double _maxAngle, PrimitiveType _primitiveTypes, bool _deselection)
 Select all entities that are connected (and do not exceed the maximum dihedral angle) More...
 
template<typename MeshT >
void componentsMeshSelection (MeshT *_mesh, int _objectId, uint _fh, ACG::Vec3d &_hit_point, PrimitiveType _primitiveType)
 Connected component mesh selection. More...
 
template<class MeshT >
void colorizeSelection (MeshT *_mesh, PrimitiveType _primitiveTypes, int _red, int _green, int _blue, int _alpha)
 Colorize the selection. More...
 
template<class MeshT >
void createMeshFromSelection (MeshT &_mesh, MeshT &_newMesh, PrimitiveType _primitiveType)
 Create a new mesh from the selection. More...
 
template<class MeshT >
void selectVerticesByValue (MeshT *_mesh, QString _component, bool _greater, double _value)
 Select vertices by value. More...
 
Private helper function
int createMeshFromSelection (int _objectId, PrimitiveType _primitiveType)
 Create a mesh containing the selection of the given mesh. More...
 
- Private Member Functions inherited from BaseInterface
virtual void noguiSupported ()
 
virtual ~BaseInterface ()
 Destructor. More...
 
virtual void blockScenegraphUpdates (bool _block)
 Tell the core to prevent scenegraph updates. More...
 
virtual void updatedObject (int _objectId)
 An object has been changed or added by this plugin. More...
 
virtual void updatedObject (int _identifier, const UpdateType &_type)
 An object has been changed or added by this plugin. More...
 
virtual void nodeVisibilityChanged (int _identifier)
 A scenegraph node has been shown or hidden. More...
 
virtual QString name ()=0
 Return a name for the plugin. More...
 
virtual void getCurrentRenderer (unsigned int _viewer, QString &_rendererName)
 Get the current renderer for the given viewer. More...
 
- Private Member Functions inherited from KeyInterface
virtual void slotKeyReleaseEvent (QKeyEvent *_event)
 Key Release Event from Main App. More...
 
virtual ~KeyInterface ()
 Destructor. More...
 
- Private Member Functions inherited from LoadSaveInterface
virtual ~LoadSaveInterface ()
 Destructor. More...
 
virtual void addEmptyObject (DataType _type, int &_id)
 
virtual void copyObject (int _oldId, int &_newId)
 
virtual void emptyObjectAdded (int _id)
 DEPRECATED HERE (Moved to Type Interface)! Emit this signal if an empty object has been created. More...
 
virtual void deleteObject (int _id)
 Delete an object
This signal can be called from any thread.
. More...
 
virtual void deleteAllObjects ()
 Delete all Objects. More...
 
virtual void getAllFileFilters (QStringList &_filters)
 Get all file filters that are registered. More...
 
- Private Member Functions inherited from INIInterface
virtual ~INIInterface ()
 Destructor. More...
 
- Private Member Functions inherited from BackupInterface
virtual void createBackup (IdList _objectids, QString _name, std::vector< UpdateType > _types)
 Tell Backup Plugin to create a group backup. More...
 
virtual void undo (int _objectid)
 Tell Backup Plugin to undo the last action of an object. More...
 
virtual void redo (int _objectid)
 Tell Backup Plugin to redo the last action on an object. More...
 
virtual void undo ()
 Tell Backup Plugin to undo the last action. More...
 
virtual void redo ()
 Tell Backup Plugin to redo the last action. More...
 
virtual ~BackupInterface ()
 Destructor. More...
 
virtual void restored (int _objectid)
 Backup Plugin tells other Plugins that a restore has happened. More...
 
- Private Member Functions inherited from ScriptInterface
virtual ~ScriptInterface ()
 Destructor. More...
 
virtual void showScriptInEditor (QString _filename)
 
virtual void executeScript (QString _script)
 
virtual void getDescription (QString _function, QString &_description, QStringList &_parameters, QStringList &_descriptions)
 
- Private Member Functions inherited from LoggingInterface
virtual ~LoggingInterface ()
 Destructor. More...
 
- Private Member Functions inherited from SelectionInterface
virtual ~SelectionInterface ()
 Destructor. More...
 
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 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 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...
 
virtual void addSelectionParameters (QString _handleName, QWidget *_widget, QString _category, PrimitiveType _type=0u)
 Add interactive selection parameters for a specific primitive type. More...
 
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, 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...
 
- Private Member Functions inherited from MouseInterface
virtual ~MouseInterface ()
 Destructor. More...
 
- Private Member Functions inherited from OptionsInterface
virtual ~OptionsInterface ()
 Destructor. More...
 
virtual bool initializeOptionsWidget (QWidget *&_widget)=0
 Initialize the Options Widget. More...
 
virtual void applyOptions ()=0
 Apply changes to options. More...
 
- Private Member Functions inherited from PythonInterface
virtual void openPythonScriptInEditor (QString _script)
 
virtual ~PythonInterface ()
 Destructor. More...
 

Private Attributes

Member variables
QString environmentHandle_
 Handle to selection environment. More...
 
SelectionInterface::PrimitiveType vertexType_
 Primitive type handles: More...
 
SelectionInterface::PrimitiveType edgeType_
 Handle to selection environment. More...
 
SelectionInterface::PrimitiveType halfedgeType_
 Handle to selection environment. More...
 
SelectionInterface::PrimitiveType faceType_
 Handle to selection environment. More...
 
SelectionInterface::PrimitiveType allSupportedTypes_
 Handle to selection environment. More...
 
QPolygon lasso_2Dpoints_
 Used for lasso selection tool. More...
 
QVector< QPoint > volumeLassoPoints_
 Used for volume lasso tool. More...
 
ConversionDialogconversionDialog_
 Handle to selection environment. More...
 
ParameterWidgetparameterWidget_
 Handle to selection environment. More...
 
QtColorChooserButtoncolorButtonSelection_
 Options. More...
 
QtColorChooserButtoncolorButtonArea_
 Handle to selection environment. More...
 
QtColorChooserButtoncolorButtonHandle_
 Handle to selection environment. More...
 
QtColorChooserButtoncolorButtonFeature_
 Handle to selection environment. More...
 
ACG::Vec4f statusColor_
 Handle to selection environment. More...
 
ACG::Vec4f areaColor_
 Handle to selection environment. More...
 
ACG::Vec4f handleColor_
 Handle to selection environment. More...
 
ACG::Vec4f featureColor_
 Handle to selection environment. More...
 
double dihedral_angle_threshold_
 Handle to selection environment. More...
 
double max_angle_
 Handle to selection environment. More...
 

Friends

class SelectVolumeAction
 

Scriptable slots

template<typename HandleT >
bool selectElement (int _objectId, HandleT _handle, bool _fly_to_element)
 set dihedral angle threshold for edge selection More...
 
void set_dihedral_angle_threshold (const double _a)
 set dihedral angle threshold for edge selection More...
 
double get_dihedral_angle_threshold ()
 get dihedral angle threshold for edge selection More...
 
void set_max_angle (const double _a)
 set max angle for flood fill selection More...
 
double get_max_angle ()
 get max angle for flood fill selection More...
 
void selectVertices (int objectId, IdList _vertexList)
 select given vertices More...
 
bool selectVertex (int _objectId, int _idx, bool _fly_to_vertex)
 select vertex with id _idx and maybe fly to it More...
 
void unselectVertices (int objectId, IdList _vertexList)
 unselect given vertices More...
 
void selectAllVertices (int _objectId)
 Select all Vertices. More...
 
void clearVertexSelection (int _objectId)
 Unselect all vertices. More...
 
void invertVertexSelection (int _objectId)
 Invert the current vertex selection. More...
 
void selectBoundaryVertices (int _objectId)
 Select all boundary vertices of the given object. More...
 
void selectClosestBoundaryVertices (int _objectId, int _vertexId)
 Select all vertices of the boundary close to the given vertex. More...
 
void shrinkVertexSelection (int _objectId)
 Shrink the current vertex selection. More...
 
void growVertexSelection (int _objectId)
 Grow the current vertex selection. More...
 
IdList getVertexSelection (int _objectId)
 Return a list of all selected vertices. More...
 
void deleteVertexSelection (int _objectId)
 Delete vertices and faces that are currently selected. More...
 
int createMeshFromVertexSelection (int _objectId)
 set dihedral angle threshold for edge selection More...
 
void colorizeVertexSelection (int _objectId, int _r, int _g, int _b, int a)
 Colorize the vertex selection. More...
 
void selectHandleVertices (int objectId, IdList _vertexList)
 Set vertices to be part of the handle area. More...
 
void unselectHandleVertices (int objectId, IdList _vertexList)
 Remove vertices from handle area. More...
 
void clearHandleVertices (int objectId)
 Clear handle Area. More...
 
void setAllHandleVertices (int objectId)
 Set all vertices to be part of the handle area. More...
 
IdList getHandleVertices (int objectId)
 Get a list of all handle vertices. More...
 
void loadFlipperModelingSelection (int _objectId, QString _filename)
 Load a selection from an Flipper selection file for the given object. More...
 
void saveFlipperModelingSelection (int _objectId, QString _filename)
 Save a selection in Flipper Selection Format. More...
 
void selectModelingVertices (int objectId, IdList _vertexList)
 Set vertices to be part of the modeling area. More...
 
void unselectModelingVertices (int objectId, IdList _vertexList)
 Remove vertices from modeling area. More...
 
void selectVerticesByValue (int _objectId, QString _component, bool _greater, double _value)
 Select vertices by their value. More...
 
void clearModelingVertices (int objectId)
 Clear Modeling Area. More...
 
void setAllModelingVertices (int objectId)
 Set all vertices to be part of the modeling area. More...
 
IdList getModelingVertices (int objectId)
 Get a list of all modeling vertices. More...
 
void selectEdges (int objectId, IdList _edgeList, const double _dihedral_angle_threshold=0.0)
 Select given Edges. More...
 
bool selectEdge (int _objectId, int _idx, bool _fly_to_edge)
 Select edge with id _idx and maybe fly to it. More...
 
void unselectEdges (int objectId, IdList _edgeList)
 Unselect given Edges. More...
 
void selectAllEdges (int objectId)
 Select all Edges. More...
 
void invertEdgeSelection (int objectId)
 Unselect all Edges. More...
 
void clearEdgeSelection (int objectId)
 Invert the current edge selection. More...
 
void selectBoundaryEdges (int objectId)
 select boundary edges More...
 
void deleteEdgeSelection (int _objectId)
 Delete edges that are currently selected. More...
 
IdList getEdgeSelection (int objectId)
 Return a list of all selected edges. More...
 
IdList convertEdgesToVertexPairs (int _id, const IdList &_edges)
 Convert edge ids to vertex pairs. More...
 
IdList convertVertexPairsToEdges (int _id, const IdList &_vertices)
 Inverse of function above. More...
 
int createMeshFromEdgeSelection (int _objectId)
 Create a mesh containing the face selection of the given mesh. More...
 
void colorizeEdgeSelection (int objectId, int r, int g, int b, int a)
 Colorize the edge selection. More...
 
void traceEdgePath (int objectId, double threshold)
 Trace Edge Path. More...
 
void selectHalfedges (int objectId, IdList _vertexList)
 Select given Halfedges. More...
 
bool selectHalfedge (int _objectId, int _idx, bool _fly_to_halfedge)
 Select halfedge with id _idx and maybe fly to it. More...
 
void unselectHalfedges (int objectId, IdList _vertexList)
 Unselect given Halfedges. More...
 
void selectAllHalfedges (int objectId)
 Select all Halfedges. More...
 
void invertHalfedgeSelection (int objectId)
 Unselect all Halfedges. More...
 
void clearHalfedgeSelection (int objectId)
 Invert the current edge selection. More...
 
void selectBoundaryHalfedges (int objectId)
 Select boundary edges. More...
 
IdList getHalfedgeSelection (int objectId)
 Return a list of all selected edges. More...
 
IdList convertHalfedgesToVertexPairs (int _id, const IdList &_halfedges)
 Convert halfedge ids to vertex pairs. More...
 
IdList convertVertexPairsToHalfedges (int _id, const IdList &_vertices)
 Inverse of function above. More...
 
void colorizeHalfedgeSelection (int objectId, int r, int g, int b, int a)
 Colorize the edge selection. More...
 
void selectFaces (int objectId, IdList _facesList)
 Select given faces. More...
 
bool selectFace (int _objectId, int _idx, bool _fly_to_face)
 Select face with id _idx and maybe fly to it. More...
 
void unselectFaces (int objectId, IdList _facesList)
 Unselect given faces. More...
 
void selectAllFaces (int objectId)
 Select all faces. More...
 
void clearFaceSelection (int objectId)
 Unselect all faces. More...
 
void invertFaceSelection (int objectId)
 Invert the current face selection. More...
 
void deleteFaceSelection (int _objectId)
 Delete face that are currently selected. More...
 
void selectBoundaryFaces (int objectId)
 Select all boundary faces of the given object. More...
 
void shrinkFaceSelection (int objectId)
 Shrink the current face selection. More...
 
void growFaceSelection (int objectId)
 Grow the current face selection. More...
 
IdList getFaceSelection (int objectId)
 Return a list of all selected faces. More...
 
int createMeshFromFaceSelection (int _objectId)
 Create a mesh containing the face selection of the given mesh. More...
 
void colorizeFaceSelection (int objectId, int r, int g, int b, int a)
 Colorize the face selection. More...
 
void lassoSelect (QRegion &_region, PrimitiveType _primitiveType, bool _deselection)
 Lasso selection tool. More...
 
void convertSelection (const int &_objectId, const QString &_from, const QString &_to, bool _deselect)
 Convert the selection on one object. More...
 
void conversion (const QString &_from, const QString &_to, bool _deselect)
 Convert the selection on all target objects. More...
 
template<typename MeshObjectT , typename HandleT >
void getFlightData (MeshObjectT &_mesh_object, HandleT _handle, OpenMesh::Vec3d &center, OpenMesh::Vec3d &normal, bool &handle_valid)
 set dihedral angle threshold for edge selection More...
 
void update_dihedral_angle_threshold_from_ui ()
 set dihedral angle threshold for edge selection More...
 

Additional Inherited Members

- Private Types inherited from SelectionInterface
typedef std::vector< DataTypeTypeList
 
typedef unsigned int PrimitiveType
 

Detailed Description

Definition at line 73 of file MeshObjectSelectionPlugin.hh.

Constructor & Destructor Documentation

◆ MeshObjectSelectionPlugin()

MeshObjectSelectionPlugin::MeshObjectSelectionPlugin ( )

Default constructor.

Definition at line 113 of file MeshObjectSelectionPlugin.cc.

◆ ~MeshObjectSelectionPlugin()

MeshObjectSelectionPlugin::~MeshObjectSelectionPlugin ( )

Default destructor.

Definition at line 130 of file MeshObjectSelectionPlugin.cc.

Member Function Documentation

◆ addedEmptyObject()

void MeshObjectSelectionPlugin::addedEmptyObject ( int  _id)
privatevirtual

An empty object has been added.

Slot is called if an empty object has been added by the core.
This slot will be executed on the main thread.

Parameters
_idId of the new object

Reimplemented from LoadSaveInterface.

Definition at line 2340 of file MeshObjectSelectionPlugin.cc.

◆ applyOptions

void MeshObjectSelectionPlugin::applyOptions ( )
privateslot

Definition at line 2330 of file MeshObjectSelectionPlugin.cc.

◆ clearEdgeSelection

void MeshObjectSelectionPlugin::clearEdgeSelection ( int  objectId)
slot

Invert the current edge selection.

Definition at line 155 of file EdgeSelection.cc.

◆ clearFaceSelection

void MeshObjectSelectionPlugin::clearFaceSelection ( int  objectId)
slot

Unselect all faces.

Definition at line 154 of file FaceSelection.cc.

◆ clearHalfedgeSelection

void MeshObjectSelectionPlugin::clearHalfedgeSelection ( int  objectId)
slot

Invert the current edge selection.

Definition at line 154 of file HalfedgeSelection.cc.

◆ clearHandleVertices

void MeshObjectSelectionPlugin::clearHandleVertices ( int  objectId)
slot

Clear handle Area.

Definition at line 444 of file VertexSelection.cc.

◆ clearModelingVertices

void MeshObjectSelectionPlugin::clearModelingVertices ( int  objectId)
slot

Clear Modeling Area.

Definition at line 609 of file VertexSelection.cc.

◆ clearVertexSelection

void MeshObjectSelectionPlugin::clearVertexSelection ( int  _objectId)
slot

Unselect all vertices.

Definition at line 156 of file VertexSelection.cc.

◆ closestBoundarySelection()

template<class MeshT >
void MeshObjectSelectionPlugin::closestBoundarySelection ( MeshT _mesh,
int  _vh,
PrimitiveType  _primitiveTypes,
bool  _deselection 
)
private

Select all entities that are incident to closest boundary.

select primitives of the closest boundary

Parameters
_mesha mesh
_vhhandle of the vertex that was picked
_primitiveTypesthe currently active primitive types
_deselectiontrue if primitives should be deselected

Definition at line 464 of file MeshObjectSelectionPluginT_impl.hh.

◆ colorizeEdgeSelection

void MeshObjectSelectionPlugin::colorizeEdgeSelection ( int  objectId,
int  r,
int  g,
int  b,
int  a 
)
slot

Colorize the edge selection.

Definition at line 387 of file EdgeSelection.cc.

◆ colorizeFaceSelection

void MeshObjectSelectionPlugin::colorizeFaceSelection ( int  objectId,
int  r,
int  g,
int  b,
int  a 
)
slot

Colorize the face selection.

colorize the face selection

Definition at line 322 of file FaceSelection.cc.

◆ colorizeHalfedgeSelection

void MeshObjectSelectionPlugin::colorizeHalfedgeSelection ( int  objectId,
int  r,
int  g,
int  b,
int  a 
)
slot

Colorize the edge selection.

colorize the halfedge selection

Definition at line 358 of file HalfedgeSelection.cc.

◆ colorizeSelection()

template<typename MeshT >
void MeshObjectSelectionPlugin::colorizeSelection ( MeshT _mesh,
PrimitiveType  _primitiveTypes,
int  _red,
int  _green,
int  _blue,
int  _alpha 
)
private

Colorize the selection.

Colorize a selection.

Parameters
_mesha mesh
_primitiveTypesselection types
_redrgba color
_greenrgba color
_bluergba color
_alphargba color

Definition at line 782 of file MeshObjectSelectionPluginT_impl.hh.

◆ colorizeVertexSelection

void MeshObjectSelectionPlugin::colorizeVertexSelection ( int  _objectId,
int  _r,
int  _g,
int  _b,
int  a 
)
slot

Colorize the vertex selection.

colorize the vertex selection

Definition at line 348 of file VertexSelection.cc.

◆ componentsMeshSelection()

template<class MeshT >
void MeshObjectSelectionPlugin::componentsMeshSelection ( MeshT _mesh,
int  _objectId,
uint  _fh,
ACG::Vec3d _hit_point,
PrimitiveType  _primitiveType 
)
private

Connected component mesh selection.

Select a complete connected component.

Parameters
_mesha mesh
_objectIdObject Id to work on
_fhhandle of the face that was picked
_hit_pointpoint that was picked
_primitiveTypeprimitive types to be selected

Definition at line 633 of file MeshObjectSelectionPluginT_impl.hh.

◆ conversion

void MeshObjectSelectionPlugin::conversion ( const QString &  _from,
const QString &  _to,
bool  _deselect 
)
slot

Convert the selection on all target objects.

Definition at line 1229 of file MeshObjectSelectionPlugin.cc.

◆ conversionRequested

void MeshObjectSelectionPlugin::conversionRequested ( )
privateslot

Show selection conversion dialog.

Definition at line 857 of file MeshObjectSelectionPlugin.cc.

◆ convertEdgesToVertexPairs

IdList MeshObjectSelectionPlugin::convertEdgesToVertexPairs ( int  _id,
const IdList _edges 
)
slot

Convert edge ids to vertex pairs.

Definition at line 278 of file EdgeSelection.cc.

◆ convertHalfedgesToVertexPairs

IdList MeshObjectSelectionPlugin::convertHalfedgesToVertexPairs ( int  _id,
const IdList _halfedges 
)
slot

Convert halfedge ids to vertex pairs.

Definition at line 248 of file HalfedgeSelection.cc.

◆ convertSelection

void MeshObjectSelectionPlugin::convertSelection ( const int &  _objectId,
const QString &  _from,
const QString &  _to,
bool  _deselect 
)
slot

Convert the selection on one object.

Definition at line 874 of file MeshObjectSelectionPlugin.cc.

◆ convertVertexPairsToEdges

IdList MeshObjectSelectionPlugin::convertVertexPairsToEdges ( int  _id,
const IdList _vertices 
)
slot

Inverse of function above.

Definition at line 324 of file EdgeSelection.cc.

◆ convertVertexPairsToHalfedges

IdList MeshObjectSelectionPlugin::convertVertexPairsToHalfedges ( int  _id,
const IdList _vertices 
)
slot

Inverse of function above.

Definition at line 294 of file HalfedgeSelection.cc.

◆ createMeshFromEdgeSelection

int MeshObjectSelectionPlugin::createMeshFromEdgeSelection ( int  _objectId)
slot

Create a mesh containing the face selection of the given mesh.

Definition at line 247 of file EdgeSelection.cc.

◆ createMeshFromFaceSelection

int MeshObjectSelectionPlugin::createMeshFromFaceSelection ( int  _objectId)
slot

Create a mesh containing the face selection of the given mesh.

Definition at line 223 of file FaceSelection.cc.

◆ createMeshFromSelection() [1/2]

int MeshObjectSelectionPlugin::createMeshFromSelection ( int  _objectId,
PrimitiveType  _primitiveType 
)
private

Create a mesh containing the selection of the given mesh.

Definition at line 2156 of file MeshObjectSelectionPlugin.cc.

◆ createMeshFromSelection() [2/2]

template<class MeshT >
void MeshObjectSelectionPlugin::createMeshFromSelection ( MeshT _mesh,
MeshT _newMesh,
PrimitiveType  _primitiveType 
)
private

Create a new mesh from the selection.

Parameters
_meshA mesh
_newMeshThe resulting mesh containing only the selected elements
_primitiveTypeWhich primitive should be used for selection (vertices,faces,edges,...)

Definition at line 851 of file MeshObjectSelectionPluginT_impl.hh.

◆ createMeshFromVertexSelection

int MeshObjectSelectionPlugin::createMeshFromVertexSelection ( int  _objectId)
slot

set dihedral angle threshold for edge selection

Definition at line 341 of file VertexSelection.cc.

◆ deleteEdgeSelection

void MeshObjectSelectionPlugin::deleteEdgeSelection ( int  _objectId)
slot

Delete edges that are currently selected.

Definition at line 224 of file EdgeSelection.cc.

◆ deleteFaceSelection

void MeshObjectSelectionPlugin::deleteFaceSelection ( int  _objectId)
slot

Delete face that are currently selected.

Definition at line 200 of file FaceSelection.cc.

◆ deleteSelection()

template<typename MeshT >
bool MeshObjectSelectionPlugin::deleteSelection ( MeshT _mesh,
PrimitiveType  _primitiveType 
)
private

Delete all selected elements of a mesh.

Parameters
_mesha mesh
_primitiveTypebitmask of active primitive types
Returns
returns true if the mesh was changed(i.e there was something selected that was deleted)

Definition at line 58 of file MeshObjectSelectionPluginT_impl.hh.

◆ deleteVertexSelection

void MeshObjectSelectionPlugin::deleteVertexSelection ( int  _objectId)
slot

Delete vertices and faces that are currently selected.

Definition at line 318 of file VertexSelection.cc.

◆ description()

QString MeshObjectSelectionPlugin::description ( )
inlineprivatevirtual

Return a description of what the plugin is doing.

This function has to return a basic description of the plugin

Implements BaseInterface.

Definition at line 198 of file MeshObjectSelectionPlugin.hh.

◆ edgeTypeActive()

bool MeshObjectSelectionPlugin::edgeTypeActive ( )
inline

Definition at line 247 of file MeshObjectSelectionPlugin.hh.

◆ faceTypeActive()

bool MeshObjectSelectionPlugin::faceTypeActive ( )
inline

Definition at line 254 of file MeshObjectSelectionPlugin.hh.

◆ floodFillSelection()

template<class MeshT >
void MeshObjectSelectionPlugin::floodFillSelection ( MeshT _mesh,
int  _objectId,
uint  _fh,
double  _maxAngle,
PrimitiveType  _primitiveTypes,
bool  _deselection 
)
private

Select all entities that are connected (and do not exceed the maximum dihedral angle)

Select all primitves of a planar region surrounding the faceHandle.

Parameters
_mesha mesh
_objectIdobject id to work on
_fhhandle of the face that was picked
_maxAnglethe maximum dihedral angle over which the flood fill selection passes
_primitiveTypesthe currently active primitive types
_deselectiontrue if primitives should be deselected

Definition at line 545 of file MeshObjectSelectionPluginT_impl.hh.

◆ get_dihedral_angle_threshold()

double MeshObjectSelectionPlugin::get_dihedral_angle_threshold ( )

get dihedral angle threshold for edge selection

Definition at line 2372 of file MeshObjectSelectionPlugin.cc.

◆ get_max_angle()

double MeshObjectSelectionPlugin::get_max_angle ( )

get max angle for flood fill selection

Definition at line 2382 of file MeshObjectSelectionPlugin.cc.

◆ getEdgeSelection

IdList MeshObjectSelectionPlugin::getEdgeSelection ( int  objectId)
slot

Return a list of all selected edges.

Definition at line 253 of file EdgeSelection.cc.

◆ getFaceSelection

IdList MeshObjectSelectionPlugin::getFaceSelection ( int  objectId)
slot

Return a list of all selected faces.

Definition at line 299 of file FaceSelection.cc.

◆ getFlightData()

template<typename MeshObjectT , typename HandleT >
void MeshObjectSelectionPlugin::getFlightData ( MeshObjectT &  _mesh_object,
HandleT  _handle,
OpenMesh::Vec3d center,
OpenMesh::Vec3d normal,
bool &  handle_valid 
)
private

set dihedral angle threshold for edge selection

Definition at line 986 of file MeshObjectSelectionPluginT_impl.hh.

◆ getHalfedgeSelection

IdList MeshObjectSelectionPlugin::getHalfedgeSelection ( int  objectId)
slot

Return a list of all selected edges.

Definition at line 223 of file HalfedgeSelection.cc.

◆ getHandleVertices

IdList MeshObjectSelectionPlugin::getHandleVertices ( int  objectId)
slot

Get a list of all handle vertices.

Definition at line 490 of file VertexSelection.cc.

◆ getModelingVertices

IdList MeshObjectSelectionPlugin::getModelingVertices ( int  objectId)
slot

Get a list of all modeling vertices.

Definition at line 654 of file VertexSelection.cc.

◆ getVertexSelection

IdList MeshObjectSelectionPlugin::getVertexSelection ( int  _objectId)
slot

Return a list of all selected vertices.

Definition at line 294 of file VertexSelection.cc.

◆ growFaceSelection

void MeshObjectSelectionPlugin::growFaceSelection ( int  objectId)
slot

Grow the current face selection.

Definition at line 276 of file FaceSelection.cc.

◆ growVertexSelection

void MeshObjectSelectionPlugin::growVertexSelection ( int  _objectId)
slot

Grow the current vertex selection.

Definition at line 271 of file VertexSelection.cc.

◆ initializeOptionsWidget()

bool MeshObjectSelectionPlugin::initializeOptionsWidget ( QWidget *&  _widget)
virtual

Initialize the Options Widget.

Initialize the options widget (create a widget and return a pointer to it )

Example :
_widget = new QWidget();

In the widget you can add anything you want.

use the slot applyOptions() to save the values of options currently entered in your widget.

Parameters
_widgetPointer to the new Widget
Returns
Return true if a widget has been created

Implements OptionsInterface.

Definition at line 2284 of file MeshObjectSelectionPlugin.cc.

◆ initializePlugin

void MeshObjectSelectionPlugin::initializePlugin ( )
privateslot

Definition at line 136 of file MeshObjectSelectionPlugin.cc.

◆ invertEdgeSelection

void MeshObjectSelectionPlugin::invertEdgeSelection ( int  objectId)
slot

Unselect all Edges.

Definition at line 178 of file EdgeSelection.cc.

◆ invertFaceSelection

void MeshObjectSelectionPlugin::invertFaceSelection ( int  objectId)
slot

Invert the current face selection.

Definition at line 177 of file FaceSelection.cc.

◆ invertHalfedgeSelection

void MeshObjectSelectionPlugin::invertHalfedgeSelection ( int  objectId)
slot

Unselect all Halfedges.

Definition at line 177 of file HalfedgeSelection.cc.

◆ invertVertexSelection

void MeshObjectSelectionPlugin::invertVertexSelection ( int  _objectId)
slot

Invert the current vertex selection.

Definition at line 179 of file VertexSelection.cc.

◆ lassoSelect

void MeshObjectSelectionPlugin::lassoSelect ( QRegion &  _region,
PrimitiveType  _primitiveType,
bool  _deselection 
)
slot

Lasso selection tool.

Definition at line 1970 of file MeshObjectSelectionPlugin.cc.

◆ loadFlipperModelingSelection

void MeshObjectSelectionPlugin::loadFlipperModelingSelection ( int  _objectId,
QString  _filename 
)
slot

Load a selection from an Flipper selection file for the given object.

Definition at line 677 of file VertexSelection.cc.

◆ loadIniFile

void MeshObjectSelectionPlugin::loadIniFile ( INIFile _ini,
int  _id 
)
privateslot

Definition at line 1597 of file MeshObjectSelectionPlugin.cc.

◆ loadSelection

void MeshObjectSelectionPlugin::loadSelection ( int  _objId,
const QString &  _filename 
)
slot

Definition at line 1583 of file MeshObjectSelectionPlugin.cc.

◆ name

QString MeshObjectSelectionPlugin::name ( void  )
inlineprivateslot

Definition at line 194 of file MeshObjectSelectionPlugin.hh.

◆ noguiSupported

void MeshObjectSelectionPlugin::noguiSupported ( )
inlineprivateslot

Definition at line 160 of file MeshObjectSelectionPlugin.hh.

◆ paintSphereSelection()

template<class MeshT >
void MeshObjectSelectionPlugin::paintSphereSelection ( MeshT _mesh,
int  _objectId,
int  _target_idx,
typename MeshT::Point  _hitpoint,
double  _radius,
PrimitiveType  _primitiveType,
bool  _deselection 
)
private

Use the event to paint selection with a sphere.

paint selection with a sphere

Parameters
_mesha mesh
_objectIdobject id to work on
_target_idxhandle of the face that was hit by the mouse picking
_hitpointpoint where the mouse picking hit
_radiusRadius of the selection sphere
_primitiveTypeprimitive types to be selected
_deselectiontrue, if entities should be deselected

Definition at line 249 of file MeshObjectSelectionPluginT_impl.hh.

◆ pluginsInitialized

void MeshObjectSelectionPlugin::pluginsInitialized ( )
privateslot

Definition at line 159 of file MeshObjectSelectionPlugin.cc.

◆ saveFlipperModelingSelection

void MeshObjectSelectionPlugin::saveFlipperModelingSelection ( int  _objectId,
QString  _filename 
)
slot

Save a selection in Flipper Selection Format.

Definition at line 761 of file VertexSelection.cc.

◆ saveIniFile

void MeshObjectSelectionPlugin::saveIniFile ( INIFile _ini,
int  _id 
)
privateslot

Definition at line 1721 of file MeshObjectSelectionPlugin.cc.

◆ selectAllEdges

void MeshObjectSelectionPlugin::selectAllEdges ( int  objectId)
slot

Select all Edges.

Definition at line 132 of file EdgeSelection.cc.

◆ selectAllFaces

void MeshObjectSelectionPlugin::selectAllFaces ( int  objectId)
slot

Select all faces.

Definition at line 131 of file FaceSelection.cc.

◆ selectAllHalfedges

void MeshObjectSelectionPlugin::selectAllHalfedges ( int  objectId)
slot

Select all Halfedges.

Definition at line 131 of file HalfedgeSelection.cc.

◆ selectAllVertices

void MeshObjectSelectionPlugin::selectAllVertices ( int  _objectId)
slot

Select all Vertices.

Definition at line 133 of file VertexSelection.cc.

◆ selectBoundaryEdges

void MeshObjectSelectionPlugin::selectBoundaryEdges ( int  objectId)
slot

select boundary edges

Definition at line 201 of file EdgeSelection.cc.

◆ selectBoundaryFaces

void MeshObjectSelectionPlugin::selectBoundaryFaces ( int  objectId)
slot

Select all boundary faces of the given object.

Definition at line 229 of file FaceSelection.cc.

◆ selectBoundaryHalfedges

void MeshObjectSelectionPlugin::selectBoundaryHalfedges ( int  objectId)
slot

Select boundary edges.

Definition at line 200 of file HalfedgeSelection.cc.

◆ selectBoundaryVertices

void MeshObjectSelectionPlugin::selectBoundaryVertices ( int  _objectId)
slot

Select all boundary vertices of the given object.

Definition at line 202 of file VertexSelection.cc.

◆ selectClosestBoundaryVertices

void MeshObjectSelectionPlugin::selectClosestBoundaryVertices ( int  _objectId,
int  _vertexId 
)
slot

Select all vertices of the boundary close to the given vertex.

Definition at line 225 of file VertexSelection.cc.

◆ selectEdge

bool MeshObjectSelectionPlugin::selectEdge ( int  _objectId,
int  _idx,
bool  _fly_to_edge 
)
slot

Select edge with id _idx and maybe fly to it.

Definition at line 92 of file EdgeSelection.cc.

◆ selectEdges

void MeshObjectSelectionPlugin::selectEdges ( int  objectId,
IdList  _edgeList,
const double  _dihedral_angle_threshold = 0.0 
)
slot

Select given Edges.

Definition at line 58 of file EdgeSelection.cc.

◆ selectElement()

template<typename HandleT >
bool MeshObjectSelectionPlugin::selectElement ( int  _objectId,
HandleT  _handle,
bool  _fly_to_element 
)

set dihedral angle threshold for edge selection

Definition at line 950 of file MeshObjectSelectionPluginT_impl.hh.

◆ selectFace

bool MeshObjectSelectionPlugin::selectFace ( int  _objectId,
int  _idx,
bool  _fly_to_face 
)
slot

Select face with id _idx and maybe fly to it.

Definition at line 91 of file FaceSelection.cc.

◆ selectFaces

void MeshObjectSelectionPlugin::selectFaces ( int  objectId,
IdList  _facesList 
)
slot

Select given faces.

Definition at line 58 of file FaceSelection.cc.

◆ selectHalfedge

bool MeshObjectSelectionPlugin::selectHalfedge ( int  _objectId,
int  _idx,
bool  _fly_to_halfedge 
)
slot

Select halfedge with id _idx and maybe fly to it.

Definition at line 91 of file HalfedgeSelection.cc.

◆ selectHalfedges

void MeshObjectSelectionPlugin::selectHalfedges ( int  objectId,
IdList  _vertexList 
)
slot

Select given Halfedges.

Definition at line 58 of file HalfedgeSelection.cc.

◆ selectHandleVertices

void MeshObjectSelectionPlugin::selectHandleVertices ( int  objectId,
IdList  _vertexList 
)
slot

Set vertices to be part of the handle area.

Definition at line 375 of file VertexSelection.cc.

◆ selectModelingVertices

void MeshObjectSelectionPlugin::selectModelingVertices ( int  objectId,
IdList  _vertexList 
)
slot

Set vertices to be part of the modeling area.

Definition at line 516 of file VertexSelection.cc.

◆ selectVertex

bool MeshObjectSelectionPlugin::selectVertex ( int  _objectId,
int  _idx,
bool  _fly_to_vertex 
)
slot

select vertex with id _idx and maybe fly to it

Definition at line 91 of file VertexSelection.cc.

◆ selectVertices

void MeshObjectSelectionPlugin::selectVertices ( int  objectId,
IdList  _vertexList 
)
slot

select given vertices

Definition at line 58 of file VertexSelection.cc.

◆ selectVerticesByValue [1/2]

void MeshObjectSelectionPlugin::selectVerticesByValue ( int  _objectId,
QString  _component,
bool  _greater,
double  _value 
)
slot

Select vertices by their value.

Todo:
emit scriptinfo

Definition at line 584 of file VertexSelection.cc.

◆ selectVerticesByValue() [2/2]

template<class MeshT >
void MeshObjectSelectionPlugin::selectVerticesByValue ( MeshT _mesh,
QString  _component,
bool  _greater,
double  _value 
)
private

Select vertices by value.

Definition at line 917 of file MeshObjectSelectionPluginT_impl.hh.

◆ set_dihedral_angle_threshold()

void MeshObjectSelectionPlugin::set_dihedral_angle_threshold ( const double  _a)

set dihedral angle threshold for edge selection

Definition at line 2367 of file MeshObjectSelectionPlugin.cc.

◆ set_max_angle()

void MeshObjectSelectionPlugin::set_max_angle ( const double  _a)

set max angle for flood fill selection

Definition at line 2377 of file MeshObjectSelectionPlugin.cc.

◆ setAllHandleVertices

void MeshObjectSelectionPlugin::setAllHandleVertices ( int  objectId)
slot

Set all vertices to be part of the handle area.

Definition at line 467 of file VertexSelection.cc.

◆ setAllModelingVertices

void MeshObjectSelectionPlugin::setAllModelingVertices ( int  objectId)
slot

Set all vertices to be part of the modeling area.

Definition at line 632 of file VertexSelection.cc.

◆ setColorForSelection()

void MeshObjectSelectionPlugin::setColorForSelection ( const int  _objectId,
const PrimitiveType  _primitiveType 
)
private

Set color for selection.

Definition at line 836 of file MeshObjectSelectionPlugin.cc.

◆ setDefaultColorValues

void MeshObjectSelectionPlugin::setDefaultColorValues ( )
privateslot

sets the default color values for selection/handle/region/feature nodes for all objects of this type

Definition at line 2274 of file MeshObjectSelectionPlugin.cc.

◆ shrinkFaceSelection

void MeshObjectSelectionPlugin::shrinkFaceSelection ( int  objectId)
slot

Shrink the current face selection.

Definition at line 253 of file FaceSelection.cc.

◆ shrinkVertexSelection

void MeshObjectSelectionPlugin::shrinkVertexSelection ( int  _objectId)
slot

Shrink the current vertex selection.

Definition at line 248 of file VertexSelection.cc.

◆ slotClosestBoundarySelection()

void MeshObjectSelectionPlugin::slotClosestBoundarySelection ( QMouseEvent *  _event,
SelectionInterface::PrimitiveType  _currentType,
bool  _deselect 
)
privatevirtual

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.

Parameters
_eventThe mouse event that currently is performed
_currentTypeThe currently active primitive type
_deselectTrue if entities should be deselected

Reimplemented from SelectionInterface.

Definition at line 1379 of file MeshObjectSelectionPlugin.cc.

◆ slotComponentsSelection()

void MeshObjectSelectionPlugin::slotComponentsSelection ( QMouseEvent *  _event,
SelectionInterface::PrimitiveType  _currentType,
bool  _deselect 
)
privatevirtual

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.

Parameters
_eventThe mouse event that currently is performed
_currentTypeThe currently active primitive type
_deselectTrue if entities should be deselected

Reimplemented from SelectionInterface.

Definition at line 1481 of file MeshObjectSelectionPlugin.cc.

◆ slotFloodFillSelection()

void MeshObjectSelectionPlugin::slotFloodFillSelection ( QMouseEvent *  _event,
SelectionInterface::PrimitiveType  _currentType,
bool  _deselect 
)
privatevirtual

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.

Parameters
_eventThe mouse event that currently is performed
_currentTypeThe currently active primitive type
_deselectTrue if entities should be deselected

Reimplemented from SelectionInterface.

Definition at line 1419 of file MeshObjectSelectionPlugin.cc.

◆ slotIndexSelection()

void MeshObjectSelectionPlugin::slotIndexSelection ( int  _key)
private

Definition at line 1521 of file MeshObjectSelectionPlugin.cc.

◆ slotKeyShortcutEvent()

void MeshObjectSelectionPlugin::slotKeyShortcutEvent ( int  _key,
Qt::KeyboardModifiers  _modifiers 
)
privatevirtual

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.

Parameters
_keyThe pressed key
_modifiersIndicates whether mod-keys have been pressed synchronously

Reimplemented from SelectionInterface.

Definition at line 1817 of file MeshObjectSelectionPlugin.cc.

◆ slotLassoSelection()

void MeshObjectSelectionPlugin::slotLassoSelection ( QMouseEvent *  _event,
SelectionInterface::PrimitiveType  _currentType,
bool  _deselect 
)
privatevirtual

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.

Parameters
_eventThe mouse event that currently is performed
_currentTypeThe currently active primitive type
_deselectTrue if entities should be deselected

Reimplemented from SelectionInterface.

Definition at line 1294 of file MeshObjectSelectionPlugin.cc.

◆ slotLoadSelection()

void MeshObjectSelectionPlugin::slotLoadSelection ( const INIFile _file)
privatevirtual

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.

Parameters
_fileThe file from which one can read the selection data

Reimplemented from SelectionInterface.

Definition at line 1746 of file MeshObjectSelectionPlugin.cc.

◆ slotMouseWheelEvent()

void MeshObjectSelectionPlugin::slotMouseWheelEvent ( QWheelEvent *  _event,
std::string const &  _mode 
)
privatevirtual

Wheel Event from main application.

This slot is called if a wheel event occurred in the Viewer and is extended by the current Mode set in the Viewer. You can add additional Picking Modes to the Viewer by using the picking interface. This slot will only get called in pickingMode.

Parameters
_eventMouse event
_modeName of the current Picking Mode.

Reimplemented from MouseInterface.

Definition at line 1919 of file MeshObjectSelectionPlugin.cc.

◆ slotSaveSelection()

void MeshObjectSelectionPlugin::slotSaveSelection ( INIFile _file)
privatevirtual

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

Parameters
_fileThe file into which one can store selection data

Reimplemented from SelectionInterface.

Definition at line 1791 of file MeshObjectSelectionPlugin.cc.

◆ slotSelectionOperation()

void MeshObjectSelectionPlugin::slotSelectionOperation ( QString  _operation)
privatevirtual

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.

Parameters
_operationThe identifier of the operation just as registered via addSelectionOperations

Reimplemented from SelectionInterface.

Definition at line 453 of file MeshObjectSelectionPlugin.cc.

◆ slotSphereSelection()

void MeshObjectSelectionPlugin::slotSphereSelection ( QMouseEvent *  _event,
double  _radius,
SelectionInterface::PrimitiveType  _currentType,
bool  _deselect 
)
privatevirtual

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.

Parameters
_eventThe mouse event that currently is performed
_radiusThe current radius of the selection sphere
_currentTypeThe currently active primitive type
_deselectTrue if entities should be deselected

Reimplemented from SelectionInterface.

Definition at line 1352 of file MeshObjectSelectionPlugin.cc.

◆ slotToggleSelection()

void MeshObjectSelectionPlugin::slotToggleSelection ( QMouseEvent *  _event,
SelectionInterface::PrimitiveType  _currentType,
bool  _deselect 
)
privatevirtual

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.

Parameters
_eventThe mouse event that occurred
_currentTypeThe currently active primitive type
_deselectTrue if entities should be deselected

Reimplemented from SelectionInterface.

Definition at line 1239 of file MeshObjectSelectionPlugin.cc.

◆ slotVolumeLassoSelection()

void MeshObjectSelectionPlugin::slotVolumeLassoSelection ( QMouseEvent *  _event,
SelectionInterface::PrimitiveType  _currentType,
bool  _deselect 
)
privatevirtual

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.

Parameters
_eventThe mouse event that currently is performed
_currentTypeThe currently active primitive type
_deselectTrue if entities should be deselected

Reimplemented from SelectionInterface.

Definition at line 1321 of file MeshObjectSelectionPlugin.cc.

◆ toggleMeshSelection()

template<class MeshT >
void MeshObjectSelectionPlugin::toggleMeshSelection ( int  _objectId,
MeshT _mesh,
uint  _fh,
ACG::Vec3d _hit_point,
PrimitiveType  _primitiveType 
)
private

Toggle mesh selection.

Toggle the selection state of mesh primitives.

Parameters
_objectIdid of the object that encapsulates the mesh
_mesha mesh
_fhhandle of the face that was picked
_hit_pointpoint that was picked
_primitiveTypeprimitive types to be selected

Definition at line 143 of file MeshObjectSelectionPluginT_impl.hh.

◆ traceEdgePath

void MeshObjectSelectionPlugin::traceEdgePath ( int  objectId,
double  threshold 
)
slot

Trace Edge Path.

Definition at line 456 of file EdgeSelection.cc.

◆ unselectEdges

void MeshObjectSelectionPlugin::unselectEdges ( int  objectId,
IdList  _edgeList 
)
slot

Unselect given Edges.

Definition at line 99 of file EdgeSelection.cc.

◆ unselectFaces

void MeshObjectSelectionPlugin::unselectFaces ( int  objectId,
IdList  _facesList 
)
slot

Unselect given faces.

Definition at line 98 of file FaceSelection.cc.

◆ unselectHalfedges

void MeshObjectSelectionPlugin::unselectHalfedges ( int  objectId,
IdList  _vertexList 
)
slot

Unselect given Halfedges.

Definition at line 98 of file HalfedgeSelection.cc.

◆ unselectHandleVertices

void MeshObjectSelectionPlugin::unselectHandleVertices ( int  objectId,
IdList  _vertexList 
)
slot

Remove vertices from handle area.

Definition at line 411 of file VertexSelection.cc.

◆ unselectModelingVertices

void MeshObjectSelectionPlugin::unselectModelingVertices ( int  objectId,
IdList  _vertexList 
)
slot

Remove vertices from modeling area.

Definition at line 551 of file VertexSelection.cc.

◆ unselectVertices

void MeshObjectSelectionPlugin::unselectVertices ( int  objectId,
IdList  _vertexList 
)
slot

unselect given vertices

Definition at line 98 of file VertexSelection.cc.

◆ update_dihedral_angle_threshold_from_ui()

void MeshObjectSelectionPlugin::update_dihedral_angle_threshold_from_ui ( )
private

set dihedral angle threshold for edge selection

Definition at line 2387 of file MeshObjectSelectionPlugin.cc.

◆ update_regions()

template<typename MeshType >
void MeshObjectSelectionPlugin::update_regions ( MeshType *  _mesh)

Update face selection to correspond to the vertex selection.

Parameters
_mesha mesh

Definition at line 104 of file MeshObjectSelectionPluginT_impl.hh.

◆ updateColorValues()

void MeshObjectSelectionPlugin::updateColorValues ( )
private

Set descriptions for local public slots.

Definition at line 2241 of file MeshObjectSelectionPlugin.cc.

◆ updateSlotDescriptions()

void MeshObjectSelectionPlugin::updateSlotDescriptions ( )
private

Set descriptions for local public slots.

Definition at line 318 of file MeshObjectSelectionPlugin.cc.

◆ version

QString MeshObjectSelectionPlugin::version ( )
inlineslot

Definition at line 235 of file MeshObjectSelectionPlugin.hh.

◆ vertexTypeActive()

bool MeshObjectSelectionPlugin::vertexTypeActive ( )
inline

Definition at line 240 of file MeshObjectSelectionPlugin.hh.

◆ volumeSelection()

template<class MeshT >
bool MeshObjectSelectionPlugin::volumeSelection ( MeshT _mesh,
int  _objectId,
ACG::GLState _state,
QRegion *  _region,
PrimitiveType  _primitiveType,
bool  _deselection 
)
private

Surface volume selection tool.

Select all primitves that are projected to the given region.

Parameters
_mesha mesh
_objectIdobject id to work on
_statecurrent gl state
_regionregion
_primitiveTypeprimitive types to be selected
_deselectiontrue, if entities should be deselected
Returns
true, if something was selected

Definition at line 384 of file MeshObjectSelectionPluginT_impl.hh.

Friends And Related Function Documentation

◆ SelectVolumeAction

friend class SelectVolumeAction
friend

Definition at line 99 of file MeshObjectSelectionPlugin.hh.

Member Data Documentation

◆ allSupportedTypes_

SelectionInterface::PrimitiveType MeshObjectSelectionPlugin::allSupportedTypes_
private

Handle to selection environment.

Definition at line 603 of file MeshObjectSelectionPlugin.hh.

◆ areaColor_

ACG::Vec4f MeshObjectSelectionPlugin::areaColor_
private

Handle to selection environment.

Definition at line 622 of file MeshObjectSelectionPlugin.hh.

◆ colorButtonArea_

QtColorChooserButton* MeshObjectSelectionPlugin::colorButtonArea_
private

Handle to selection environment.

Definition at line 617 of file MeshObjectSelectionPlugin.hh.

◆ colorButtonFeature_

QtColorChooserButton* MeshObjectSelectionPlugin::colorButtonFeature_
private

Handle to selection environment.

Definition at line 619 of file MeshObjectSelectionPlugin.hh.

◆ colorButtonHandle_

QtColorChooserButton* MeshObjectSelectionPlugin::colorButtonHandle_
private

Handle to selection environment.

Definition at line 618 of file MeshObjectSelectionPlugin.hh.

◆ colorButtonSelection_

QtColorChooserButton* MeshObjectSelectionPlugin::colorButtonSelection_
private

Options.

Definition at line 616 of file MeshObjectSelectionPlugin.hh.

◆ conversionDialog_

ConversionDialog* MeshObjectSelectionPlugin::conversionDialog_
private

Handle to selection environment.

Definition at line 611 of file MeshObjectSelectionPlugin.hh.

◆ dihedral_angle_threshold_

double MeshObjectSelectionPlugin::dihedral_angle_threshold_
private

Handle to selection environment.

Definition at line 626 of file MeshObjectSelectionPlugin.hh.

◆ edgeType_

SelectionInterface::PrimitiveType MeshObjectSelectionPlugin::edgeType_
private

Handle to selection environment.

Definition at line 599 of file MeshObjectSelectionPlugin.hh.

◆ environmentHandle_

QString MeshObjectSelectionPlugin::environmentHandle_
private

Handle to selection environment.

Definition at line 595 of file MeshObjectSelectionPlugin.hh.

◆ faceType_

SelectionInterface::PrimitiveType MeshObjectSelectionPlugin::faceType_
private

Handle to selection environment.

Definition at line 601 of file MeshObjectSelectionPlugin.hh.

◆ featureColor_

ACG::Vec4f MeshObjectSelectionPlugin::featureColor_
private

Handle to selection environment.

Definition at line 624 of file MeshObjectSelectionPlugin.hh.

◆ halfedgeType_

SelectionInterface::PrimitiveType MeshObjectSelectionPlugin::halfedgeType_
private

Handle to selection environment.

Definition at line 600 of file MeshObjectSelectionPlugin.hh.

◆ handleColor_

ACG::Vec4f MeshObjectSelectionPlugin::handleColor_
private

Handle to selection environment.

Definition at line 623 of file MeshObjectSelectionPlugin.hh.

◆ lasso_2Dpoints_

QPolygon MeshObjectSelectionPlugin::lasso_2Dpoints_
private

Used for lasso selection tool.

Definition at line 606 of file MeshObjectSelectionPlugin.hh.

◆ max_angle_

double MeshObjectSelectionPlugin::max_angle_
private

Handle to selection environment.

Definition at line 627 of file MeshObjectSelectionPlugin.hh.

◆ parameterWidget_

ParameterWidget* MeshObjectSelectionPlugin::parameterWidget_
private

Handle to selection environment.

Definition at line 613 of file MeshObjectSelectionPlugin.hh.

◆ statusColor_

ACG::Vec4f MeshObjectSelectionPlugin::statusColor_
private

Handle to selection environment.

Definition at line 621 of file MeshObjectSelectionPlugin.hh.

◆ vertexType_

SelectionInterface::PrimitiveType MeshObjectSelectionPlugin::vertexType_
private

Primitive type handles:

Definition at line 598 of file MeshObjectSelectionPlugin.hh.

◆ volumeLassoPoints_

QVector<QPoint> MeshObjectSelectionPlugin::volumeLassoPoints_
private

Used for volume lasso tool.

Definition at line 609 of file MeshObjectSelectionPlugin.hh.


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