Developer Documentation
DecimaterPlugin Class Reference

#include <Plugin-Decimater/DecimaterPlugin.hh>

Inheritance diagram for DecimaterPlugin:
ProcessInterface LoadSaveInterface RPCInterface BackupInterface ScriptInterface LoggingInterface ToolboxInterface BaseInterface

Classes

struct  DecimaterInit
 

Public Slots

QString version ()
 
Scripting Functions
void decimate (int _objID, QVariantMap _constraints)
 decimate an object More...
 

Signals

void updateView ()
 
void updatedObject (int _id, const UpdateType &_type)
 
void setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
 
void log (Logtype _type, QString _message)
 
void log (QString _message)
 
void pluginExists (QString _pluginName, bool &_exists)
 
void functionExists (QString _pluginName, QString _functionName, bool &_exists)
 
void addToolbox (QString _name, QWidget *_widget, QIcon *_icon)
 
void scriptInfo (QString _functionName)
 
void createBackup (int _id, QString _name, UpdateType _type=UPDATE_ALL)
 
void startJob (QString _jobId, QString _description, int _min, int _max, bool _blocking=false)
 
void cancelJob (QString _jobId)
 
void finishJob (QString _jobId)
 
void setJobState (QString, int)
 
void setJobName (QString _jobId, QString _name)
 
void setJobDescription (QString _jobId, QString _text)
 
void jobCanceled (QString _jobId)
 
- 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 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...
 
- Signals inherited from RPCInterface
virtual void pluginExists (QString _pluginName, bool &_exists)
 
- 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 ProcessInterface
virtual void startJob (QString _jobId, QString _description, int _min, int _max, bool _blocking=false)
 announce a new job More...
 

Public Member Functions

 DecimaterPlugin ()
 Default constructor.
 
 ~DecimaterPlugin ()
 Default destructor.
 
QString name ()
 Name of the Plugin.
 
QString description ()
 Description of the Plugin.
 

Private Types

typedef DecimateThread::BaseDecimaterType BaseDecimaterType
 
typedef DecimateThread::DecimaterType DecimaterType
 
typedef DecimateThread::McDecimaterType McDecimaterType
 
typedef DecimateThread::MixedDecimaterType MixedDecimaterType
 
typedef OpenMesh::Decimater::ModAspectRatioT< TriMesh >::Handle ModAspectRatioH
 
typedef OpenMesh::Decimater::ModEdgeLengthT< TriMesh >::Handle ModEdgeLengthH
 
typedef OpenMesh::Decimater::ModHausdorffT< TriMesh >::Handle ModHausdorffH
 
typedef OpenMesh::Decimater::ModIndependentSetsT< TriMesh >::Handle ModIndependentH
 
typedef OpenMesh::Decimater::ModNormalDeviationT< TriMesh >::Handle ModNormalDeviationH
 
typedef OpenMesh::Decimater::ModNormalFlippingT< TriMesh >::Handle ModNormalFlippingH
 
typedef OpenMesh::Decimater::ModQuadricT< TriMesh >::Handle ModQuadricH
 
typedef OpenMesh::Decimater::ModRoundnessT< TriMesh >::Handle ModRoundnessH
 

Private Slots

void initializePlugin ()
 
void pluginsInitialized ()
 Initialization of the plugin when it is loaded by the core. More...
 
void slotObjectUpdated (int _identifier, const UpdateType &_type)
 
void slotObjectSelectionChanged (int _identifier)
 
void objectDeleted (int _id)
 
void slotAboutToRestore (int _id)
 
void noguiSupported ()
 
void slot_decimate ()
 decimating called from button in toolbox More...
 
void slot_decimate_finished (QString _jobId)
 
void slot_initialize ()
 init called from button in toolbox More...
 
void slot_initialize_object (int obj_id, bool clear=false)
 
void slotUpdateRoundness (int _value)
 roundness slider - spinbox sync More...
 
void slotUpdateRoundness (double _value)
 sync between values of roundness slider and spinbox in the toolbox More...
 
void slotUpdateAspectRatio (int _value)
 sync between values of aspect ratio slider and spinbox in the toolbox More...
 
void slotUpdateAspectRatio (double _value)
 sync between values of aspect ratio slider and spinbox in the toolbox More...
 
