Developer Documentation
Loading...
Searching...
No Matches
DecimaterPlugin Class Reference

#include <Plugin-Decimater/DecimaterPlugin.hh>

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

Classes

struct  DecimaterInit
 

Public Slots

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

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.
 
virtual void setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
 Set a description for a public slot.
 
virtual void setRenderer (unsigned int _viewer, QString _rendererName)
 Set a renderer for the given viewer.
 
- Signals inherited from ToolboxInterface
virtual void addToolbox (QString _name, QWidget *_widget)
 Add a toolbox widget to the gui with the given name.
 
- 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.
 
virtual void getScriptingEngine (QScriptEngine *&_engine)
 
virtual void executeFileScript (QString _filename)
 
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.
 
virtual void aboutToRestore (int _objectid)
 Backup Plugin tells other Plugins that a restore will happen.
 
virtual void generateBackup (int _id, QString _name, UpdateType _type)
 This signal is emitted by a BackupPlugin and tells a TypePlugin to generate a backup.
 
- 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.
 
virtual void load (QString _filename, DataType _type, int &_id)
 Load object from file with a specific DataType.
 
- Signals inherited from ProcessInterface
virtual void startJob (QString _jobId, QString _description, int _min, int _max, bool _blocking=false)
 announce a new job
 
- Signals inherited from PythonInterface
virtual void executePythonScript (QString _script)
 

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.
 
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
 
void slot_decimate_finished (const QString &_jobId)
 
void slot_initialize ()
 init called from button in toolbox
 
void slot_initialize_object (int obj_id, bool clear=false)
 
void slotUpdateRoundness (int _value)
 roundness slider - spinbox sync
 
void slotUpdateRoundness (double _value)
 sync between values of roundness slider and spinbox in the toolbox
 
void slotUpdateAspectRatio (int _value)
 sync between values of aspect ratio slider and spinbox in the toolbox
 
void slotUpdateAspectRatio (double _value)
 sync between values of aspect ratio slider and spinbox in the toolbox
 
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
 
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.
 

Private Member Functions

void canceledJob (const QString &_job)
 
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.
 
virtual void updatedObject (int _objectId)
 An object has been changed or added by this plugin.
 
virtual void updatedObject (int _identifier, const UpdateType &_type)
 An object has been changed or added by this plugin.
 
virtual void nodeVisibilityChanged (int _identifier)
 A scenegraph node has been shown or hidden.
 
virtual void getCurrentRenderer (unsigned int _viewer, QString &_rendererName)
 Get the current renderer for the given viewer.
 
- 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.
 
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.
 
- Private Member Functions inherited from LoggingInterface
virtual ~LoggingInterface ()
 Destructor.
 
- Private Member Functions inherited from ScriptInterface
virtual ~ScriptInterface ()
 Destructor.
 
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 BackupInterface
virtual void createBackup (IdList _objectids, QString _name, std::vector< UpdateType > _types)
 Tell Backup Plugin to create a group backup.
 
virtual void undo (int _objectid)
 Tell Backup Plugin to undo the last action of an object.
 
virtual void redo (int _objectid)
 Tell Backup Plugin to redo the last action on an object.
 
virtual void undo ()
 Tell Backup Plugin to undo the last action.
 
virtual void redo ()
 Tell Backup Plugin to redo the last action.
 
virtual ~BackupInterface ()
 Destructor.
 
virtual void restored (int _objectid)
 Backup Plugin tells other Plugins that a restore has happened.
 
- 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.
 
virtual void deleteObject (int _id)
 Delete an object
This signal can be called from any thread.
.
 
virtual void deleteAllObjects ()
 Delete all Objects.
 
virtual void getAllFileFilters (QStringList &_filters)
 Get all file filters that are registered.
 
- Private Member Functions inherited from ProcessInterface
virtual ~ProcessInterface ()
 Destructor.
 
virtual void setJobState (QString _jobId, int _value)
 update job state
 
virtual void setJobName (QString _jobId, QString _name)
 update job's name
 
virtual void setJobDescription (QString _jobId, QString _text)
 update job's description text
 
virtual void cancelJob (QString _jobId)
 Cancel your job.
 
virtual void finishJob (QString _jobId)
 Finish your job.
 
- Private Member Functions inherited from PythonInterface
virtual void openPythonScriptInEditor (QString _script)
 
virtual ~PythonInterface ()
 Destructor.
 

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 92 of file DecimaterPlugin.hh.

Member Typedef Documentation

◆ BaseDecimaterType

typedef DecimateThread::BaseDecimaterType DecimaterPlugin::BaseDecimaterType
private

