Developer Documentation

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Slots | Signals | Public Member Functions | Private Slots | Private Member Functions | List of all members
ComponentsPlugin Class Reference
Inheritance diagram for ComponentsPlugin:

## Public Slots
QString | version ()
Scripting Functions
IdList | splitComponents (int _objectId)
| Splits the object into components. More...
void | biggestComponent (int _objId)
| Gets the biggest connected component of a mesh. More...

## Signals
void | updateView ()
void | updatedObject (int _identifier, const UpdateType &_type)
void | setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
void | addEmptyObject (DataType _type, int &_id)
void | copyObject (int _oldId, int &_newId)
void | addToolbar (QToolBar *_toolbar)
void | getToolBar (QString _name, QToolBar *&_toolbar)
void | addPickMode (const std::string &_mode)
void | scriptInfo (QString _functionName)
void | log (Logtype _type, QString _message)
void | log (QString _message)
void | createBackup (int _objectid, QString _name, UpdateType _type)
void | deleteObject (int _id)
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 PickingInterface
virtual void | addPickMode (const std::string &_mode)
| Add a new picking mode to the examiner. More...
Signals inherited from LoggingInterface
virtual void | log (Logtype _type, QString _message)=0
virtual void | log (QString _message)=0
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 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 ToolbarInterface
virtual void | addToolbar (QToolBar *_toolbar)
| Adds a Toolbar to the main widget. 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 | executeScript (QString _script)
virtual void | getAvailableFunctions (QStringList &_functions)

## Public Member Functions
| ComponentsPlugin ()
| Constructor. More...
void | exit ()
QString | name ()
| Return a name for the plugin. More...
QString | description ()
| Return a description of what the plugin is doing. More...

## Private Slots
void | initializePlugin ()
| Initialize the plugin. More...
void | noguiSupported ()

## Private Member Functions
void | pluginsInitialized ()
| Second initialization phase. More...
void | slotPickModeChanged (const std::string &_mode)
| the pickMode changed More...
void | slotMouseEvent (QMouseEvent *_event)
| a mouse event occured More...
void | setDescriptions ()
| set scripting slot descriptions More...
Template Functions
template<class MeshT >
void | splitComponent (MeshT *_mesh, MeshT *_copy)
| Split mesh into components. More...
template<class MeshT >
void | selectBiggestComponent (MeshT *_mesh)
| Select the biggest component of the mesh. More...
template<class MeshT >
void | deleteUnselectedFaces (MeshT *_mesh)
| Deletes all faces of a mesh that are not selected. More...
Private Member Functions inherited from BaseInterface
virtual void | noguiSupported ()
virtual | ~BaseInterface ()
| Destructor.
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 void | getCurrentRenderer (unsigned int _viewer, QString &_rendererName)
| Get the current renderer for the given viewer. More...
Private Member Functions inherited from MouseInterface
virtual | ~MouseInterface ()
| Destructor.
Private Member Functions inherited from PickingInterface
virtual void | addHiddenPickMode (const std::string &_mode)
| Add a new picking mode to the examiner which will be invisible. More...
virtual void | setPickModeCursor (const std::string &_mode, QCursor _cursor)
| Set the cursor of the given PickMode. More...
virtual void | setPickModeMouseTracking (const std::string &_mode, bool _mouseTracking)
| Set mouse tracking for the given PickMode. More...
virtual void | setPickModeToolbar (const std::string &_mode, QToolBar *_toolbar)
| Set the additional toolbar of the given PickMode. More...
virtual void | removePickModeToolbar (const std::string &_mode)
| Removes the additional toolbar of the given PickMode. More...
virtual | ~PickingInterface ()
| Destructor.
Private Member Functions inherited from LoggingInterface
virtual | ~LoggingInterface ()
| Destructor.
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.
virtual void | restored (int _objectid)
| Backup Plugin tells other Plugins that a restore has happened. More...
Private Member Functions inherited from LoadSaveInterface
virtual | ~LoadSaveInterface ()
| Destructor.
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 ToolbarInterface
virtual | ~ToolbarInterface ()
| Destructor.
virtual void | removeToolbar (QToolBar *_toolbar)
| Remove a Toolbar from the main widget. More...
virtual void | getToolBar (QString _name, QToolBar *&_toolbar)
| Get a pointer to a Toolbar of the given name or 0 if it does not exist. More...
Private Member Functions inherited from ScriptInterface
virtual | ~ScriptInterface ()
| Destructor.
virtual void | executeFileScript (QString _filename)
virtual void | getDescription (QString _function, QString &_description, QStringList &_parameters, QStringList &_descriptions)

## GUI Related
QAction * | splitAction_
| Split into Components Button was hit. More...
QAction * | biggestAction_
| Split into Components Button was hit. More...
void | slotSplitComponentsButton ()
| Split into Components Button was hit. More...
void | slotBiggestComponentButton ()
| Split into Components Button was hit. More...
void | splitComponents (QMouseEvent *_event)
| Split Components of picked object. More...
void | biggestComponent (QMouseEvent *_event)
| Split into Components Button was hit. More...

## Detailed Description

