Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
QAction * moveSelectionAction_
Called by Toolbar to enable move mode.
Definition: MovePlugin.hh:279
QAction * placeAndSnapAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:312
Interface class from which all plugins have to be created.
void slotSetDirection()
Set Direction of manipulator in tab changed.
Definition: MovePlugin.cc:1150
void setManipulatorDirection(int _objectId, Vector _directionX, Vector _directionY)
Set the direction of the manipulator.
Keyboard Event Interface.
Definition: KeyInterface.hh:76
void slotMoveToOrigin()
Move target Meshes cog to the origin.
Definition: MovePlugin.cc:1707
Matrix4x4 getObjectRenderingMatrix(int _objectId)
Gets the Object Matrix in the scenegraph.
SelectionType selectionType_
Current SelectionType of SelectionPlugin.
Definition: MovePlugin.hh:442
Logtype
Log types for Message Window.
QActionGroup * toolBarActions_
Called by Toolbar to enable move mode.
Definition: MovePlugin.hh:281
QToolBar * pickToolbar_
Called by pick Toolbar.
Definition: MovePlugin.hh:298
void slotMoveManipToCOG()
Move the current manipulator to the cog of the object.
Definition: MovePlugin.cc:1358
void translateEdgeSelection(int _objectId, Vector _vector)
translate current edge selection of an Object by a given vector
void slotPickModeChanged(const std::string &_mode)
slot is called when the pickMode changed
Definition: MovePlugin.cc:524
bool transformFaceSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
Update type class.
Definition: UpdateType.hh:70
const UpdateType UPDATE_ALL(UpdateTypeSet(1))
Identifier for all updates.
void slotUnifyBoundingBoxAllAxis()
Scale all Boundingbox axis to unit size.
Definition: MovePlugin.cc:1867
QAction * transformRefPoseManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:309
void slotPickToolbarAction(QAction *_action)
Called by pick Toolbar.
Definition: MovePlugin.cc:2077
void slotTranslation()
perform a translation for Manipulator in tab
Definition: MovePlugin.cc:1231
void updateManipulatorDialog()
Update the Dialog with the last clicked manipulator.
Definition: MovePlugin.cc:1989
void placeManip(QMouseEvent *_event, bool _snap=false)
Place and show the Manipulator.
Definition: MovePlugin.cc:856
bool transformEdgeSelection(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.
Interface for all Plugins which do logging to the logging window of the framework.
void pluginsInitialized()
Initialization of the plugin when it is loaded by the core.
Definition: MovePlugin.cc:160
void objectRenderingMatrixScale(int _objectId, double _s)
Adds a scaling factor to the Object rendering Matrix in the scenegraph.
void setPickModeProps(movePropsWidget *_pW, const std::string &_pickmode)
List of properties dialogs (each corresponding to one manipulator)
Definition: MovePlugin.cc:494
void ManipulatorPositionChanged(QtTranslationManipulatorNode *_node)
update object when its manipulator changes position
Definition: MovePlugin.cc:825
Vector manipulatorPosition(int _objectId)
Get the position of the manipulator.
QList< movePropsWidget * > propsWindows_
List of properties dialogs (each corresponding to one manipulator)
Definition: MovePlugin.hh:483
Interface to call functions across plugins.
Definition: RPCInterface.hh:71
Vector manipulatorDirectionZ(int _objectId)
Get the z-direction of the manipulator.
bool transformedSelected_
stores if any selected elements where transformed
Definition: MovePlugin.hh:624
QAction * rotateManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:302
QAction * contextActionHide_
Context menu entry to hide a manipulator.
Definition: MovePlugin.hh:489
QAction * placeAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:300
MovePlugin()
Default Constructor.
Definition: MovePlugin.cc:86
QAction * contextAction_
Context menu entry for showing per manipulator settings.
Definition: MovePlugin.hh:486
QAction * fixChildManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:308
void objectRenderingMatrixIdentity(int _objectId)
Sets the Object Matrix in the scenegraph to identity.
QAction * moveAction_
Called by Toolbar to enable move mode.
Definition: MovePlugin.hh:278
movePropsWidget * getDialogWidget(BaseObjectData *_obj)
Get properties dialog widget that is attached to BaseDataObject obj.
Definition: MovePlugin.cc:2037
int axisA_
stores the current axes in the tool
Definition: MovePlugin.hh:202
void slotUnifyBoundingBoxLongestAxis()
Scale Boundingbox longest axis to unit size (keeps aspect ratio)
Definition: MovePlugin.cc:1862
void setAllTargets(bool _state)
Sets whether all targets should be affected or not.
Definition: MovePlugin.cc:2570
QAction * toAllTargets_
Checked if transformation should be applied to all target objs.
Definition: MovePlugin.hh:492
int lastActiveManipulator_
Stores the last manipulator which has been clicked ( used for the toolbox dialog) ...
Definition: MovePlugin.hh:413
int axisB_
stores the current axes in the tool
Definition: MovePlugin.hh:203
OpenMesh::Vec3d getNearestFace(MeshType *_mesh, uint _fh, OpenMesh::Vec3d &_hitPoint)
Get closest face to hitpoint.
Definition: MovePlugin.cc:2657
OpenMesh::Vec3d getNearestEdge(MeshType *_mesh, uint _fh, OpenMesh::Vec3d &_hitPoint)
Get closest edge to hitpoint.
Definition: MovePlugin.cc:2612
void translateFaceSelection(int _objectId, Vector _vector)
translate current face selection of an Object by a given vector
std::vector< int > IdList
Standard Type for id Lists used for scripting.
Definition: DataTypes.hh:192
QAction * rotateTranslateAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:301
QString name()
Name of the Plugin.
Definition: MovePlugin.hh:190
QToolBar * toolbar_
Called by Toolbar to enable move mode.
Definition: MovePlugin.hh:283
void transformHandleRegion(int _objectId, Matrix4x4 _matrix)
Transform handle region using the given transformation matrix.
QMenu * contextMenuManipControl_
Additional Context Menu replicating the toolbar stuff.
Definition: MovePlugin.hh:495
bool transformVertexSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
QAction * resizeAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:303
Add a toolbox to OpenFlipper.
Interface for all Plugins which provide scriptable Functions.
void updateSelectionType()
Get current primitive selection.
Definition: MovePlugin.cc:2498
void slotMouseEvent(QMouseEvent *_event)
MousePress event occured.
Definition: MovePlugin.cc:399
void setManipMode(QtTranslationManipulatorNode::ManipulatorMode _mode)
Set the manipulator manipulation mode.
Definition: MovePlugin.cc:665
QAction * biggerManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:305
void objectRenderingMatrixRotate(int _objectId, Vector _axis, double _angle)
Adds a scaling factor to the Object rendering Matrix in the scenegraph.
void slotEnableSelectionMode()
stores the current axes in the tool
Definition: MovePlugin.cc:475
void showManipulators()
Checks if the manipulators should be visible or not.
Definition: MovePlugin.cc:976
void moveObject(ACG::Matrix4x4d mat, int _id)
Move an object with given id.
Definition: MovePlugin.cc:573
Vector manipulatorDirectionX(int _objectId)
Get the x-direction of the manipulator.
void transform(int _objectId, Matrix4x4 _matrix)
transform an Object by a given matrix
void slotScale()
Scale (with values from Tab)
Definition: MovePlugin.cc:1564
void slotToggleAxisB()
Toggle the second axis for changing direction in tab.
Definition: MovePlugin.cc:1125
OpenMesh::Vec3d getNearestVertex(MeshType *_mesh, uint _fh, OpenMesh::Vec3d &_hitPoint)
Get closest vertex to hitpoint.
Definition: MovePlugin.cc:2580
void slotUnifyBoundingBoxDiagonal()
Scale Boundingbox Diagonal to unit size.
Definition: MovePlugin.cc:1857
void showProps()
Show properties of move manipulator in a dialog ( Called via context for picking. Get the picked id f...
Interface for all plugins which want to Load or Save files and create Objects.
void slotSetPosition()
Position of manipulator in tab changed.
Definition: MovePlugin.cc:1030
void slotSetMoveMode(QAction *_action)
Called by Toolbar to enable move mode.
Definition: MovePlugin.cc:2052
ACG::Matrix4x4d getLastManipulatorMatrix(bool _reset=true)
Get the Matrix of the last active Manipulator ( Identity if not found or hidden Manipulator ) ...
Definition: MovePlugin.cc:2125
void translateVertexSelection(int _objectId, Vector _vector)
translate current vertex selection of an Object by a given vector
moveToolbarWidget * tool_
Widget for Toolbox.
Definition: MovePlugin.hh:266
Allow access to picking functions.
void objectRenderingMatrixTranslate(int _objectId, Vector _translation)
Adds a scaling factor to the Object rendering Matrix in the scenegraph.
void slotProjectToTangentPlane()
Project the current manipulator onto the tangent plane of the object.
Definition: MovePlugin.cc:1336
Interface class for backup handling.
void manipulatorMoved(QtTranslationManipulatorNode *_node, QMouseEvent *_event)
move the object when its manipulator moves
Definition: MovePlugin.cc:767
double manip_size_modifier_
Modifier for the Size (changed by Mousewheel Events)
Definition: MovePlugin.hh:410
Interface class for creating custom context menus.
Interface class for receiving mouse events.
bool toolboxActive_
True if the toolbox widget is active.
Definition: MovePlugin.hh:263
void slotEnableObjectMode()
stores the current axes in the tool
Definition: MovePlugin.cc:481
double manip_size_
Size for the manipulators.
Definition: MovePlugin.hh:407
Plugins can add its own toolbox to the main widget's toolbox area by using this interface.
QAction * currentPoseManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:310
QActionGroup * pickToolBarActions_
Called by pick Toolbar.
Definition: MovePlugin.hh:314
void moveSelection(ACG::Matrix4x4d mat, int _id, QEvent::Type _type)
Move selection on an object with given id.
Definition: MovePlugin.cc:632
void slotRotate()
Rotate Manipulator (with values from Tab)
Definition: MovePlugin.cc:1416
std::vector< int > activeManipulators_
Size for the manipulators.
Definition: MovePlugin.hh:330
void slotUpdateContextMenuNode(int _nodeId)
Hide context menu entry when right clicking on node other than manipulator node.
Definition: MovePlugin.cc:746
void hideManipulator()
Hide the manipulator( Called via context for picking. Get the picked id from the Qvariant attached to...
Vector manipulatorDirectionY(int _objectId)
Get the y-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:2433
QAction * contextMenuManipControlsAction_
Action holding the context menu for toolbar replication.
Definition: MovePlugin.hh:498
bool transformCellSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
void setDescriptions()
Set Descriptions for scriptable functions.
void slotToggleAxisA()
Toggle the first axis for changing direction in tab.
Definition: MovePlugin.cc:1100
QtTranslationManipulatorNode::ManipulatorMode manMode_
Holds the current manipulator mode.
Definition: MovePlugin.hh:430
movePropsWidget * getDialogFromButton(QPushButton *_but)
Get parent properties dialog widget of QPushButton but.
Definition: MovePlugin.cc:1020
ManipulatorMode
enum to define the manipulator mode
QString description()
Description of the Plugin.
Definition: MovePlugin.hh:193
MoveObjectMarker objectMarker_
Object marker to dimm Objects during manipulator transformation.
Definition: MovePlugin.hh:425
void unifyBB(MeshT &_mesh, Unificationtype u=MovePlugin::DIAGONAL)
scale mesh to have a boundingboxdiagonal of one
Definition: MovePlugin.cc:2379
QIcon * toolIcon_
stores the current axes in the tool
Definition: MovePlugin.hh:268
~MovePlugin()
Destructor.
Definition: MovePlugin.cc:129
void translate(int _objectId, Vector _vector)
translate an Object by a given vector
void unifyBoundingBox(Unificationtype u)
Size for the manipulators.
Definition: MovePlugin.cc:1872
void transformMesh(ACG::Matrix4x4d _mat, MeshT &_mesh)
Transform a mesh with the given transformation matrix.
Definition: MovePlugin.cc:2151
QAction * smallerManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:306
Unificationtype
stores the current axes in the tool
Definition: MovePlugin.hh:205