Definition at line 177 of file DecimaterPlugin.hh.

◆ DecimaterType

typedef DecimateThread::DecimaterType DecimaterPlugin::DecimaterType
private

Definition at line 178 of file DecimaterPlugin.hh.

◆ McDecimaterType

typedef DecimateThread::McDecimaterType DecimaterPlugin::McDecimaterType
private

Definition at line 179 of file DecimaterPlugin.hh.

◆ MixedDecimaterType

typedef DecimateThread::MixedDecimaterType DecimaterPlugin::MixedDecimaterType
private

Definition at line 180 of file DecimaterPlugin.hh.

◆ ModAspectRatioH

typedef OpenMesh::Decimater::ModAspectRatioT<TriMesh>::Handle DecimaterPlugin::ModAspectRatioH
private

Definition at line 182 of file DecimaterPlugin.hh.

◆ ModEdgeLengthH

typedef OpenMesh::Decimater::ModEdgeLengthT<TriMesh>::Handle DecimaterPlugin::ModEdgeLengthH
private

Definition at line 183 of file DecimaterPlugin.hh.

◆ ModHausdorffH

typedef OpenMesh::Decimater::ModHausdorffT<TriMesh>::Handle DecimaterPlugin::ModHausdorffH
private

Definition at line 184 of file DecimaterPlugin.hh.

◆ ModIndependentH

typedef OpenMesh::Decimater::ModIndependentSetsT<TriMesh>::Handle DecimaterPlugin::ModIndependentH
private

Definition at line 185 of file DecimaterPlugin.hh.

◆ ModNormalDeviationH

typedef OpenMesh::Decimater::ModNormalDeviationT<TriMesh>::Handle DecimaterPlugin::ModNormalDeviationH
private

Definition at line 186 of file DecimaterPlugin.hh.

◆ ModNormalFlippingH

typedef OpenMesh::Decimater::ModNormalFlippingT<TriMesh>::Handle DecimaterPlugin::ModNormalFlippingH
private

Definition at line 187 of file DecimaterPlugin.hh.

◆ ModQuadricH

typedef OpenMesh::Decimater::ModQuadricT<TriMesh>::Handle DecimaterPlugin::ModQuadricH
private

Definition at line 188 of file DecimaterPlugin.hh.

◆ ModRoundnessH

typedef OpenMesh::Decimater::ModRoundnessT<TriMesh>::Handle DecimaterPlugin::ModRoundnessH
private

Definition at line 189 of file DecimaterPlugin.hh.

Constructor & Destructor Documentation

◆ DecimaterPlugin()

DecimaterPlugin::DecimaterPlugin ( )

Default constructor.

Definition at line 60 of file DecimaterPlugin.cc.

◆ ~DecimaterPlugin()

DecimaterPlugin::~DecimaterPlugin ( )

Default destructor.

Definition at line 69 of file DecimaterPlugin.cc.

Member Function Documentation

◆ canceledJob()

void DecimaterPlugin::canceledJob ( const QString &  _job)
private

Definition at line 486 of file DecimaterPlugin.cc.

◆ decimate [1/2]

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

decimate an object

Parameters
_objIDId of the object that should be decimated
_constraintsList of constraints for the decimater as a string separated by ;

Definition at line 521 of file DecimaterPlugin.cc.

◆ decimate [2/2]

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 561 of file DecimaterPlugin.cc.

◆ description()

QString DecimaterPlugin::description ( )
inlinevirtual

Description of the Plugin.

Implements BaseInterface.

Definition at line 173 of file DecimaterPlugin.hh.

◆ initialize_object()

void DecimaterPlugin::initialize_object ( BaseObjectData obj)
private

Definition at line 260 of file DecimaterPlugin.cc.

◆ initializePlugin

void DecimaterPlugin::initializePlugin ( )
privateslot

Definition at line 73 of file DecimaterPlugin.cc.

◆ name()

QString DecimaterPlugin::name ( )
inlinevirtual

Name of the Plugin.

Implements BaseInterface.

Definition at line 170 of file DecimaterPlugin.hh.

◆ noguiSupported

void DecimaterPlugin::noguiSupported ( )
inlineprivateslot

Definition at line 156 of file DecimaterPlugin.hh.

◆ objectDeleted

void DecimaterPlugin::objectDeleted ( int  _id)
privateslot

Definition at line 993 of file DecimaterPlugin.cc.

◆ pluginsInitialized

void DecimaterPlugin::pluginsInitialized ( )
privateslot

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

Definition at line 157 of file DecimaterPlugin.cc.

◆ slot_decimate

void DecimaterPlugin::slot_decimate ( )
privateslot