Definition at line 67 of file ComponentsPlugin.hh.

## Constructor & Destructor Documentation

ComponentsPlugin::ComponentsPlugin | ( |  | ) |

Constructor.

Definition at line 65 of file ComponentsPlugin.cc.

## Member Function Documentation

void ComponentsPlugin::biggestComponent | ( | QMouseEvent * | _event | ) |
| private slot

Split into Components Button was hit.

Definition at line 192 of file ComponentsPlugin.cc.

void ComponentsPlugin::biggestComponent | ( | int | _objId | ) |
| slot

Gets the biggest connected component of a mesh.

i.e. deletes all components except the one with the maximal number of faces

Parameters

  _objId | id of the target object

Definition at line 217 of file ComponentsScripting.cc.

template<class MeshT >

void ComponentsPlugin::deleteUnselectedFaces | ( | MeshT * | _mesh | ) |
| private

Deletes all faces of a mesh that are not selected.

Use selectBiggestcomponent first to select the biggest component. Than use this function to remove all other parts of the mesh.

Parameters

  _mesh | the mesh to work on

Definition at line 175 of file ComponentsPluginT.cc.

QString ComponentsPlugin::description | ( |  | ) |
| inline virtual

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 135 of file ComponentsPlugin.hh.

void ComponentsPlugin::exit | ( |  | ) |
| inline virtual

This function is called when the application exits or when your plugin is about to be unloaded. Here you can clean up your plugin, delete local variables...

Reimplemented from BaseInterface.

Definition at line 132 of file ComponentsPlugin.hh.

void ComponentsPlugin::initializePlugin | ( |  | ) |
| private slot

Initialize the plugin.

Definition at line 76 of file ComponentsPlugin.cc.

QString ComponentsPlugin::name | ( |  | ) |
| inline virtual

Return a name for the plugin.

This Function has to return the name of the plugin.

Implements BaseInterface.

Definition at line 134 of file ComponentsPlugin.hh.

void ComponentsPlugin::pluginsInitialized | ( |  | ) |
| private virtual

Second initialization phase.

Reimplemented from BaseInterface.

Definition at line 85 of file ComponentsPlugin.cc.

template<class MeshT >

void ComponentsPlugin::selectBiggestComponent | ( | MeshT * | _mesh | ) |
| private

Select the biggest component of the mesh.

This function will select the component of the mesh which has the most faces

Parameters

  _mesh | the mesh to work on

Definition at line 125 of file ComponentsPluginT.cc.

void ComponentsPlugin::setDescriptions | ( |  | ) |
| private

set scripting slot descriptions

Set Descriptions for all scripting slots.

Definition at line 59 of file ComponentsScripting.cc.

void ComponentsPlugin::slotBiggestComponentButton | ( |  | ) |
| private slot

Split into Components Button was hit.

Definition at line 186 of file ComponentsPlugin.cc.

void ComponentsPlugin::slotMouseEvent | ( | QMouseEvent * | _event | ) |
| private virtual

a mouse event occured

Parameters

  _event | the event that occured

Reimplemented from MouseInterface.

Definition at line 137 of file ComponentsPlugin.cc.

void ComponentsPlugin::slotPickModeChanged | ( | const std::string & | _mode | ) |
| private virtual

the pickMode changed

Parameters

  _mode | the new pickMode

Reimplemented from PickingInterface.

Definition at line 124 of file ComponentsPlugin.cc.

void ComponentsPlugin::slotSplitComponentsButton | ( |  | ) |
| private slot

Split into Components Button was hit.

Definition at line 152 of file ComponentsPlugin.cc.

template<class MeshT >

void ComponentsPlugin::splitComponent | ( | MeshT * | _mesh,
|  | MeshT * | _copy
| ) |  |
| private

Split mesh into components.

This function will split an arbitrary component out of a mesh. It takes a copy of the original mesh.

Parameters

  _mesh | the original mesh
  _copy | original mesh copy with identical topology and geometry the copy will contain one component of the original mesh.

Definition at line 63 of file ComponentsPluginT.cc.

void ComponentsPlugin::splitComponents | ( | QMouseEvent * | _event | ) |
| private slot

Split Components of picked object.

Split components (triggered by pickMode)

Parameters

  _event | the mouse event that occured

Definition at line 165 of file ComponentsPlugin.cc.

IdList ComponentsPlugin::splitComponents | ( | int | _objectId | ) |
| slot

Splits the object into components.

i.e. creates ( number of components) new meshes and deletes the old mesh

Parameters

  _objectId | id of the target object

Definition at line 71 of file ComponentsScripting.cc.

## Member Data Documentation

QAction* ComponentsPlugin::biggestAction_
| private

Split into Components Button was hit.

Definition at line 158 of file ComponentsPlugin.hh.

QAction* ComponentsPlugin::splitAction_
| private

Split into Components Button was hit.

Definition at line 157 of file ComponentsPlugin.hh.

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

- Plugin-Components/ComponentsPlugin.hh
- Plugin-Components/ComponentsPlugin.cc
- Plugin-Components/ComponentsPluginT.cc
- Plugin-Components/ComponentsScripting.cc