18 #include <Eigen/Geometry>
21 #include "ObjectInfoListModel.hh"
37 #if QT_VERSION >= 0x050000
38 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-Align")
50 void updatedObject(
int objectId,
UpdateType const& type);
53 void log(
Logtype type, QString message);
54 void log(QString message);
57 void addToolbox(QString name, QWidget *widget, QIcon *icon);
62 void pluginsInitialized();
63 void slotObjectUpdated(
int,
UpdateType const&);
64 void slotObjectSelectionChanged(
int);
67 void objectDeleted(
int objectId);
70 void slotAlignMeshes();
72 void slotSourceMeshChanged(
int objectId);
73 void slotTargetMeshChanged(
int objectId);
78 QComboBox *sourceMeshCombo_;
81 QComboBox *targetMeshCombo_;
84 QCheckBox *doScaleCheckBox_;
85 QPushButton *alignMeshesButton_;
88 typedef std::pair<Eigen::Vector3d, Eigen::Vector3d> BBox;
89 typedef std::vector<Eigen::Vector3d> Point_container;
92 void transformObject(
BaseObjectData *
object, Eigen::Affine3d
const& t);
93 void transformPoints(Point_container& points, Eigen::Affine3d
const& t);
94 BBox computeBoundingBox(Point_container
const& points);
95 Eigen::Vector3d computeCentroid(Point_container
const& points);
96 bool computePCA(Point_container
const& points, Eigen::Vector3d& centroid, Eigen::Matrix3d& principal_directions);
105 return QString(
"Mesh alignment plugin");
110 return QString(
"Align two meshes by using PCA and scaling");
116 return QString(
"1.0");
QString name()
Return a name for the plugin.
Interface for all plugins which want to Load or Save files and create Objects.
QString description()
Return a description of what the plugin is doing.
Plugins can add its own toolbox to the main widget's toolbox area by using this interface.
Interface class for backup handling.
Interface for all Plugins which do logging to the logging window of the framework.
Interface class from which all plugins have to be created.
Logtype
Log types for Message Window.
const UpdateType UPDATE_ALL(UpdateTypeSet(1))
Identifier for all updates.