decimating called from button in toolbox

Decimation called by toolbox.

Definition at line 418 of file DecimaterPlugin.cc.

◆ slot_decimate_finished

void DecimaterPlugin::slot_decimate_finished ( const QString &  _jobId)
privateslot

Definition at line 491 of file DecimaterPlugin.cc.

◆ slot_initialize

void DecimaterPlugin::slot_initialize ( )
privateslot

init called from button in toolbox

Init called by toolbox.

Definition at line 246 of file DecimaterPlugin.cc.

◆ slot_initialize_object

void DecimaterPlugin::slot_initialize_object ( int  obj_id,
bool  clear = false 
)
privateslot

Definition at line 401 of file DecimaterPlugin.cc.

◆ slotAboutToRestore

void DecimaterPlugin::slotAboutToRestore ( int  _id)
privateslot

Definition at line 1000 of file DecimaterPlugin.cc.

◆ slotDisableDecimation

void DecimaterPlugin::slotDisableDecimation ( )
privateslot

Definition at line 1007 of file DecimaterPlugin.cc.

◆ slotMixedCounterValueChanged

void DecimaterPlugin::slotMixedCounterValueChanged ( double  _value)
privateslot

Definition at line 192 of file DecimaterPlugin.cc.

◆ slotMixedSliderValueChanged

void DecimaterPlugin::slotMixedSliderValueChanged ( int  _value)
privateslot

Definition at line 197 of file DecimaterPlugin.cc.

◆ slotObjectSelectionChanged

void DecimaterPlugin::slotObjectSelectionChanged ( int  _identifier)
privateslot

Definition at line 986 of file DecimaterPlugin.cc.

◆ slotObjectUpdated

void DecimaterPlugin::slotObjectUpdated ( int  _identifier,
const UpdateType _type 
)
privateslot

Definition at line 1018 of file DecimaterPlugin.cc.

◆ slotUpdateAspectRatio [1/2]

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 235 of file DecimaterPlugin.cc.

◆ slotUpdateAspectRatio [2/2]

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 222 of file DecimaterPlugin.cc.

◆ slotUpdateDistance

void DecimaterPlugin::slotUpdateDistance ( )
privateslot

slider / spinbox updates

Definition at line 1061 of file DecimaterPlugin.cc.

◆ slotUpdateEdgeLength

void DecimaterPlugin::slotUpdateEdgeLength ( )
privateslot

Definition at line 1053 of file DecimaterPlugin.cc.

◆ slotUpdateNormalDev

void DecimaterPlugin::slotUpdateNormalDev ( )
privateslot

Definition at line 1045 of file DecimaterPlugin.cc.

◆ slotUpdateNumTriangles

void DecimaterPlugin::slotUpdateNumTriangles ( )
privateslot

gets and sets the current maximum number of triangles

Definition at line 952 of file DecimaterPlugin.cc.

◆ slotUpdateNumVertices

void DecimaterPlugin::slotUpdateNumVertices ( )
privateslot

update number of vertices information

Definition at line 903 of file DecimaterPlugin.cc.

◆ slotUpdateRoundness [1/2]

void DecimaterPlugin::slotUpdateRoundness ( double  _value)
privateslot

sync between values of roundness slider and spinbox in the toolbox

Parameters
_valuenew roundness value

Definition at line 209 of file DecimaterPlugin.cc.

◆ slotUpdateRoundness [2/2]

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 186 of file DecimaterPlugin.cc.

◆ slotUpdateTriangles

void DecimaterPlugin::slotUpdateTriangles ( )
privateslot

Definition at line 1037 of file DecimaterPlugin.cc.

◆ slotUpdateVertices

void DecimaterPlugin::slotUpdateVertices ( )
privateslot

Definition at line 1029 of file DecimaterPlugin.cc.

◆ version

QString DecimaterPlugin::version ( )
inlineslot

Definition at line 275 of file DecimaterPlugin.hh.

Member Data Documentation

◆ decimater_objects_

std::vector< ptr::shared_ptr<DecimaterInit> > DecimaterPlugin::decimater_objects_
private

Definition at line 208 of file DecimaterPlugin.hh.

◆ runningJobs_

int DecimaterPlugin::runningJobs_
private

Definition at line 211 of file DecimaterPlugin.hh.

◆ tool_

DecimaterToolbarWidget* DecimaterPlugin::tool_
private

Widget for Toolbox.

Definition at line 192 of file DecimaterPlugin.hh.

◆ toolIcon_

QIcon* DecimaterPlugin::toolIcon_
private

Definition at line 209 of file DecimaterPlugin.hh.


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