Developer Documentation

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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
56 #include <OpenFlipper/BasePlugin/BaseInterface.hh>
57 #include <OpenFlipper/BasePlugin/MouseInterface.hh>
58 #include <OpenFlipper/BasePlugin/KeyInterface.hh>
59 #include <OpenFlipper/BasePlugin/PickingInterface.hh>
60 #include <OpenFlipper/BasePlugin/ToolboxInterface.hh>
61 #include <OpenFlipper/BasePlugin/BackupInterface.hh>
62 #include <OpenFlipper/BasePlugin/LoggingInterface.hh>
63 #include <OpenFlipper/BasePlugin/ScriptInterface.hh>
64 #include <OpenFlipper/BasePlugin/ToolbarInterface.hh>
65 #include <OpenFlipper/BasePlugin/ContextMenuInterface.hh>
66 #include <OpenFlipper/BasePlugin/LoadSaveInterface.hh>
67 #include <OpenFlipper/BasePlugin/RPCInterface.hh>
68 #include <OpenFlipper/common/Types.hh>
69 #include <ObjectTypes/PolyMesh/PolyMesh.hh>
70 #include <ObjectTypes/Plane/Plane.hh>
71 #include <ObjectTypes/TriangleMesh/TriangleMesh.hh>
72
73 #ifdef ENABLE_SKELETON_SUPPORT
74 #include <ObjectTypes/Skeleton/Skeleton.hh>
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
87 class MovePlugin : public QObject, BaseInterface, MouseInterface, KeyInterface, PickingInterface, ToolboxInterface, BackupInterface, LoggingInterface, ScriptInterface,ToolbarInterface, ContextMenuInterface, LoadSaveInterface, RPCInterface
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
205 enum Unificationtype
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
230 void slotProjectToTangentPlane();
231
233 void slotMoveManipToCOG();
234
236 void slotRotate();
237
239 void slotScale();
240
241 void slotEnableSelectionMode();
242
243 void slotEnableObjectMode();
244
245 private:
246
248 void updateManipulatorDialog();
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
263 bool toolboxActive_;
264
266 moveToolbarWidget* tool_;
267
268 QIcon* toolIcon_;
269
272 //===========================================================================
275 //===========================================================================
276
277 private :
278 QAction* moveAction_;
279 QAction* moveSelectionAction_;
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_;
301 QAction* rotateTranslateAction_;
302 QAction* rotateManipAction_;
303 QAction* resizeAction_;
304
305 QAction* biggerManipAction_;
306 QAction* smallerManipAction_;
307
308 QAction* fixChildManipAction_;
309 QAction* transformRefPoseManipAction_;
310 QAction* currentPoseManipAction_;
311
312 QAction* placeAndSnapAction_;
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
338 void ManipulatorPositionChanged(QtTranslationManipulatorNode* _node );
339
340 private:
341
342 void unifyBoundingBox(Unificationtype u);
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
410 double manip_size_modifier_;
411
413 int lastActiveManipulator_;
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
425 MoveObjectMarker objectMarker_;
426
427 private:
428
430 QtTranslationManipulatorNode::ManipulatorMode manMode_;
431
432 void setManipMode (QtTranslationManipulatorNode::ManipulatorMode _mode);
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
468 movePropsWidget* getDialogWidget(BaseObjectData* _obj);
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
489 QAction* contextActionHide_;
490
492 QAction* toAllTargets_;
493
495 QMenu* contextMenuManipControl_;
496
498 QAction* contextMenuManipControlsAction_;
499
502 //===========================================================================
505 //===========================================================================
506
507 public slots :
508
510 void slotMoveToOrigin();
511
513 void slotUnifyBoundingBoxDiagonal();
514
516 void slotUnifyBoundingBoxLongestAxis();
517
519 void slotUnifyBoundingBoxAllAxis();
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
624 bool transformedSelected_;
625 };
626
627 #endif //MOVEPLUGIN_HH
MovePlugin::moveSelectionAction_
QAction * moveSelectionAction_
Called by Toolbar to enable move mode.
Definition: MovePlugin.hh:279
MovePlugin::placeAndSnapAction_
QAction * placeAndSnapAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:312
BaseInterface
Interface class from which all plugins have to be created.
Definition: BaseInterface.hh:76
MovePlugin::slotSetDirection
void slotSetDirection()
Set Direction of manipulator in tab changed.
Definition: MovePlugin.cc:1150
MovePlugin::setManipulatorDirection
void setManipulatorDirection(int _objectId, Vector _directionX, Vector _directionY)
Set the direction of the manipulator.
Definition: MovePluginScript.cc:1637
KeyInterface
Keyboard Event Interface.
Definition: KeyInterface.hh:76
MovePlugin::slotMoveToOrigin
void slotMoveToOrigin()
Move target Meshes cog to the origin.
Definition: MovePlugin.cc:1707
MovePlugin::getObjectRenderingMatrix
Matrix4x4 getObjectRenderingMatrix(int _objectId)
Gets the Object Matrix in the scenegraph.
Definition: MovePluginScript.cc:1780
MovePlugin::selectionType_
SelectionType selectionType_
Current SelectionType of SelectionPlugin.
Definition: MovePlugin.hh:442
Logtype
Logtype
Log types for Message Window.
Definition: LoggingInterface.hh:103
MovePlugin::toolBarActions_
QActionGroup * toolBarActions_
Called by Toolbar to enable move mode.
Definition: MovePlugin.hh:281
MovePlugin::pickToolbar_
QToolBar * pickToolbar_
Called by pick Toolbar.
Definition: MovePlugin.hh:298
ToolbarInterface.hh
MovePlugin::slotMoveManipToCOG
void slotMoveManipToCOG()
Move the current manipulator to the cog of the object.
Definition: MovePlugin.cc:1358
BackupInterface.hh
MovePlugin::translateEdgeSelection
void translateEdgeSelection(int _objectId, Vector _vector)
translate current edge selection of an Object by a given vector
Definition: MovePluginScript.cc:584
BaseObjectData
Definition: BaseObjectData.hh:105
MovePlugin::slotPickModeChanged
void slotPickModeChanged(const std::string &_mode)
slot is called when the pickMode changed
Definition: MovePlugin.cc:524
TriangleMesh.hh
MovePlugin::transformFaceSelection
bool transformFaceSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
Definition: MovePluginScript.cc:1092
UpdateType
Update type class.
Definition: UpdateType.hh:70
UPDATE_ALL
const UpdateType UPDATE_ALL(UpdateTypeSet(1))
Identifier for all updates.
MovePlugin::slotUnifyBoundingBoxAllAxis
void slotUnifyBoundingBoxAllAxis()
Scale all Boundingbox axis to unit size.
Definition: MovePlugin.cc:1867
MovePlugin::transformRefPoseManipAction_
QAction * transformRefPoseManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:309
moveToolbarWidget
Definition: MoveToolbar.hh:58
MovePlugin::slotPickToolbarAction
void slotPickToolbarAction(QAction *_action)
Called by pick Toolbar.
Definition: MovePlugin.cc:2077
MovePlugin
Definition: MovePlugin.hh:87
LoggingInterface.hh
MovePlugin::slotTranslation
void slotTranslation()
perform a translation for Manipulator in tab
Definition: MovePlugin.cc:1231
MovePlugin::updateManipulatorDialog
void updateManipulatorDialog()
Update the Dialog with the last clicked manipulator.
Definition: MovePlugin.cc:1989
MovePlugin::placeManip
void placeManip(QMouseEvent *_event, bool _snap=false)
Place and show the Manipulator.
Definition: MovePlugin.cc:856
MovePlugin::transformEdgeSelection
bool transformEdgeSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
Definition: MovePluginScript.cc:1272
KeyInterface.hh
MovePlugin::setManipulatorPosition
void setManipulatorPosition(int _objectId, Vector _position)
Set the position of the manipulator.
Definition: MovePluginScript.cc:1573
LoggingInterface
Interface for all Plugins which do logging to the logging window of the framework.
Definition: LoggingInterface.hh:123
MovePlugin::pluginsInitialized
void pluginsInitialized()
Initialization of the plugin when it is loaded by the core.
Definition: MovePlugin.cc:160
MovePlugin::objectRenderingMatrixScale
void objectRenderingMatrixScale(int _objectId, double _s)
Adds a scaling factor to the Object rendering Matrix in the scenegraph.
Definition: MovePluginScript.cc:1735
MovePlugin::setPickModeProps
void setPickModeProps(movePropsWidget *_pW, const std::string &_pickmode)
List of properties dialogs (each corresponding to one manipulator)
Definition: MovePlugin.cc:494
MovePlugin::ManipulatorPositionChanged
void ManipulatorPositionChanged(QtTranslationManipulatorNode *_node)
update object when its manipulator changes position
Definition: MovePlugin.cc:825
MovePlugin::manipulatorPosition
Vector manipulatorPosition(int _objectId)
Get the position of the manipulator.
Definition: MovePluginScript.cc:1617
MouseInterface.hh
MovePlugin::propsWindows_
QList< movePropsWidget * > propsWindows_
List of properties dialogs (each corresponding to one manipulator)
Definition: MovePlugin.hh:483
RPCInterface
Interface to call functions across plugins.
Definition: RPCInterface.hh:71
MovePlugin::manipulatorDirectionZ
Vector manipulatorDirectionZ(int _objectId)
Get the z-direction of the manipulator.
Definition: MovePluginScript.cc:1707
MovePlugin::transformedSelected_
bool transformedSelected_
stores if any selected elements where transformed
Definition: MovePlugin.hh:624
MovePlugin::rotateManipAction_
QAction * rotateManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:302
MovePlugin::contextActionHide_
QAction * contextActionHide_
Context menu entry to hide a manipulator.
Definition: MovePlugin.hh:489
MovePlugin::placeAction_
QAction * placeAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:300
MovePlugin::MovePlugin
MovePlugin()
Default Constructor.
Definition: MovePlugin.cc:86
MovePlugin::contextAction_
QAction * contextAction_
Context menu entry for showing per manipulator settings.
Definition: MovePlugin.hh:486
MovePlugin::fixChildManipAction_
QAction * fixChildManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:308
MovePlugin::objectRenderingMatrixIdentity
void objectRenderingMatrixIdentity(int _objectId)
Sets the Object Matrix in the scenegraph to identity.
Definition: MovePluginScript.cc:1720
MovePlugin::moveAction_
QAction * moveAction_
Called by Toolbar to enable move mode.
Definition: MovePlugin.hh:278
MovePlugin::getDialogWidget
movePropsWidget * getDialogWidget(BaseObjectData *_obj)
Get properties dialog widget that is attached to BaseDataObject obj.
Definition: MovePlugin.cc:2037
ACG::SceneGraph::QtTranslationManipulatorNode
Definition: QtTranslationManipulatorNode.hh:87
movePropsWidget
Definition: MoveProps.hh:60
MovePlugin::axisA_
int axisA_
stores the current axes in the tool
Definition: MovePlugin.hh:202
MovePlugin::slotUnifyBoundingBoxLongestAxis
void slotUnifyBoundingBoxLongestAxis()
Scale Boundingbox longest axis to unit size (keeps aspect ratio)
Definition: MovePlugin.cc:1862
MovePlugin::setAllTargets
void setAllTargets(bool _state)
Sets whether all targets should be affected or not.
Definition: MovePlugin.cc:2570
MoveObjectMarker
Definition: MoveObjectMarker.hh:58
MovePlugin::toAllTargets_
QAction * toAllTargets_
Checked if transformation should be applied to all target objs.
Definition: MovePlugin.hh:492
Skeleton.hh
MovePlugin::lastActiveManipulator_
int lastActiveManipulator_
Stores the last manipulator which has been clicked ( used for the toolbox dialog) ...
Definition: MovePlugin.hh:413
MovePlugin::axisB_
int axisB_
stores the current axes in the tool
Definition: MovePlugin.hh:203
MovePlugin::getNearestFace
OpenMesh::Vec3d getNearestFace(MeshType *_mesh, uint _fh, OpenMesh::Vec3d &_hitPoint)
Get closest face to hitpoint.
Definition: MovePlugin.cc:2657
MovePlugin::getNearestEdge
OpenMesh::Vec3d getNearestEdge(MeshType *_mesh, uint _fh, OpenMesh::Vec3d &_hitPoint)
Get closest edge to hitpoint.
Definition: MovePlugin.cc:2612
LoadSaveInterface.hh
MovePlugin::translateFaceSelection
void translateFaceSelection(int _objectId, Vector _vector)
translate current face selection of an Object by a given vector
Definition: MovePluginScript.cc:452
IdList
std::vector< int > IdList
Standard Type for id Lists used for scripting.
Definition: DataTypes.hh:192
MovePlugin::rotateTranslateAction_
QAction * rotateTranslateAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:301
MovePlugin::name
QString name()
Name of the Plugin.
Definition: MovePlugin.hh:190
MovePlugin::toolbar_
QToolBar * toolbar_
Called by Toolbar to enable move mode.
Definition: MovePlugin.hh:283
ContextMenuType
ContextMenuType
Definition: ContextMenuInterface.hh:72
MovePlugin::transformHandleRegion
void transformHandleRegion(int _objectId, Matrix4x4 _matrix)
Transform handle region using the given transformation matrix.
Definition: MovePluginScript.cc:715
MovePlugin::contextMenuManipControl_
QMenu * contextMenuManipControl_
Additional Context Menu replicating the toolbar stuff.
Definition: MovePlugin.hh:495
MovePlugin::transformVertexSelection
bool transformVertexSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
Definition: MovePluginScript.cc:962
OpenMesh::VectorT
Definition: Vector11T.hh:83
MovePlugin::resizeAction_
QAction * resizeAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:303
ToolbarInterface
Add a toolbox to OpenFlipper.
Definition: ToolbarInterface.hh:79
ScriptInterface
Interface for all Plugins which provide scriptable Functions.
Definition: ScriptInterface.hh:67
MovePlugin::updateSelectionType
void updateSelectionType()
Get current primitive selection.
Definition: MovePlugin.cc:2498
MovePlugin::slotMouseEvent
void slotMouseEvent(QMouseEvent *_event)
MousePress event occured.
Definition: MovePlugin.cc:399
MovePlugin::setManipMode
void setManipMode(QtTranslationManipulatorNode::ManipulatorMode _mode)
Set the manipulator manipulation mode.
Definition: MovePlugin.cc:665
SkeletonT
Definition: JointT.hh:56
MovePlugin::biggerManipAction_
QAction * biggerManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:305
ContextMenuInterface.hh
MovePlugin::objectRenderingMatrixRotate
void objectRenderingMatrixRotate(int _objectId, Vector _axis, double _angle)
Adds a scaling factor to the Object rendering Matrix in the scenegraph.
Definition: MovePluginScript.cc:1765
MovePlugin::slotEnableSelectionMode
void slotEnableSelectionMode()
stores the current axes in the tool
Definition: MovePlugin.cc:475
MovePlugin::showManipulators
void showManipulators()
Checks if the manipulators should be visible or not.
Definition: MovePlugin.cc:976
MovePlugin::moveObject
void moveObject(ACG::Matrix4x4d mat, int _id)
Move an object with given id.
Definition: MovePlugin.cc:573
MovePlugin::manipulatorDirectionX
Vector manipulatorDirectionX(int _objectId)
Get the x-direction of the manipulator.
Definition: MovePluginScript.cc:1669
RPCInterface.hh
MovePlugin::transform
void transform(int _objectId, Matrix4x4 _matrix)
transform an Object by a given matrix
Definition: MovePluginScript.cc:746
MovePlugin::slotScale
void slotScale()
Scale (with values from Tab)
Definition: MovePlugin.cc:1564
MovePlugin::slotToggleAxisB
void slotToggleAxisB()
Toggle the second axis for changing direction in tab.
Definition: MovePlugin.cc:1125
MovePlugin::getNearestVertex
OpenMesh::Vec3d getNearestVertex(MeshType *_mesh, uint _fh, OpenMesh::Vec3d &_hitPoint)
Get closest vertex to hitpoint.
Definition: MovePlugin.cc:2580
MovePlugin::slotUnifyBoundingBoxDiagonal
void slotUnifyBoundingBoxDiagonal()
Scale Boundingbox Diagonal to unit size.
Definition: MovePlugin.cc:1857
MovePlugin::showProps
void showProps()
Show properties of move manipulator in a dialog ( Called via context for picking. Get the picked id f...
Definition: MoveContextMenu.cc:94
LoadSaveInterface
Interface for all plugins which want to Load or Save files and create Objects.
Definition: LoadSaveInterface.hh:68
MovePlugin::slotSetPosition
void slotSetPosition()
Position of manipulator in tab changed.
Definition: MovePlugin.cc:1030
MovePlugin::slotSetMoveMode
void slotSetMoveMode(QAction *_action)
Called by Toolbar to enable move mode.
Definition: MovePlugin.cc:2052
MovePlugin::getLastManipulatorMatrix
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
MovePlugin::translateVertexSelection
void translateVertexSelection(int _objectId, Vector _vector)
translate current vertex selection of an Object by a given vector
Definition: MovePluginScript.cc:342
MovePlugin::tool_
moveToolbarWidget * tool_
Widget for Toolbox.
Definition: MovePlugin.hh:266
PolyMesh.hh
PickingInterface
Allow access to picking functions.
Definition: PickingInterface.hh:81
MovePlugin::objectRenderingMatrixTranslate
void objectRenderingMatrixTranslate(int _objectId, Vector _translation)
Adds a scaling factor to the Object rendering Matrix in the scenegraph.
Definition: MovePluginScript.cc:1750
MovePlugin::slotProjectToTangentPlane
void slotProjectToTangentPlane()
Project the current manipulator onto the tangent plane of the object.
Definition: MovePlugin.cc:1336
PickingInterface.hh
BackupInterface
Interface class for backup handling.
Definition: BackupInterface.hh:75
MovePlugin::manipulatorMoved
void manipulatorMoved(QtTranslationManipulatorNode *_node, QMouseEvent *_event)
move the object when its manipulator moves
Definition: MovePlugin.cc:767
MovePlugin::manip_size_modifier_
double manip_size_modifier_
Modifier for the Size (changed by Mousewheel Events)
Definition: MovePlugin.hh:410
ScriptInterface.hh
BaseInterface.hh
ContextMenuInterface
Interface class for creating custom context menus.
Definition: ContextMenuInterface.hh:101
MouseInterface
Interface class for receiving mouse events.
Definition: MouseInterface.hh:75
MovePlugin::toolboxActive_
bool toolboxActive_
True if the toolbox widget is active.
Definition: MovePlugin.hh:263
MovePlugin::slotEnableObjectMode
void slotEnableObjectMode()
stores the current axes in the tool
Definition: MovePlugin.cc:481
MovePlugin::manip_size_
double manip_size_
Size for the manipulators.
Definition: MovePlugin.hh:407
ToolboxInterface
Plugins can add its own toolbox to the main widget's toolbox area by using this interface.
Definition: ToolboxInterface.hh:85
MovePlugin::currentPoseManipAction_
QAction * currentPoseManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:310
MovePlugin::pickToolBarActions_
QActionGroup * pickToolBarActions_
Called by pick Toolbar.
Definition: MovePlugin.hh:314
MovePlugin::moveSelection
void moveSelection(ACG::Matrix4x4d mat, int _id, QEvent::Type _type)
Move selection on an object with given id.
Definition: MovePlugin.cc:632
MovePlugin::slotRotate
void slotRotate()
Rotate Manipulator (with values from Tab)
Definition: MovePlugin.cc:1416
Plane.hh
MovePlugin::activeManipulators_
std::vector< int > activeManipulators_
Size for the manipulators.
Definition: MovePlugin.hh:330
MovePlugin::slotUpdateContextMenuNode
void slotUpdateContextMenuNode(int _nodeId)
Hide context menu entry when right clicking on node other than manipulator node.
Definition: MovePlugin.cc:746
Types.hh
MovePlugin::hideManipulator
void hideManipulator()
Hide the manipulator( Called via context for picking. Get the picked id from the Qvariant attached to...
Definition: MoveContextMenu.cc:55
MovePlugin::manipulatorDirectionY
Vector manipulatorDirectionY(int _objectId)
Get the y-direction of the manipulator.
Definition: MovePluginScript.cc:1688
MovePlugin::getBB
void getBB(MeshT &_mesh, ACG::Vec3d &_bb_min, ACG::Vec3d &_bb_max)
get bounding box diagonal of a mesh
Definition: MovePlugin.cc:2433
MovePlugin::contextMenuManipControlsAction_
QAction * contextMenuManipControlsAction_
Action holding the context menu for toolbar replication.
Definition: MovePlugin.hh:498
MovePlugin::transformCellSelection
bool transformCellSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
Definition: MovePluginScript.cc:1471
MovePlugin::setDescriptions
void setDescriptions()
Set Descriptions for scriptable functions.
Definition: MovePluginScript.cc:70
MovePlugin::slotToggleAxisA
void slotToggleAxisA()
Toggle the first axis for changing direction in tab.
Definition: MovePlugin.cc:1100
MovePlugin::manMode_
QtTranslationManipulatorNode::ManipulatorMode manMode_
Holds the current manipulator mode.
Definition: MovePlugin.hh:430
MovePlugin::getDialogFromButton
movePropsWidget * getDialogFromButton(QPushButton *_but)
Get parent properties dialog widget of QPushButton but.
Definition: MovePlugin.cc:1020
ACG::SceneGraph::TranslationManipulatorNode::ManipulatorMode
ManipulatorMode
enum to define the manipulator mode
Definition: TranslationManipulatorNode.hh:108
MovePlugin::description
QString description()
Description of the Plugin.
Definition: MovePlugin.hh:193
ToolboxInterface.hh
MovePlugin::objectMarker_
MoveObjectMarker objectMarker_
Object marker to dimm Objects during manipulator transformation.
Definition: MovePlugin.hh:425
ACG::Matrix4x4T< double >
MovePlugin::unifyBB
void unifyBB(MeshT &_mesh, Unificationtype u=MovePlugin::DIAGONAL)
scale mesh to have a boundingboxdiagonal of one
Definition: MovePlugin.cc:2379
MovePlugin::toolIcon_
QIcon * toolIcon_
stores the current axes in the tool
Definition: MovePlugin.hh:268
MovePlugin::~MovePlugin
~MovePlugin()
Destructor.
Definition: MovePlugin.cc:129
OpenVolumeMesh::NormalAttrib< VolumeMeshT >
MovePlugin::translate
void translate(int _objectId, Vector _vector)
translate an Object by a given vector
Definition: MovePluginScript.cc:163
MovePlugin::unifyBoundingBox
void unifyBoundingBox(Unificationtype u)
Size for the manipulators.
Definition: MovePlugin.cc:1872
MovePlugin::transformMesh
void transformMesh(ACG::Matrix4x4d _mat, MeshT &_mesh)
Transform a mesh with the given transformation matrix.
Definition: MovePlugin.cc:2151
MovePlugin::smallerManipAction_
QAction * smallerManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:306
MovePlugin::Unificationtype
Unificationtype
stores the current axes in the tool
Definition: MovePlugin.hh:205