42 #include "PluginAlignMeshes.hh" 50 PluginAlignMeshes::PluginAlignMeshes() :
57 PluginAlignMeshes::~PluginAlignMeshes() {
60 void PluginAlignMeshes::initializePlugin() {
62 if ( OpenFlipper::Options::gui()) {
65 toolIcon_ =
new QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+
"alignMeshes.png");
66 emit addToolbox(
"Align Meshes", toolBox_, toolIcon_);
68 connect(toolBox_->alignMeshesButton, SIGNAL(pressed()), SLOT(alignMeshes()));
72 void PluginAlignMeshes::alignMeshes() {
80 align::moveToCOG( mesh );
81 align::rotate( mesh );
83 emit log(
LOGINFO,
"Moved Triangle mesh alignMeshes");
89 align::moveToCOG( mesh );
90 align::rotate( mesh );
92 emit log(
LOGINFO,
"Moved Poly mesh alignMeshes");
#define DATA_TRIANGLE_MESH
PolyMesh * polyMesh(BaseObjectData *_object)
Get a poly mesh from an object.
TriMesh * triMesh(BaseObjectData *_object)
Get a triangle mesh from an object.
const UpdateType UPDATE_GEOMETRY(UpdateTypeSet(4))
Geometry updated.
const QStringList TARGET_OBJECTS("target")
Iterable object range.
ObjectRange objects(IteratorRestriction _restriction, DataType _dataType)
Iterable object range.