Developer Documentation
SubdividerPlugin Class Reference
Inheritance diagram for SubdividerPlugin:
BaseInterface ToolboxInterface LoggingInterface LoadSaveInterface ScriptInterface BackupInterface

Public Slots

void subdivide (int _objectId, QString _algorithm, int _steps, bool _update_points=true)
 Scripting slot for subdivision. More...
 
void simpleSubdivide (int _objectId, QString _algorithm, int _steps, double _parameter, bool _update_points=true)
 Scripting slot for the simple subdivision algorithms. More...
 
QString version ()
 

Signals

void updateView ()
 
void updatedObject (int _id, const UpdateType &_type)
 
void addPickMode (const std::string &_mode)
 
void log (Logtype _type, QString _message)
 
void log (QString _message)
 
void addEmptyObject (DataType _type, int &_id)
 
void defineViewMode (QString _mode, QStringList _usedWidgets)
 
void addToolbox (QString _name, QWidget *_widget, QIcon *_icon)
 
void createBackup (int _id, QString _name, UpdateType _type=UPDATE_ALL)
 
void setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
 
- 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 ToolboxInterface
virtual void addToolbox (QString _name, QWidget *_widget)
 Add a toolbox widget to the gui with the given name. More...
 
- Signals inherited from LoggingInterface
virtual void log (Logtype _type, QString _message)=0
 
virtual void log (QString _message)=0
 
- 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 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)
 
- 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...
 

Public Member Functions

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 ()
 
void pluginsInitialized ()
 
void noguiSupported ()
 Make plugin available in no-GUI mode.
 
- Private Slots inherited from BaseInterface
virtual void exit ()
 
virtual QString version ()
 Return a version string for your plugin. More...
 

Private Member Functions

void slotSubdivideUniformButton ()
 
void slotSimpleSubdivideButton ()
 
bool test_trimesh_object (int _identifier, BaseObjectData *&_object)
 
- 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 ToolboxInterface
virtual ~ToolboxInterface ()
 Destructor.
 
virtual void addToolbox (QString _name, QWidget *_widget, QIcon *_icon)
 Add a toolbox widget to the gui with the given name and an icon. More...
 
virtual void addToolbox (QString _name, QWidget *_widget, QIcon *_icon, QWidget *_headerAreaWidget)
 Add a toolbox widget to the gui with the given name, icon and header area widget. More...
 
- Private Member Functions inherited from LoggingInterface
virtual ~LoggingInterface ()
 Destructor.
 
- 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 ScriptInterface
virtual ~ScriptInterface ()
 Destructor.
 
virtual void executeFileScript (QString _filename)
 
virtual void getDescription (QString _function, QString &_description, QStringList &_parameters, QStringList &_descriptions)
 
- 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 Attributes

subdividerToolbarWidgettool_
 Widget for Toolbox.
 
QIcon * toolIcon_
 

Detailed Description

Definition at line 70 of file SubdividerPlugin.hh.

Member Function Documentation

QString SubdividerPlugin::description ( )
inlinevirtual

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 163 of file SubdividerPlugin.hh.

QString SubdividerPlugin::name ( )
inlinevirtual

Return a name for the plugin.

This Function has to return the name of the plugin.

Implements BaseInterface.

Definition at line 162 of file SubdividerPlugin.hh.

void SubdividerPlugin::simpleSubdivide ( int  _objectId,
QString  _algorithm,
int  _steps,
double  _parameter,
bool  _update_points = true 
)
slot

Scripting slot for the simple subdivision algorithms.

Supported algorithm are:

Triangle meshes:

  • longest (Split all edges in descending order until all edges are shorter than given maximal edge length)
Parameters
_objectIdObject to work on
_algorithmString describing the algorithm to use
_stepsNumber of iterations
_parameterAdditional parameter depending on the algorithm (usually the maximal edge length in the final mesh)
_update_pointsUpdate original point locations

Definition at line 174 of file SubdividerPlugin.cc.

void SubdividerPlugin::subdivide ( int  _objectId,
QString  _algorithm,
int  _steps,
bool  _update_points = true 
)
slot

Scripting slot for subdivision.

Supported algorithm are:

Polymeshes:

  • catmullClark

Triangle Meshes:

  • loop
  • sqrt3
  • interpolating_sqrt3
  • modifiedButterfly
Parameters
_objectIdObject to work on
_algorithmString describing the algorithm to use
_stepsNumber of iterations
_update_pointsUpdate original point locations

Definition at line 207 of file SubdividerPlugin.cc.


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