60 #include "DecimaterInfo.hh" 62 #include "DecimaterToolbarWidget.hh" 64 #include "DecimateThread.hh" 76 #include <OpenMesh/Tools/Decimater/ModIndependentSetsT.hh> 80 #include <ACG/Utils/SmartPointer.hh> 106 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-Decimater")
111 void updatedObject(
int _id,
const UpdateType& _type);
112 void setSlotDescription(QString _slotName, QString _slotDescription,
113 QStringList _parameters, QStringList _descriptions);
116 void log(
Logtype _type, QString _message);
117 void log(QString _message);
120 void pluginExists( QString _pluginName ,
bool& _exists ) ;
121 void functionExists( QString _pluginName , QString _functionName ,
bool& _exists );
124 void addToolbox( QString _name , QWidget* _widget, QIcon* _icon );
127 void scriptInfo( QString _functionName );
133 void startJob( QString _jobId, QString _description ,
int _min ,
int _max ,
bool _blocking =
false);
134 void cancelJob(QString _jobId );
135 void finishJob(QString _jobId );
136 void setJobState(QString,
int);
137 void setJobName(QString _jobId, QString _name );
138 void setJobDescription(QString _jobId, QString _text );
141 void jobCanceled(QString _jobId);
145 void initializePlugin();
148 void slotObjectUpdated(
int _identifier ,
const UpdateType& _type );
149 void slotObjectSelectionChanged(
int _identifier );
151 void objectDeleted(
int _id);
153 void slotAboutToRestore(
int _id);
156 void noguiSupported( ) {} ;
170 QString
name(){
return (QString(
"Decimater")); };
173 QString
description() {
return (QString(tr(
"Mesh Decimation ..."))); };
177 typedef DecimateThread::BaseDecimaterType BaseDecimaterType;
178 typedef DecimateThread::DecimaterType DecimaterType;
179 typedef DecimateThread::McDecimaterType McDecimaterType;
180 typedef DecimateThread::MixedDecimaterType MixedDecimaterType;
197 ptr::shared_ptr<BaseDecimaterType> decimater;
199 ModAspectRatioH hModAspectRatio;
200 ModEdgeLengthH hModEdgeLength;
201 ModHausdorffH hModHausdorff;
202 ModIndependentH hModIndependent;
203 ModNormalDeviationH hModNormalDeviation;
204 ModNormalFlippingH hModNormalFlipping;
205 ModQuadricH hModQuadric;
206 ModRoundnessH hModRoundness;
208 std::vector< ptr::shared_ptr<DecimaterInit> > decimater_objects_;
217 void slot_decimate_finished(QString _jobId);
221 void slot_initialize_object(
int obj_id,
bool clear =
false);
232 void slotUpdateNormalDev ();
233 void slotUpdateVertices ();
234 void slotUpdateTriangles ();
235 void slotUpdateEdgeLength ();
241 void slotMixedCounterValueChanged(
double);
242 void slotMixedSliderValueChanged(
int);
243 void slotDisableDecimation();
261 void decimate(
int _objID, QVariantMap _constraints);
272 void decimate(
int _objID, QString _constraints);
275 QString version() {
return QString(
"1.0"); };
Interface class for exporting functions to python.
const UpdateType UPDATE_ALL(UpdateTypeSet(1))
Identifier for all updates.
void canceledJob(QString _job)
A job has been canceled.
void slotUpdateRoundness(int _value)
roundness slider - spinbox sync
void pluginsInitialized()
Initialization of the plugin when it is loaded by the core.
Logtype
Log types for Message Window.
Use Normal deviation to control decimation.
void slot_decimate()
decimating called from button in toolbox
Interface for all Plugins which do logging to the logging window of the framework.
void slotUpdateNumVertices()
update number of vertices information
void slotUpdateAspectRatio(int _value)
sync between values of aspect ratio slider and spinbox in the toolbox
void decimate(int _objID, QVariantMap _constraints)
decimate an object
DecimaterToolbarWidget * tool_
Widget for Toolbox.
Interface to call functions across plugins.
void slotUpdateDistance()
slider / spinbox updates
Mesh decimation module computing collapse priority based on error quadrics.
void slot_initialize()
init called from button in toolbox
Use Roundness of triangles to control decimation.
QString description()
Description of the Plugin.
Use edge length to control decimation.
void slotUpdateNumTriangles()
gets and sets the current maximum number of triangles
Interface for all Plugins which provide scriptable Functions.
QString name()
Name of the Plugin.
DecimaterPlugin()
Default constructor.
Use Hausdorff distance to control decimation.
Use aspect ratio to control decimation.
~DecimaterPlugin()
Default destructor.
Interface class for Thread handling.
Interface class from which all plugins have to be created.
Interface class for backup handling.
Interface for all plugins which want to Load or Save files and create Objects.