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 /*===========================================================================*\
43 * *
44 * $Revision$ *
45 * $LastChangedBy$ *
46 * $Date$ *
47 * *
48 \*===========================================================================*/
49 
50 #ifndef MOVEPLUGIN_HH
51 #define MOVEPLUGIN_HH
52 
53 #include <QObject>
54 #include <QMenuBar>
55 
72 
73 #ifdef ENABLE_SKELETON_SUPPORT
75 #endif
76 
77 #ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
78 #include <OpenVolumeMesh/Attribs/NormalAttrib.hh>
79 #endif
80 
81 #include "MoveToolbar.hh"
82 #include "MoveProps.hh"
83 #include "MoveObjectMarker.hh"
84 
88 {
89  Q_OBJECT
90  Q_INTERFACES(BaseInterface)
91  Q_INTERFACES(MouseInterface)
92  Q_INTERFACES(KeyInterface)
93  Q_INTERFACES(PickingInterface)
94  Q_INTERFACES(ToolboxInterface)
95  Q_INTERFACES(BackupInterface)
96  Q_INTERFACES(LoggingInterface)
97  Q_INTERFACES(ContextMenuInterface)
98  Q_INTERFACES(ScriptInterface)
99  Q_INTERFACES(ToolbarInterface)
100  Q_INTERFACES(LoadSaveInterface)
101  Q_INTERFACES(RPCInterface)
102 
103 #if QT_VERSION >= 0x050000
104  Q_PLUGIN_METADATA(IID "org.OpenFlipper.Plugins.Plugin-Move")
105 #endif
106 
107 public:
108  typedef unsigned int SelectionType;
109  static const SelectionType VERTEX = 1;
110  static const SelectionType EDGE = 2;
111  static const SelectionType FACE = 4;
112  static const SelectionType CELL = 8;
113 
114  signals:
115  // BaseInterface
116  void updateView();
117  void updatedObject(int, const UpdateType& _type);
118  void nodeVisibilityChanged(int);
119 
120  // PickingInterface
121  void addPickMode( const std::string& _mode );
122  void addHiddenPickMode( const std::string& _mode );
123  void setPickModeMouseTracking (const std::string& _mode, bool _mouseTracking);
124  void setPickModeToolbar (const std::string& _mode, QToolBar * _toolbar);
125 
126  // ContextMenuInterface
127  void addContextMenuItem(QAction* _action , ContextMenuType _type);
128 
129  // BackupInterface
130  void createBackup( int _objectid, QString _name, UpdateType _type = UPDATE_ALL);
131 
132  // LoggingInterface
133  void log(Logtype _type, QString _message);
134  void log(QString _message);
135 
136  // ScriptInterface
137  void scriptInfo( QString _functionName );
138  void setSlotDescription(QString _slotName, QString _slotDescription,
139  QStringList _parameters, QStringList _descriptions);
140 
141  // ToolbarInterface
142  void addToolbar(QToolBar* _toolbar);
143  void getToolBar( QString _name, QToolBar*& _toolbar);
144 
145  // KeyInterface
146  void registerKey(int _key, Qt::KeyboardModifiers _modifiers, QString _description, bool _multiUse = false);
147 
148  // ToolboxInterface
149  void addToolbox( QString _name , QWidget* _widget, QIcon* _icon );
150 
151  // RPCInterface
152  void pluginExists(QString _pluginName, bool &_exists);
153  void functionExists(QString _pluginName, QString _functionName, bool &_exists);
154 
155  private slots :
156 
157  // BaseInterface
158  void initializePlugin();
159  void pluginsInitialized();
160 
161  void slotAllCleared();
162 
163  // LoadSaveInterface
164  void objectDeleted( int _id );
165 
166  // MouseInterface
167  void slotMouseWheelEvent(QWheelEvent * _event, const std::string & _mode);
168  void slotMouseEvent( QMouseEvent* _event );
169 
170  // KeyInterface
171  void slotKeyEvent (QKeyEvent* _event);
172  void slotKeyReleaseEvent (QKeyEvent* _event);
173 
174  // PickingInterface
175  void slotPickModeChanged( const std::string& _mode);
176 
177  // BackupInterface
178  void slotBackupRequested( int /*_id*/ , QString /*_name*/ , int /*_backup_id*/){};
179  void slotRestoreRequested( int /*_id*/ , QString /*_name*/ , int /*_backup_id*/){};
180 
181  public :
182 
184  MovePlugin();
185 
187  ~MovePlugin();
188 
190  QString name(){ return (QString("Move")); };
191 
193  QString description() { return (QString(tr("Moves Meshes with Manipulators"))); };
194 
195 //===========================================================================
198 //===========================================================================
199 
200  private:
202  int axisA_;
203  int axisB_;
204 
206  {
207  DIAGONAL,
208  LONGEST_AXIS,
209  ALL_AXIS
210  };
211 
212  private slots:
213 
215  void slotSetPosition();
216 
218  void slotToggleAxisA();
219 
221  void slotToggleAxisB();
222 
224  void slotSetDirection();
225 
227  void slotTranslation();
228 
231 
233  void slotMoveManipToCOG();
234 
236  void slotRotate();
237 
239  void slotScale();
240 
242 
243  void slotEnableObjectMode();
244 
245  private:
246 
249 
251  template <typename MeshType>
252  OpenMesh::Vec3d getNearestVertex(MeshType* _mesh, uint _fh, OpenMesh::Vec3d& _hitPoint);
253 
255  template <typename MeshType>
256  OpenMesh::Vec3d getNearestEdge(MeshType* _mesh, uint _fh, OpenMesh::Vec3d& _hitPoint);
257 
259  template <typename MeshType>
260  OpenMesh::Vec3d getNearestFace(MeshType* _mesh, uint _fh, OpenMesh::Vec3d& _hitPoint);
261 
264 
267 
268  QIcon* toolIcon_;
269 
272 //===========================================================================
275 //===========================================================================
276 
277  private :
278  QAction* moveAction_;
280 
281  QActionGroup* toolBarActions_;
282 
283  QToolBar* toolbar_;
284 
285  private slots:
286 
288  void slotSetMoveMode(QAction* _action);
289 
292 //===========================================================================
295 //===========================================================================
296 
297  private :
298  QToolBar* pickToolbar_;
299 
300  QAction* placeAction_;
303  QAction* resizeAction_;
304 
307 
311 
313 
314  QActionGroup* pickToolBarActions_;
315 
316  private slots:
317 
319  void slotPickToolbarAction(QAction* _action);
320 
323 //===========================================================================
326 //===========================================================================
327 
328  private:
329  //object ids of all objects with active Manipulator
330  std::vector< int > activeManipulators_;
331 
332  private slots:
333 
335  void manipulatorMoved( QtTranslationManipulatorNode* _node , QMouseEvent* _event);
336 
339 
340  private:
341 
343 
345  template< typename MeshT >
346  void transformMesh(ACG::Matrix4x4d _mat , MeshT& _mesh );
347 
348  #ifdef ENABLE_POLYLINE_SUPPORT
349  template< class PolyLineT >
351  void transformPolyLine( ACG::Matrix4x4d _mat , PolyLineT& _polyLine );
352  #endif
353 
354  #ifdef ENABLE_SKELETON_SUPPORT
355  void transformSkeleton( ACG::Matrix4x4d _mat , Skeleton& _skeleton );
357  #endif
358 
359  #ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
360  template< typename VolumeMeshT >
362  void transformVolumeMesh(ACG::Matrix4x4d _mat , VolumeMeshT& _mesh , OpenVolumeMesh::NormalAttrib<VolumeMeshT>& _normalAttrib );
363 
365  template< typename VolumeMeshT >
366  ACG::Vec3d cogVolumeMesh( VolumeMeshT& _mesh );
367 
369  template< typename VolumeMeshT >
370  void getBBVolumeMesh( VolumeMeshT& _mesh, ACG::Vec3d& _bb_min, ACG::Vec3d& _bb_max );
371 
373  template< typename VolumeMeshT >
374  void unifyBBVolumeMesh(VolumeMeshT& _mesh, OpenVolumeMesh::NormalAttrib<VolumeMeshT>& _normalAttrib, Unificationtype u = MovePlugin::DIAGONAL);
375 
377  template< typename VolumeMeshT >
378  void unifyBBVolumeMesh( VolumeMeshT& _mesh, OpenVolumeMesh::NormalAttrib<VolumeMeshT>& _normalAttrib, ACG::Vec3d& _bb_min, ACG::Vec3d& _bb_max, Unificationtype u = MovePlugin::DIAGONAL );
379  #endif
380 
386  ACG::Matrix4x4d getLastManipulatorMatrix(bool _reset = true);
387 
389  void showManipulators( );
390 
392  void placeManip(QMouseEvent * _event, bool _snap = false);
393 
395  template< typename MeshT >
396  void unifyBB(MeshT& _mesh , Unificationtype u = MovePlugin::DIAGONAL);
397 
399  template< typename MeshT >
400  void getBB( MeshT& _mesh, ACG::Vec3d& _bb_min, ACG::Vec3d& _bb_max );
401 
403  template< typename MeshT >
404  void unifyBB( MeshT& _mesh, ACG::Vec3d& _bb_min, ACG::Vec3d& _bb_max, Unificationtype u = MovePlugin::DIAGONAL );
405 
407  double manip_size_;
408 
411 
414 
416  void setDescriptions();
417 
419  void moveObject(ACG::Matrix4x4d mat, int _id);
420 
422  void moveSelection(ACG::Matrix4x4d mat, int _id, QEvent::Type _type);
423 
426 
427  private:
428 
431 
433 
436 //===========================================================================
439 //===========================================================================
440 
442  SelectionType selectionType_;
443 
445  void updateSelectionType();
446 
447  private slots:
448 
450  void setAllTargets(bool _state);
451 
454  //===========================================================================
457  //===========================================================================
458 
459  private slots:
460 
462  void showProps( );
463 
465  void hideManipulator();
466 
469 
471  movePropsWidget* getDialogFromButton(QPushButton* _but);
472 
476  void slotUpdateContextMenuNode( int _nodeId );
477 
478  private:
479 
480  void setPickModeProps(movePropsWidget* _pW, const std::string &_pickmode);
481 
483  QList<movePropsWidget*> propsWindows_;
484 
486  QAction* contextAction_;
487 
490 
492  QAction* toAllTargets_;
493 
496 
499 
502 //===========================================================================
505 //===========================================================================
506 
507 public slots :
508 
510  void slotMoveToOrigin();
511 
514 
517 
520 
522  void translate( int _objectId , Vector _vector );
523 
525  void translate( int _objectId , IdList _vHandles, Vector _vector );
526 
528  void translateVertexSelection( int _objectId , Vector _vector );
529 
531  void translateFaceSelection( int _objectId , Vector _vector );
532 
534  void translateEdgeSelection( int _objectId , Vector _vector );
535 
537  void transform( int _objectId , Matrix4x4 _matrix );
538 
540  void transform( int _objectId , IdList _vHandles, Matrix4x4 _matrix );
541 
543  bool transformVertexSelection( int _objectId , Matrix4x4 _matrix );
544 
546  bool transformFaceSelection( int _objectId , Matrix4x4 _matrix );
547 
549  bool transformEdgeSelection( int _objectId , Matrix4x4 _matrix );
550 
552  bool transformCellSelection( int _objectId , Matrix4x4 _matrix );
553 
555  void transformHandleRegion(int _objectId, Matrix4x4 _matrix);
556 
558  void setManipulatorPosition( int _objectId , Vector _position );
559 
561  Vector manipulatorPosition( int _objectId );
562 
564  void setManipulatorDirection( int _objectId , Vector _directionX, Vector _directionY );
565 
567  Vector manipulatorDirectionX( int _objectId );
568 
570  Vector manipulatorDirectionY( int _objectId );
571 
573  Vector manipulatorDirectionZ( int _objectId );
574 
577  void objectRenderingMatrixIdentity(int _objectId);
578 
584  void objectRenderingMatrixScale(int _objectId, double _s);
585 
591  void objectRenderingMatrixTranslate(int _objectId, Vector _translation);
592 
599  void objectRenderingMatrixRotate(int _objectId, Vector _axis, double _angle);
600 
609  Matrix4x4 getObjectRenderingMatrix(int _objectId);
610 
613  public slots:
614  QString version() { return QString("1.2"); };
615 
616  private:
617  bool hide_;
618 
619  bool allTargets_;
620 
621  bool placeMode_;
622 
625 };
626 
627 #endif //MOVEPLUGIN_HH
void setDescriptions()
Set Descriptions for scriptable functions.
bool transformEdgeSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
QAction * currentPoseManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:310
void objectRenderingMatrixRotate(int _objectId, Vector _axis, double _angle)
Adds a scaling factor to the Object rendering Matrix in the scenegraph.
Vector manipulatorPosition(int _objectId)
Get the position of the manipulator.
QMenu * contextMenuManipControl_
Additional Context Menu replicating the toolbar stuff.
Definition: MovePlugin.hh:495
QAction * moveSelectionAction_
Called by Toolbar to enable move mode.
Definition: MovePlugin.hh:279
~MovePlugin()
Destructor.
Definition: MovePlugin.cc:133
Interface class for creating custom context menus.
Interface class for receiving mouse events.
void slotMouseEvent(QMouseEvent *_event)
MousePress event occured.
Definition: MovePlugin.cc:403
QAction * moveAction_
Called by Toolbar to enable move mode.
Definition: MovePlugin.hh:278
bool toolboxActive_
True if the toolbox widget is active.
Definition: MovePlugin.hh:263
void slotToggleAxisB()
Toggle the second axis for changing direction in tab.
Definition: MovePlugin.cc:1134
QList< movePropsWidget * > propsWindows_
List of properties dialogs (each corresponding to one manipulator)
Definition: MovePlugin.hh:483
Logtype
Log types for Message Window.
bool transformFaceSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
QAction * fixChildManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:308
void moveObject(ACG::Matrix4x4d mat, int _id)
Move an object with given id.
Definition: MovePlugin.cc:577
OpenMesh::Vec3d getNearestEdge(MeshType *_mesh, uint _fh, OpenMesh::Vec3d &_hitPoint)
Get closest edge to hitpoint.
Definition: MovePlugin.cc:2681
SelectionType selectionType_
Current SelectionType of SelectionPlugin.
Definition: MovePlugin.hh:442
QToolBar * toolbar_
Called by Toolbar to enable move mode.
Definition: MovePlugin.hh:283
Keyboard Event Interface.
Definition: KeyInterface.hh:76
QActionGroup * pickToolBarActions_
Called by pick Toolbar.
Definition: MovePlugin.hh:314
bool transformVertexSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
void setManipulatorPosition(int _objectId, Vector _position)
Set the position of the manipulator.
void slotToggleAxisA()
Toggle the first axis for changing direction in tab.
Definition: MovePlugin.cc:1109
QIcon * toolIcon_
stores the current axes in the tool
Definition: MovePlugin.hh:268
void pluginsInitialized()
Initialization of the plugin when it is loaded by the core.
Definition: MovePlugin.cc:164
void updateSelectionType()
Get current primitive selection.
Definition: MovePlugin.cc:2567
MovePlugin()
Default Constructor.
Definition: MovePlugin.cc:90
void translateEdgeSelection(int _objectId, Vector _vector)
translate current edge selection of an Object by a given vector
QAction * rotateManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:302
QAction * placeAndSnapAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:312
void hideManipulator()
Hide the manipulator( Called via context for picking. Get the picked id from the Qvariant attached to...
void setManipMode(QtTranslationManipulatorNode::ManipulatorMode _mode)
Set the manipulator manipulation mode.
Definition: MovePlugin.cc:674
void showProps()
Show properties of move manipulator in a dialog ( Called via context for picking. Get the picked id f...
QAction * smallerManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:306
void slotEnableSelectionMode()
stores the current axes in the tool
Definition: MovePlugin.cc:479
void slotUnifyBoundingBoxAllAxis()
Scale all Boundingbox axis to unit size.
Definition: MovePlugin.cc:1919
Interface for all Plugins which provide scriptable Functions.
void slotUnifyBoundingBoxLongestAxis()
Scale Boundingbox longest axis to unit size (keeps aspect ratio)
Definition: MovePlugin.cc:1914
Interface class from which all plugins have to be created.
void moveSelection(ACG::Matrix4x4d mat, int _id, QEvent::Type _type)
Move selection on an object with given id.
Definition: MovePlugin.cc:641
QToolBar * pickToolbar_
Called by pick Toolbar.
Definition: MovePlugin.hh:298
void objectRenderingMatrixScale(int _objectId, double _s)
Adds a scaling factor to the Object rendering Matrix in the scenegraph.
Update type class.
Definition: UpdateType.hh:70
QString name()
Name of the Plugin.
Definition: MovePlugin.hh:190
Plugins can add its own toolbox to the main widget&#39;s toolbox area by using this interface.
void translate(int _objectId, Vector _vector)
translate an Object by a given vector
void slotProjectToTangentPlane()
Project the current manipulator onto the tangent plane of the object.
Definition: MovePlugin.cc:1345
Interface for all Plugins which do logging to the logging window of the framework.
bool transformedSelected_
stores if any selected elements where transformed
Definition: MovePlugin.hh:624
void slotMoveToOrigin()
Move target Meshes cog to the origin.
Definition: MovePlugin.cc:1736
void transformMesh(ACG::Matrix4x4d _mat, MeshT &_mesh)
Transform a mesh with the given transformation matrix.
Definition: MovePlugin.cc:2220
bool transformCellSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
Vector manipulatorDirectionZ(int _objectId)
Get the z-direction of the manipulator.
void manipulatorMoved(QtTranslationManipulatorNode *_node, QMouseEvent *_event)
move the object when its manipulator moves
Definition: MovePlugin.cc:776
QAction * contextAction_
Context menu entry for showing per manipulator settings.
Definition: MovePlugin.hh:486
MoveObjectMarker objectMarker_
Object marker to dimm Objects during manipulator transformation.
Definition: MovePlugin.hh:425
movePropsWidget * getDialogWidget(BaseObjectData *_obj)
Get properties dialog widget that is attached to BaseDataObject obj.
Definition: MovePlugin.cc:2106
void slotRotate()
Rotate Manipulator (with values from Tab)
Definition: MovePlugin.cc:1429
void slotUnifyBoundingBoxDiagonal()
Scale Boundingbox Diagonal to unit size.
Definition: MovePlugin.cc:1909
ACG::Matrix4x4d getLastManipulatorMatrix(bool _reset=true)
Get the Matrix of the last active Manipulator ( Identity if not found or hidden Manipulator ) ...
Definition: MovePlugin.cc:2194
Unificationtype
stores the current axes in the tool
Definition: MovePlugin.hh:205
ManipulatorMode
enum to define the manipulator mode
void updateManipulatorDialog()
Update the Dialog with the last clicked manipulator.
Definition: MovePlugin.cc:2058
void slotPickToolbarAction(QAction *_action)
Called by pick Toolbar.
Definition: MovePlugin.cc:2146
void setManipulatorDirection(int _objectId, Vector _directionX, Vector _directionY)
Set the direction of the manipulator.
void translateVertexSelection(int _objectId, Vector _vector)
translate current vertex selection of an Object by a given vector
movePropsWidget * getDialogFromButton(QPushButton *_but)
Get parent properties dialog widget of QPushButton but.
Definition: MovePlugin.cc:1029
void slotUpdateContextMenuNode(int _nodeId)
Hide context menu entry when right clicking on node other than manipulator node.
Definition: MovePlugin.cc:755
QString description()
Description of the Plugin.
Definition: MovePlugin.hh:193
QAction * toAllTargets_
Checked if transformation should be applied to all target objs.
Definition: MovePlugin.hh:492
void setPickModeProps(movePropsWidget *_pW, const std::string &_pickmode)
List of properties dialogs (each corresponding to one manipulator)
Definition: MovePlugin.cc:498
void unifyBoundingBox(Unificationtype u)
Size for the manipulators.
Definition: MovePlugin.cc:1924
void objectRenderingMatrixTranslate(int _objectId, Vector _translation)
Adds a scaling factor to the Object rendering Matrix in the scenegraph.
void slotTranslation()
perform a translation for Manipulator in tab
Definition: MovePlugin.cc:1240
QAction * resizeAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:303
void getBB(MeshT &_mesh, ACG::Vec3d &_bb_min, ACG::Vec3d &_bb_max)
get bounding box diagonal of a mesh
Definition: MovePlugin.cc:2502
QAction * placeAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:300
std::vector< int > IdList
Standard Type for id Lists used for scripting.
Definition: DataTypes.hh:192
OpenMesh::Vec3d getNearestVertex(MeshType *_mesh, uint _fh, OpenMesh::Vec3d &_hitPoint)
Get closest vertex to hitpoint.
Definition: MovePlugin.cc:2649
Matrix4x4 getObjectRenderingMatrix(int _objectId)
Gets the Object Matrix in the scenegraph.
double manip_size_
Size for the manipulators.
Definition: MovePlugin.hh:407
void slotMoveManipToCOG()
Move the current manipulator to the cog of the object.
Definition: MovePlugin.cc:1367
void ManipulatorPositionChanged(QtTranslationManipulatorNode *_node)
update object when its manipulator changes position
Definition: MovePlugin.cc:834
Vector manipulatorDirectionX(int _objectId)
Get the x-direction of the manipulator.
QActionGroup * toolBarActions_
Called by Toolbar to enable move mode.
Definition: MovePlugin.hh:281
double manip_size_modifier_
Modifier for the Size (changed by Mousewheel Events)
Definition: MovePlugin.hh:410
void unifyBB(MeshT &_mesh, Unificationtype u=MovePlugin::DIAGONAL)
scale mesh to have a boundingboxdiagonal of one
Definition: MovePlugin.cc:2448
QAction * transformRefPoseManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:309
void setAllTargets(bool _state)
Sets whether all targets should be affected or not.
Definition: MovePlugin.cc:2639
Interface for all plugins which want to Load or Save files and create Objects.
int axisA_
stores the current axes in the tool
Definition: MovePlugin.hh:202
int lastActiveManipulator_
Stores the last manipulator which has been clicked ( used for the toolbox dialog) ...
Definition: MovePlugin.hh:413
OpenMesh::Vec3d getNearestFace(MeshType *_mesh, uint _fh, OpenMesh::Vec3d &_hitPoint)
Get closest face to hitpoint.
Definition: MovePlugin.cc:2726
void placeManip(QMouseEvent *_event, bool _snap=false)
Place and show the Manipulator.
Definition: MovePlugin.cc:865
void slotSetPosition()
Position of manipulator in tab changed.
Definition: MovePlugin.cc:1039
void translateFaceSelection(int _objectId, Vector _vector)
translate current face selection of an Object by a given vector
QAction * contextMenuManipControlsAction_
Action holding the context menu for toolbar replication.
Definition: MovePlugin.hh:498
void transform(int _objectId, Matrix4x4 _matrix)
transform an Object by a given matrix
QAction * rotateTranslateAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:301
void slotPickModeChanged(const std::string &_mode)
slot is called when the pickMode changed
Definition: MovePlugin.cc:528
const UpdateType UPDATE_ALL(UpdateTypeSet(1))
Identifier for all updates.
void transformHandleRegion(int _objectId, Matrix4x4 _matrix)
Transform handle region using the given transformation matrix.
QAction * biggerManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:305
QAction * contextActionHide_
Context menu entry to hide a manipulator.
Definition: MovePlugin.hh:489
Interface to call functions across plugins.
Definition: RPCInterface.hh:71
int axisB_
stores the current axes in the tool
Definition: MovePlugin.hh:203
moveToolbarWidget * tool_
Widget for Toolbox.
Definition: MovePlugin.hh:266
void showManipulators()
Checks if the manipulators should be visible or not.
Definition: MovePlugin.cc:985
Vector manipulatorDirectionY(int _objectId)
Get the y-direction of the manipulator.
void slotSetMoveMode(QAction *_action)
Called by Toolbar to enable move mode.
Definition: MovePlugin.cc:2121
Interface class for backup handling.
void slotEnableObjectMode()
stores the current axes in the tool
Definition: MovePlugin.cc:485
void objectRenderingMatrixIdentity(int _objectId)
Sets the Object Matrix in the scenegraph to identity.
void slotScale()
Scale (with values from Tab)
Definition: MovePlugin.cc:1585
void slotSetDirection()
Set Direction of manipulator in tab changed.
Definition: MovePlugin.cc:1159
QtTranslationManipulatorNode::ManipulatorMode manMode_
Holds the current manipulator mode.
Definition: MovePlugin.hh:430
Add a toolbox to OpenFlipper.
std::vector< int > activeManipulators_
Size for the manipulators.
Definition: MovePlugin.hh:330
Allow access to picking functions.