void slotUpdateDistance ()
 slider / spinbox updates
 
void slotUpdateNormalDev ()
 
void slotUpdateVertices ()
 
void slotUpdateTriangles ()
 
void slotUpdateEdgeLength ()
 
void slotUpdateNumVertices ()
 update number of vertices information
 
void slotUpdateNumTriangles ()
 gets and sets the current maximum number of triangles More...
 
void slotMixedCounterValueChanged (double)
 
void slotMixedSliderValueChanged (int)
 
void slotDisableDecimation ()
 
- Private Slots inherited from BaseInterface
virtual void exit ()
 
virtual QString version ()
 Return a version string for your plugin. More...
 

Private Member Functions

void canceledJob (QString _job)
 A job has been canceled. More...
 
void initialize_object (BaseObjectData *obj)
 
- 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 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 Member Functions inherited from RPCInterface
virtual ~RPCInterface ()
 Destructor.
 
virtual void functionExists (QString _pluginName, QString _functionName, bool &_exists)
 
- 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 ProcessInterface
virtual ~ProcessInterface ()
 Destructor.
 
virtual void setJobState (QString _jobId, int _value)
 update job state More...
 
virtual void setJobName (QString _jobId, QString _name)
 update job's name More...
 
virtual void setJobDescription (QString _jobId, QString _text)
 update job's description text More...
 
virtual void cancelJob (QString _jobId)
 Cancel your job. More...
 
virtual void finishJob (QString _jobId)
 Finish your job. More...
 

Private Attributes

DecimaterToolbarWidgettool_
 Widget for Toolbox.
 
std::vector< ptr::shared_ptr< DecimaterInit > > decimater_objects_
 
QIcon * toolIcon_
 
int runningJobs_
 

Detailed Description

Plugin for Decimater Support

Definition at line 100 of file DecimaterPlugin.hh.

Member Function Documentation

void DecimaterPlugin::canceledJob ( QString  _job)
privatevirtual

A job has been canceled.

This function is called when the user cancels a job. The returned name is the name of the job which has been canceled

Parameters
_jobString which is used as the id of the thread

Reimplemented from ProcessInterface.

Definition at line 496 of file DecimaterPlugin.cc.

void DecimaterPlugin::decimate ( int  _objID,
QVariantMap  _constraints 
)
slot

decimate an object

Parameters
_objIDId of the object that should be decimated
_constraintsList of constraints for the decimater

Definition at line 531 of file DecimaterPlugin.cc.

void DecimaterPlugin::pluginsInitialized ( )
privateslot

Initialization of the plugin when it is loaded by the core.

Definition at line 165 of file DecimaterPlugin.cc.

void DecimaterPlugin::slot_decimate ( )
privateslot

decimating called from button in toolbox

Decimation called by toolbox.

Definition at line 429 of file DecimaterPlugin.cc.

void DecimaterPlugin::slot_initialize ( )
privateslot

init called from button in toolbox

Init called by toolbox.

Definition at line 254 of file DecimaterPlugin.cc.

void DecimaterPlugin::slotUpdateAspectRatio ( int  _value)
privateslot

sync between values of aspect ratio slider and spinbox in the toolbox

Parameters
_valuenew aspect ratio value

Definition at line 230 of file DecimaterPlugin.cc.

void DecimaterPlugin::slotUpdateAspectRatio ( double  _value)
privateslot

sync between values of aspect ratio slider and spinbox in the toolbox

Parameters
_valuenew aspect ratio value

Definition at line 243 of file DecimaterPlugin.cc.

void DecimaterPlugin::slotUpdateNumTriangles ( )
privateslot

gets and sets the current maximum number of triangles

Definition at line 917 of file DecimaterPlugin.cc.

void DecimaterPlugin::slotUpdateRoundness ( int  _value)
privateslot

roundness slider - spinbox sync

sync between values of roundness slider and spinbox in the toolbox

Parameters
_valuenew roundness value

Definition at line 194 of file DecimaterPlugin.cc.

void DecimaterPlugin::slotUpdateRoundness ( double  _value)
privateslot

sync between values of roundness slider and spinbox in the toolbox

Parameters
_valuenew roundness value

Definition at line 217 of file DecimaterPlugin.cc.


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