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"); };
Use Hausdorff distance to control decimation.
DecimaterPlugin()
Default constructor.
Interface to call functions across plugins.
const UpdateType UPDATE_ALL(UpdateTypeSet(1))
Identifier for all updates.
Interface class for Thread handling.
Logtype
Log types for Message Window.
QString name()
Name of the Plugin.
Interface for all plugins which want to Load or Save files and create Objects.
Interface for all Plugins which provide scriptable Functions.
void decimate(int _objID, QVariantMap _constraints)
decimate an object
void canceledJob(QString _job)
A job has been canceled.
void slotUpdateNumTriangles()
gets and sets the current maximum number of triangles
Interface for all Plugins which do logging to the logging window of the framework.
void slotUpdateAspectRatio(int _value)
sync between values of aspect ratio slider and spinbox in the toolbox
void slot_decimate()
decimating called from button in toolbox
QString description()
Description of the Plugin.
Plugins can add its own toolbox to the main widget's toolbox area by using this interface.
Use Normal deviation to control decimation.
Use edge length to control decimation.
~DecimaterPlugin()
Default destructor.
DecimaterToolbarWidget * tool_
Widget for Toolbox.
Interface class from which all plugins have to be created.
Use Roundness of triangles to control decimation.
void slotUpdateRoundness(int _value)
roundness slider - spinbox sync
void slotUpdateNumVertices()
update number of vertices information
void pluginsInitialized()
Initialization of the plugin when it is loaded by the core.
Use aspect ratio to control decimation.
void slotUpdateDistance()
slider / spinbox updates
void slot_initialize()
init called from button in toolbox
Interface class for backup handling.
Interface class for exporting functions to python.
Mesh decimation module computing collapse priority based on error quadrics.