Developer Documentation
MovePlugin.hh
1 /*===========================================================================*\
2 * *
3 * OpenFlipper *
4  * Copyright (c) 2001-2015, RWTH-Aachen University *
5  * Department of Computer Graphics and Multimedia *
6  * All rights reserved. *
7  * www.openflipper.org *
8  * *
9  *---------------------------------------------------------------------------*
10  * This file is part of OpenFlipper. *
11  *---------------------------------------------------------------------------*
12  * *
13  * Redistribution and use in source and binary forms, with or without *
14  * modification, are permitted provided that the following conditions *
15  * are met: *
16  * *
17  * 1. Redistributions of source code must retain the above copyright notice, *
18  * this list of conditions and the following disclaimer. *
19  * *
20  * 2. Redistributions in binary form must reproduce the above copyright *
21  * notice, this list of conditions and the following disclaimer in the *
22  * documentation and/or other materials provided with the distribution. *
23  * *
24  * 3. Neither the name of the copyright holder nor the names of its *
25  * contributors may be used to endorse or promote products derived from *
26  * this software without specific prior written permission. *
27  * *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
30  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
31  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER *
32  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
33  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
34  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *
35  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
36  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
37  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
38  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
39 * *
40 \*===========================================================================*/
41 
42 #pragma once
43 
44 #include <QObject>
45 #include <QMenuBar>
46 
64 
65 #ifdef ENABLE_SKELETON_SUPPORT
67 #endif
68 
69 #if defined(ENABLE_HEXAHEDRALMESH_SUPPORT) || defined(ENABLE_POLYHEDRALMESH_SUPPORT) || defined(ENABLE_TETRAHEDRALMESH_SUPPORT)
70 #include <OpenVolumeMesh/Attribs/NormalAttrib.hh>
71 #endif
72 
73 #include "MoveToolbar.hh"
74 #include "MoveProps.hh"
75 #include "MoveObjectMarker.hh"
76 
77 #include <ACG/QtScenegraph/QtTranslationManipulatorNode.hh>
78 
82 {
83  Q_OBJECT
84  Q_INTERFACES(BaseInterface)
85  Q_INTERFACES(MouseInterface)
86  Q_INTERFACES(KeyInterface)
87  Q_INTERFACES(PickingInterface)
88  Q_INTERFACES(ToolboxInterface)
89  Q_INTERFACES(BackupInterface)
90  Q_INTERFACES(LoggingInterface)
91  Q_INTERFACES(ContextMenuInterface)
92  Q_INTERFACES(ScriptInterface)
93  Q_INTERFACES(ToolbarInterface)
94  Q_INTERFACES(LoadSaveInterface)
95  Q_INTERFACES(RPCInterface)
96  Q_INTERFACES(PythonInterface)
97 
98  Q_PLUGIN_METADATA(IID "org.OpenFlipper.Plugins.Plugin-Move")
99 
100 public:
101  typedef unsigned int SelectionType;
102  static const SelectionType VERTEX = 1;
103  static const SelectionType EDGE = 2;
104  static const SelectionType FACE = 4;
105  static const SelectionType CELL = 8;
106 
107  signals:
108  // BaseInterface
109  void updateView();
110  void updatedObject(int, const UpdateType& _type);
111  void nodeVisibilityChanged(int);
112 
113  // PickingInterface
114  void addPickMode( const std::string& _mode );
115  void addHiddenPickMode( const std::string& _mode );
116  void setPickModeMouseTracking (const std::string& _mode, bool _mouseTracking);
117  void setPickModeToolbar (const std::string& _mode, QToolBar * _toolbar);
118 
119  // ContextMenuInterface
120  void addContextMenuItem(QAction* _action , ContextMenuType _type);
121 
122  // BackupInterface
123  void createBackup( int _objectid, QString _name, UpdateType _type = UPDATE_ALL);
124 
125  // LoggingInterface
126  void log(Logtype _type, QString _message);
127  void log(QString _message);
128 
129  // ScriptInterface
130  void scriptInfo( QString _functionName );
131  void setSlotDescription(QString _slotName, QString _slotDescription,
132  QStringList _parameters, QStringList _descriptions);
133 
134  // ToolbarInterface
135  void addToolbar(QToolBar* _toolbar);
136  void getToolBar( QString _name, QToolBar*& _toolbar);
137 
138  // KeyInterface
139  void registerKey(int _key, Qt::KeyboardModifiers _modifiers, QString _description, bool _multiUse = false);
140 
141  // ToolboxInterface
142  void addToolbox( QString _name , QWidget* _widget, QIcon* _icon );
143 
144  // RPCInterface
145  void pluginExists(QString _pluginName, bool &_exists);
146  void functionExists(QString _pluginName, QString _functionName, bool &_exists);
147 
148  private slots :
149 
150  // BaseInterface
151  void initializePlugin();
152  void pluginsInitialized();
153 
154  void slotAllCleared();
155 
156  // LoadSaveInterface
157  void objectDeleted( int _id );
158 
159  // MouseInterface
160  void slotMouseWheelEvent(QWheelEvent * _event, const std::string & _mode);
161  void slotMouseEvent( QMouseEvent* _event );
162 
163  // KeyInterface
164  void slotKeyEvent (QKeyEvent* _event);
165  void slotKeyReleaseEvent (QKeyEvent* _event);
166 
167  // PickingInterface
168  void slotPickModeChanged( const std::string& _mode);
169 
170  // BackupInterface
171  void slotBackupRequested( int /*_id*/ , QString /*_name*/ , int /*_backup_id*/){};
172  void slotRestoreRequested( int /*_id*/ , QString /*_name*/ , int /*_backup_id*/){};
173 
174  public :
175 
177  MovePlugin();
178 
180  ~MovePlugin();
181 
183  QString name(){ return (QString("Move")); };
184 
186  QString description() { return (QString(tr("Moves Meshes with Manipulators"))); };
187 
188 //===========================================================================
191 //===========================================================================
192 
193  private:
195  int axisA_;
196  int axisB_;
197 
199  {
200  DIAGONAL,
201  LONGEST_AXIS,
202  ALL_AXIS
203  };
204 
205  private slots:
206 
208  void slotSetPosition();
209 
211  void slotToggleAxisA();
212 
214  void slotToggleAxisB();
215 
217  void slotSetDirection();
218 
220  void slotTranslation();
221 
224 
226  void slotMoveManipToCOG();
227 
229  void slotRotate();
230 
232  void slotScale();
233 
235 
236  void slotEnableObjectMode();
237 
238  private:
239 
242 
244  template <typename MeshType>
245  OpenMesh::Vec3d getNearestVertex(MeshType* _mesh, uint _fh, OpenMesh::Vec3d& _hitPoint);
246 
248  template <typename MeshType>
249  OpenMesh::Vec3d getNearestEdge(MeshType* _mesh, uint _fh, OpenMesh::Vec3d& _hitPoint);
250 
252  template <typename MeshType>
253  OpenMesh::Vec3d getNearestFace(MeshType* _mesh, uint _fh, OpenMesh::Vec3d& _hitPoint);
254 
257 
260 
261  QIcon* toolIcon_;
262 
265 //===========================================================================
268 //===========================================================================
269 
270  private :
271  QAction* moveAction_;
273 
274  QActionGroup* toolBarActions_;
275 
276  QToolBar* toolbar_;
277 
278  private slots:
279 
281  void slotSetMoveMode(QAction* _action);
282 
285 //===========================================================================
288 //===========================================================================
289 
290  private :
291  QToolBar* pickToolbar_;
292 
293  QAction* placeAction_;
296  QAction* resizeAction_;
297 
300 
304 
306 
307  QActionGroup* pickToolBarActions_;
308 
309  private slots:
310 
312  void slotPickToolbarAction(QAction* _action);
313 
316 //===========================================================================
319 //===========================================================================
320 
321  private:
322  //object ids of all objects with active Manipulator
323  std::vector< int > activeManipulators_;
324 
325  private slots:
326 
328  void manipulatorMoved( QtTranslationManipulatorNode* _node , QMouseEvent* _event);
329 
332 
333  private:
334 
336 
338  template< typename MeshT >
339  void transformMesh(ACG::Matrix4x4d _mat , MeshT& _mesh );
340 
341  #ifdef ENABLE_POLYLINE_SUPPORT
342  template< class PolyLineT >
344  void transformPolyLine( ACG::Matrix4x4d _mat , PolyLineT& _polyLine );
345  #endif
346 
347  #ifdef ENABLE_SKELETON_SUPPORT
348  void transformSkeleton( ACG::Matrix4x4d _mat , Skeleton& _skeleton );
350  #endif
351 
352  #if defined(ENABLE_HEXAHEDRALMESH_SUPPORT) || defined(ENABLE_POLYHEDRALMESH_SUPPORT) || defined(ENABLE_TETRAHEDRALMESH_SUPPORT)
353  template< typename VolumeMeshT >
355  void transformVolumeMesh(ACG::Matrix4x4d _mat , VolumeMeshT& _mesh , OpenVolumeMesh::NormalAttrib<VolumeMeshT>& _normalAttrib );
356 
358  template< typename VolumeMeshT >
359  ACG::Vec3d cogVolumeMesh( VolumeMeshT& _mesh );
360 
362  template< typename VolumeMeshT >
363  void getBBVolumeMesh( VolumeMeshT& _mesh, ACG::Vec3d& _bb_min, ACG::Vec3d& _bb_max );
364 
366  template< typename VolumeMeshT >
367  void unifyBBVolumeMesh(VolumeMeshT& _mesh, OpenVolumeMesh::NormalAttrib<VolumeMeshT>& _normalAttrib, Unificationtype u = MovePlugin::DIAGONAL);
368 
370  template< typename VolumeMeshT >
371  void unifyBBVolumeMesh( VolumeMeshT& _mesh, OpenVolumeMesh::NormalAttrib<VolumeMeshT>& _normalAttrib, ACG::Vec3d& _bb_min, ACG::Vec3d& _bb_max, Unificationtype u = MovePlugin::DIAGONAL );
372  #endif
373 
379  ACG::Matrix4x4d getLastManipulatorMatrix(bool _reset = true);
380 
382  void showManipulators( );
383 
385  void placeManip(QMouseEvent * _event, bool _snap = false);
386 
388  template< typename MeshT >
389  void unifyBB(MeshT& _mesh , Unificationtype u = MovePlugin::DIAGONAL);
390 
392  template< typename MeshT >
393  void getBB( MeshT& _mesh, ACG::Vec3d& _bb_min, ACG::Vec3d& _bb_max );
394 
396  template< typename MeshT >
397  void unifyBB( MeshT& _mesh, ACG::Vec3d& _bb_min, ACG::Vec3d& _bb_max, Unificationtype u = MovePlugin::DIAGONAL );
398 
400  double manip_size_;
401 
404 
407 
409  void setDescriptions();
410 
412  void moveObject(ACG::Matrix4x4d mat, int _id);
413 
415  void moveSelection(ACG::Matrix4x4d mat, int _id, QEvent::Type _type);
416 
419 
420  private:
421 
424 
426 
429 //===========================================================================
432 //===========================================================================
433 
435  SelectionType selectionType_;
436 
438  void updateSelectionType();
439 
440  private slots:
441 
443  void setAllTargets(bool _state);
444 
447  //===========================================================================
450  //===========================================================================
451 
452  private slots:
453 
455  void showProps( );
456 
458  void hideManipulator();
459 
462 
464  movePropsWidget* getDialogFromButton(QPushButton* _but);
465 
469  void slotUpdateContextMenuNode( int _nodeId );
470 
471  private:
472 
473  void setPickModeProps(movePropsWidget* _pW, const std::string &_pickmode);
474 
476  QList<movePropsWidget*> propsWindows_;
477 
479  QAction* contextAction_;
480 
483 
485  QAction* toAllTargets_;
486 
489 
492 
495 //===========================================================================
498 //===========================================================================
499 
500 public slots :
501 
503  void slotMoveToOrigin();
504 
507 
510 
513 
515  void translate( int _objectId , Vector _vector );
516 
518  void translate( int _objectId , IdList _vHandles, Vector _vector );
519 
521  void translateVertexSelection( int _objectId , Vector _vector );
522 
524  void translateFaceSelection( int _objectId , Vector _vector );
525 
527  void translateEdgeSelection( int _objectId , Vector _vector );
528 
530  void transform( int _objectId , Matrix4x4 _matrix );
531 
533  void transform( int _objectId , IdList _vHandles, Matrix4x4 _matrix );
534 
536  bool transformVertexSelection( int _objectId , Matrix4x4 _matrix );
537 
539  bool transformFaceSelection( int _objectId , Matrix4x4 _matrix );
540 
542  bool transformEdgeSelection( int _objectId , Matrix4x4 _matrix );
543 
545  bool transformCellSelection( int _objectId , Matrix4x4 _matrix );
546 
548  void transformHandleRegion(int _objectId, Matrix4x4 _matrix);
549 
551  void setManipulatorPosition( int _objectId , Vector _position );
552 
554  Vector manipulatorPosition( int _objectId );
555 
557  void setManipulatorDirection( int _objectId , Vector _directionX, Vector _directionY );
558 
560  Vector manipulatorDirectionX( int _objectId );
561 
563  Vector manipulatorDirectionY( int _objectId );
564 
566  Vector manipulatorDirectionZ( int _objectId );
567 
570  void objectRenderingMatrixIdentity(int _objectId);
571 
577  void objectRenderingMatrixScale(int _objectId, double _s);
578 
584  void objectRenderingMatrixTranslate(int _objectId, Vector _translation);
585 
592  void objectRenderingMatrixRotate(int _objectId, Vector _axis, double _angle);
593 
602  Matrix4x4 getObjectRenderingMatrix(int _objectId);
603 
606  public slots:
607  QString version() { return QString("1.2"); };
608 
609  private:
610  bool hide_;
611 
612  bool allTargets_;
613 
614  bool placeMode_;
615 
618 };
619 
bool toolboxActive_
True if the toolbox widget is active.
Definition: MovePlugin.hh:256
void placeManip(QMouseEvent *_event, bool _snap=false)
Place and show the Manipulator.
Definition: MovePlugin.cc:863
bool transformCellSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
bool transformFaceSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
Interface class for creating custom context menus.
Update type class.
Definition: UpdateType.hh:60
Interface to call functions across plugins.
Definition: RPCInterface.hh:61
const UpdateType UPDATE_ALL(UpdateTypeSet(1))
Identifier for all updates.
QAction * resizeAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:296
void slotEnableSelectionMode()
stores the current axes in the tool
Definition: MovePlugin.cc:476
int axisB_
stores the current axes in the tool
Definition: MovePlugin.hh:196
QAction * biggerManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:298
void slotToggleAxisB()
Toggle the second axis for changing direction in tab.
Definition: MovePlugin.cc:1127
Logtype
Log types for Message Window.
void setDescriptions()
Set Descriptions for scriptable functions.
void updateSelectionType()
Get current primitive selection.
Definition: MovePlugin.cc:2560
QString name()
Name of the Plugin.
Definition: MovePlugin.hh:183
Interface for all plugins which want to Load or Save files and create Objects.
QActionGroup * pickToolBarActions_
Called by pick Toolbar.
Definition: MovePlugin.hh:307
Interface for all Plugins which provide scriptable Functions.
QAction * placeAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:293
QAction * contextMenuManipControlsAction_
Action holding the context menu for toolbar replication.
Definition: MovePlugin.hh:491
void transform(int _objectId, Matrix4x4 _matrix)
transform an Object by a given matrix
void updateManipulatorDialog()
Update the Dialog with the last clicked manipulator.
Definition: MovePlugin.cc:2051
ManipulatorMode
enum to define the manipulator mode
void setPickModeProps(movePropsWidget *_pW, const std::string &_pickmode)
List of properties dialogs (each corresponding to one manipulator)
Definition: MovePlugin.cc:495
void moveSelection(ACG::Matrix4x4d mat, int _id, QEvent::Type _type)
Move selection on an object with given id.
Definition: MovePlugin.cc:638
moveToolbarWidget * tool_
Widget for Toolbox.
Definition: MovePlugin.hh:259
void slotSetPosition()
Position of manipulator in tab changed.
Definition: MovePlugin.cc:1032
MovePlugin()
Default Constructor.
Definition: MovePlugin.cc:82
void slotToggleAxisA()
Toggle the first axis for changing direction in tab.
Definition: MovePlugin.cc:1102
void transformHandleRegion(int _objectId, Matrix4x4 _matrix)
Transform handle region using the given transformation matrix.
Unificationtype
stores the current axes in the tool
Definition: MovePlugin.hh:198
movePropsWidget * getDialogWidget(BaseObjectData *_obj)
Get properties dialog widget that is attached to BaseDataObject obj.
Definition: MovePlugin.cc:2099
Interface class for receiving mouse events.
QtTranslationManipulatorNode::ManipulatorMode manMode_
Holds the current manipulator mode.
Definition: MovePlugin.hh:423
Vector manipulatorDirectionZ(int _objectId)
Get the z-direction of the manipulator.
Interface for all Plugins which do logging to the logging window of the framework.
void translate(int _objectId, Vector _vector)
translate an Object by a given vector
Vector manipulatorDirectionX(int _objectId)
Get the x-direction of the manipulator.
void showManipulators()
Checks if the manipulators should be visible or not.
Definition: MovePlugin.cc:978
void setManipMode(QtTranslationManipulatorNode::ManipulatorMode _mode)
Set the manipulator manipulation mode.
Definition: MovePlugin.cc:671
void showProps()
Show properties of move manipulator in a dialog ( Called via context for picking. Get the picked id f...
void slotSetDirection()
Set Direction of manipulator in tab changed.
Definition: MovePlugin.cc:1152
double manip_size_
Size for the manipulators.
Definition: MovePlugin.hh:400
QToolBar * pickToolbar_
Called by pick Toolbar.
Definition: MovePlugin.hh:291
bool transformedSelected_
stores if any selected elements where transformed
Definition: MovePlugin.hh:617
Allow access to picking functions.
QList< movePropsWidget * > propsWindows_
List of properties dialogs (each corresponding to one manipulator)
Definition: MovePlugin.hh:476
QAction * moveAction_
Called by Toolbar to enable move mode.
Definition: MovePlugin.hh:271
OpenMesh::Vec3d getNearestFace(MeshType *_mesh, uint _fh, OpenMesh::Vec3d &_hitPoint)
Get closest face to hitpoint.
Definition: MovePlugin.cc:2719
int axisA_
stores the current axes in the tool
Definition: MovePlugin.hh:195
void slotMoveToOrigin()
Move target Meshes cog to the origin.
Definition: MovePlugin.cc:1729
MoveObjectMarker objectMarker_
Object marker to dimm Objects during manipulator transformation.
Definition: MovePlugin.hh:418
void transformMesh(ACG::Matrix4x4d _mat, MeshT &_mesh)
Transform a mesh with the given transformation matrix.
Definition: MovePlugin.cc:2213
void setManipulatorDirection(int _objectId, Vector _directionX, Vector _directionY)
Set the direction of the manipulator.
void getBB(MeshT &_mesh, ACG::Vec3d &_bb_min, ACG::Vec3d &_bb_max)
get bounding box diagonal of a mesh
Definition: MovePlugin.cc:2495
QActionGroup * toolBarActions_
Called by Toolbar to enable move mode.
Definition: MovePlugin.hh:274
void slotScale()
Scale (with values from Tab)
Definition: MovePlugin.cc:1578
QAction * currentPoseManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:303
Plugins can add its own toolbox to the main widget&#39;s toolbox area by using this interface.
QAction * toAllTargets_
Checked if transformation should be applied to all target objs.
Definition: MovePlugin.hh:485
std::vector< int > IdList
Standard Type for id Lists used for scripting.
Definition: DataTypes.hh:179
void slotProjectToTangentPlane()
Project the current manipulator onto the tangent plane of the object.
Definition: MovePlugin.cc:1338
QAction * placeAndSnapAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:305
void slotEnableObjectMode()
stores the current axes in the tool
Definition: MovePlugin.cc:482
void objectRenderingMatrixScale(int _objectId, double _s)
Adds a scaling factor to the Object rendering Matrix in the scenegraph.
QAction * contextAction_
Context menu entry for showing per manipulator settings.
Definition: MovePlugin.hh:479
QString description()
Description of the Plugin.
Definition: MovePlugin.hh:186
void unifyBB(MeshT &_mesh, Unificationtype u=MovePlugin::DIAGONAL)
scale mesh to have a boundingboxdiagonal of one
Definition: MovePlugin.cc:2441
void moveObject(ACG::Matrix4x4d mat, int _id)
Move an object with given id.
Definition: MovePlugin.cc:574
QAction * rotateTranslateAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:294
bool transformVertexSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
void objectRenderingMatrixIdentity(int _objectId)
Sets the Object Matrix in the scenegraph to identity.
Interface class from which all plugins have to be created.
QAction * smallerManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:299
void slotUnifyBoundingBoxLongestAxis()
Scale Boundingbox longest axis to unit size (keeps aspect ratio)
Definition: MovePlugin.cc:1907
QAction * contextActionHide_
Context menu entry to hide a manipulator.
Definition: MovePlugin.hh:482
void ManipulatorPositionChanged(QtTranslationManipulatorNode *_node)
update object when its manipulator changes position
Definition: MovePlugin.cc:832
void slotTranslation()
perform a translation for Manipulator in tab
Definition: MovePlugin.cc:1233
QAction * rotateManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:295
bool transformEdgeSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
QIcon * toolIcon_
stores the current axes in the tool
Definition: MovePlugin.hh:261
Add a toolbox to OpenFlipper.
void translateFaceSelection(int _objectId, Vector _vector)
translate current face selection of an Object by a given vector
QAction * fixChildManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:301
~MovePlugin()
Destructor.
Definition: MovePlugin.cc:125
void manipulatorMoved(QtTranslationManipulatorNode *_node, QMouseEvent *_event)
move the object when its manipulator moves
Definition: MovePlugin.cc:774
Keyboard Event Interface.
Definition: KeyInterface.hh:59
QAction * transformRefPoseManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:302
void slotMoveManipToCOG()
Move the current manipulator to the cog of the object.
Definition: MovePlugin.cc:1360
movePropsWidget * getDialogFromButton(QPushButton *_but)
Get parent properties dialog widget of QPushButton but.
Definition: MovePlugin.cc:1022
QToolBar * toolbar_
Called by Toolbar to enable move mode.
Definition: MovePlugin.hh:276
double manip_size_modifier_
Modifier for the Size (changed by Mousewheel Events)
Definition: MovePlugin.hh:403
void hideManipulator()
Hide the manipulator( Called via context for picking. Get the picked id from the Qvariant attached to...
void setAllTargets(bool _state)
Sets whether all targets should be affected or not.
Definition: MovePlugin.cc:2632
OpenMesh::Vec3d getNearestEdge(MeshType *_mesh, uint _fh, OpenMesh::Vec3d &_hitPoint)
Get closest edge to hitpoint.
Definition: MovePlugin.cc:2674
void slotPickToolbarAction(QAction *_action)
Called by pick Toolbar.
Definition: MovePlugin.cc:2139
void slotUnifyBoundingBoxDiagonal()
Scale Boundingbox Diagonal to unit size.
Definition: MovePlugin.cc:1902
SelectionType selectionType_
Current SelectionType of SelectionPlugin.
Definition: MovePlugin.hh:435
ACG::Matrix4x4d getLastManipulatorMatrix(bool _reset=true)
Get the Matrix of the last active Manipulator ( Identity if not found or hidden Manipulator ) ...
Definition: MovePlugin.cc:2187
OpenMesh::Vec3d getNearestVertex(MeshType *_mesh, uint _fh, OpenMesh::Vec3d &_hitPoint)
Get closest vertex to hitpoint.
Definition: MovePlugin.cc:2642
void slotUpdateContextMenuNode(int _nodeId)
Hide context menu entry when right clicking on node other than manipulator node.
Definition: MovePlugin.cc:753
void objectRenderingMatrixRotate(int _objectId, Vector _axis, double _angle)
Adds a scaling factor to the Object rendering Matrix in the scenegraph.
std::vector< int > activeManipulators_
Size for the manipulators.
Definition: MovePlugin.hh:323
void translateEdgeSelection(int _objectId, Vector _vector)
translate current edge selection of an Object by a given vector
int lastActiveManipulator_
Stores the last manipulator which has been clicked ( used for the toolbox dialog) ...
Definition: MovePlugin.hh:406
void slotSetMoveMode(QAction *_action)
Called by Toolbar to enable move mode.
Definition: MovePlugin.cc:2114
void objectRenderingMatrixTranslate(int _objectId, Vector _translation)
Adds a scaling factor to the Object rendering Matrix in the scenegraph.
void slotRotate()
Rotate Manipulator (with values from Tab)
Definition: MovePlugin.cc:1422
Interface class for backup handling.
Interface class for exporting functions to python.
Vector manipulatorDirectionY(int _objectId)
Get the y-direction of the manipulator.
void unifyBoundingBox(Unificationtype u)
Size for the manipulators.
Definition: MovePlugin.cc:1917
Matrix4x4 getObjectRenderingMatrix(int _objectId)
Gets the Object Matrix in the scenegraph.
void setManipulatorPosition(int _objectId, Vector _position)
Set the position of the manipulator.
void translateVertexSelection(int _objectId, Vector _vector)
translate current vertex selection of an Object by a given vector
void slotPickModeChanged(const std::string &_mode)
slot is called when the pickMode changed
Definition: MovePlugin.cc:525
void slotMouseEvent(QMouseEvent *_event)
MousePress event occured.
Definition: MovePlugin.cc:400
QMenu * contextMenuManipControl_
Additional Context Menu replicating the toolbar stuff.
Definition: MovePlugin.hh:488
void slotUnifyBoundingBoxAllAxis()
Scale all Boundingbox axis to unit size.
Definition: MovePlugin.cc:1912
void pluginsInitialized()
Initialization of the plugin when it is loaded by the core.
Definition: MovePlugin.cc:156
Vector manipulatorPosition(int _objectId)
Get the position of the manipulator.
QAction * moveSelectionAction_
Called by Toolbar to enable move mode.
Definition: MovePlugin.hh:272