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
47 #include <OpenFlipper/BasePlugin/BaseInterface.hh>
48 #include <OpenFlipper/BasePlugin/MouseInterface.hh>
49 #include <OpenFlipper/BasePlugin/KeyInterface.hh>
50 #include <OpenFlipper/BasePlugin/PickingInterface.hh>
51 #include <OpenFlipper/BasePlugin/ToolboxInterface.hh>
52 #include <OpenFlipper/BasePlugin/BackupInterface.hh>
53 #include <OpenFlipper/BasePlugin/LoggingInterface.hh>
54 #include <OpenFlipper/BasePlugin/ScriptInterface.hh>
55 #include <OpenFlipper/BasePlugin/ToolbarInterface.hh>
56 #include <OpenFlipper/BasePlugin/ContextMenuInterface.hh>
57 #include <OpenFlipper/BasePlugin/LoadSaveInterface.hh>
58 #include <OpenFlipper/BasePlugin/PythonInterface.hh>
59 #include <OpenFlipper/BasePlugin/RPCInterface.hh>
60 #include <OpenFlipper/common/Types.hh>
61 #include <ObjectTypes/PolyMesh/PolyMesh.hh>
62 #include <ObjectTypes/Plane/Plane.hh>
63 #include <ObjectTypes/TriangleMesh/TriangleMesh.hh>
64
65 #ifdef ENABLE_SKELETON_SUPPORT
66 #include <ObjectTypes/Skeleton/Skeleton.hh>
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
81 class MovePlugin : public QObject, BaseInterface, MouseInterface, KeyInterface, PickingInterface, ToolboxInterface, BackupInterface, LoggingInterface, ScriptInterface,ToolbarInterface, PythonInterface, ContextMenuInterface, LoadSaveInterface, RPCInterface
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
198 enum Unificationtype
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
223 void slotProjectToTangentPlane();
224
226 void slotMoveManipToCOG();
227
229 void slotRotate();
230
232 void slotScale();
233
234 void slotEnableSelectionMode();
235
236 void slotEnableObjectMode();
237
238 private:
239
241 void updateManipulatorDialog();
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
256 bool toolboxActive_;
257
259 moveToolbarWidget* tool_;
260
261 QIcon* toolIcon_;
262
265 //===========================================================================
268 //===========================================================================
269
270 private :
271 QAction* moveAction_;
272 QAction* moveSelectionAction_;
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_;
294 QAction* rotateTranslateAction_;
295 QAction* rotateManipAction_;
296 QAction* resizeAction_;
297
298 QAction* biggerManipAction_;
299 QAction* smallerManipAction_;
300
301 QAction* fixChildManipAction_;
302 QAction* transformRefPoseManipAction_;
303 QAction* currentPoseManipAction_;
304
305 QAction* placeAndSnapAction_;
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
331 void ManipulatorPositionChanged(QtTranslationManipulatorNode* _node );
332
333 private:
334
335 void unifyBoundingBox(Unificationtype u);
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
403 double manip_size_modifier_;
404
406 int lastActiveManipulator_;
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
418 MoveObjectMarker objectMarker_;
419
420 private:
421
423 QtTranslationManipulatorNode::ManipulatorMode manMode_;
424
425 void setManipMode (QtTranslationManipulatorNode::ManipulatorMode _mode);
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
461 movePropsWidget* getDialogWidget(BaseObjectData* _obj);
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
482 QAction* contextActionHide_;
483
485 QAction* toAllTargets_;
486
488 QMenu* contextMenuManipControl_;
489
491 QAction* contextMenuManipControlsAction_;
492
495 //===========================================================================
498 //===========================================================================
499
500 public slots :
501
503 void slotMoveToOrigin();
504
506 void slotUnifyBoundingBoxDiagonal();
507
509 void slotUnifyBoundingBoxLongestAxis();
510
512 void slotUnifyBoundingBoxAllAxis();
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
617 bool transformedSelected_;
618 };
619
MovePlugin::toolboxActive_
bool toolboxActive_
True if the toolbox widget is active.
Definition: MovePlugin.hh:256
MovePlugin::placeManip
void placeManip(QMouseEvent *_event, bool _snap=false)
Place and show the Manipulator.
Definition: MovePlugin.cc:863
MovePlugin::transformCellSelection
bool transformCellSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
Definition: MovePluginScript.cc:1608
MovePlugin::transformFaceSelection
bool transformFaceSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
Definition: MovePluginScript.cc:1164
ContextMenuInterface
Interface class for creating custom context menus.
Definition: ContextMenuInterface.hh:85
UpdateType
Update type class.
Definition: UpdateType.hh:60
RPCInterface
Interface to call functions across plugins.
Definition: RPCInterface.hh:61
UPDATE_ALL
const UpdateType UPDATE_ALL(UpdateTypeSet(1))
Identifier for all updates.
MovePlugin::resizeAction_
QAction * resizeAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:296
TriangleMesh.hh
MovePlugin::slotEnableSelectionMode
void slotEnableSelectionMode()
stores the current axes in the tool
Definition: MovePlugin.cc:476
MovePlugin::axisB_
int axisB_
stores the current axes in the tool
Definition: MovePlugin.hh:196
MovePlugin::biggerManipAction_
QAction * biggerManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:298
MovePlugin::slotToggleAxisB
void slotToggleAxisB()
Toggle the second axis for changing direction in tab.
Definition: MovePlugin.cc:1127
Skeleton.hh
Logtype
Logtype
Log types for Message Window.
Definition: LoggingInterface.hh:92
MouseInterface.hh
MovePlugin::setDescriptions
void setDescriptions()
Set Descriptions for scriptable functions.
Definition: MovePluginScript.cc:67
MovePlugin::updateSelectionType
void updateSelectionType()
Get current primitive selection.
Definition: MovePlugin.cc:2560
MovePlugin::name
QString name()
Name of the Plugin.
Definition: MovePlugin.hh:183
LoadSaveInterface
Interface for all plugins which want to Load or Save files and create Objects.
Definition: LoadSaveInterface.hh:59
MovePlugin::pickToolBarActions_
QActionGroup * pickToolBarActions_
Called by pick Toolbar.
Definition: MovePlugin.hh:307
ScriptInterface
Interface for all Plugins which provide scriptable Functions.
Definition: ScriptInterface.hh:58
MovePlugin::placeAction_
QAction * placeAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:293
MovePlugin::contextMenuManipControlsAction_
QAction * contextMenuManipControlsAction_
Action holding the context menu for toolbar replication.
Definition: MovePlugin.hh:491
LoggingInterface.hh
OpenVolumeMesh::NormalAttrib< VolumeMeshT >
SkeletonT
Definition: JointT.hh:50
MovePlugin::transform
void transform(int _objectId, Matrix4x4 _matrix)
transform an Object by a given matrix
Definition: MovePluginScript.cc:777
PickingInterface.hh
MovePlugin::updateManipulatorDialog
void updateManipulatorDialog()
Update the Dialog with the last clicked manipulator.
Definition: MovePlugin.cc:2051
ACG::SceneGraph::TranslationManipulatorNode::ManipulatorMode
ManipulatorMode
enum to define the manipulator mode
Definition: TranslationManipulatorNode.hh:107
MovePlugin::setPickModeProps
void setPickModeProps(movePropsWidget *_pW, const std::string &_pickmode)
List of properties dialogs (each corresponding to one manipulator)
Definition: MovePlugin.cc:495
MovePlugin::moveSelection
void moveSelection(ACG::Matrix4x4d mat, int _id, QEvent::Type _type)
Move selection on an object with given id.
Definition: MovePlugin.cc:638
MovePlugin::tool_
moveToolbarWidget * tool_
Widget for Toolbox.
Definition: MovePlugin.hh:259
MovePlugin::slotSetPosition
void slotSetPosition()
Position of manipulator in tab changed.
Definition: MovePlugin.cc:1032
MovePlugin::MovePlugin
MovePlugin()
Default Constructor.
Definition: MovePlugin.cc:82
MovePlugin::slotToggleAxisA
void slotToggleAxisA()
Toggle the first axis for changing direction in tab.
Definition: MovePlugin.cc:1102
MovePlugin::transformHandleRegion
void transformHandleRegion(int _objectId, Matrix4x4 _matrix)
Transform handle region using the given transformation matrix.
Definition: MovePluginScript.cc:746
MovePlugin::Unificationtype
Unificationtype
stores the current axes in the tool
Definition: MovePlugin.hh:198
MovePlugin::getDialogWidget
movePropsWidget * getDialogWidget(BaseObjectData *_obj)
Get properties dialog widget that is attached to BaseDataObject obj.
Definition: MovePlugin.cc:2099
MouseInterface
Interface class for receiving mouse events.
Definition: MouseInterface.hh:61
MovePlugin::manMode_
QtTranslationManipulatorNode::ManipulatorMode manMode_
Holds the current manipulator mode.
Definition: MovePlugin.hh:423
MovePlugin::manipulatorDirectionZ
Vector manipulatorDirectionZ(int _objectId)
Get the z-direction of the manipulator.
Definition: MovePluginScript.cc:1876
LoggingInterface
Interface for all Plugins which do logging to the logging window of the framework.
Definition: LoggingInterface.hh:112
MovePlugin::translate
void translate(int _objectId, Vector _vector)
translate an Object by a given vector
Definition: MovePluginScript.cc:160
MovePlugin::manipulatorDirectionX
Vector manipulatorDirectionX(int _objectId)
Get the x-direction of the manipulator.
Definition: MovePluginScript.cc:1838
MovePlugin::showManipulators
void showManipulators()
Checks if the manipulators should be visible or not.
Definition: MovePlugin.cc:978
MovePlugin::setManipMode
void setManipMode(QtTranslationManipulatorNode::ManipulatorMode _mode)
Set the manipulator manipulation mode.
Definition: MovePlugin.cc:671
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:88
MovePlugin::slotSetDirection
void slotSetDirection()
Set Direction of manipulator in tab changed.
Definition: MovePlugin.cc:1152
MovePlugin::manip_size_
double manip_size_
Size for the manipulators.
Definition: MovePlugin.hh:400
MovePlugin::pickToolbar_
QToolBar * pickToolbar_
Called by pick Toolbar.
Definition: MovePlugin.hh:291
BaseInterface.hh
MovePlugin::transformedSelected_
bool transformedSelected_
stores if any selected elements where transformed
Definition: MovePlugin.hh:617
movePropsWidget
Definition: MoveProps.hh:48
PickingInterface
Allow access to picking functions.
Definition: PickingInterface.hh:62
MovePlugin::propsWindows_
QList< movePropsWidget * > propsWindows_
List of properties dialogs (each corresponding to one manipulator)
Definition: MovePlugin.hh:476
MovePlugin::moveAction_
QAction * moveAction_
Called by Toolbar to enable move mode.
Definition: MovePlugin.hh:271
MovePlugin::getNearestFace
OpenMesh::Vec3d getNearestFace(MeshType *_mesh, uint _fh, OpenMesh::Vec3d &_hitPoint)
Get closest face to hitpoint.
Definition: MovePlugin.cc:2719
MovePlugin::axisA_
int axisA_
stores the current axes in the tool
Definition: MovePlugin.hh:195
MovePlugin::slotMoveToOrigin
void slotMoveToOrigin()
Move target Meshes cog to the origin.
Definition: MovePlugin.cc:1729
MovePlugin::objectMarker_
MoveObjectMarker objectMarker_
Object marker to dimm Objects during manipulator transformation.
Definition: MovePlugin.hh:418
MovePlugin::transformMesh
void transformMesh(ACG::Matrix4x4d _mat, MeshT &_mesh)
Transform a mesh with the given transformation matrix.
Definition: MovePlugin.cc:2213
KeyInterface.hh
MovePlugin::setManipulatorDirection
void setManipulatorDirection(int _objectId, Vector _directionX, Vector _directionY)
Set the direction of the manipulator.
Definition: MovePluginScript.cc:1806
MovePlugin::getBB
void getBB(MeshT &_mesh, ACG::Vec3d &_bb_min, ACG::Vec3d &_bb_max)
get bounding box diagonal of a mesh
Definition: MovePlugin.cc:2495
MovePlugin::toolBarActions_
QActionGroup * toolBarActions_
Called by Toolbar to enable move mode.
Definition: MovePlugin.hh:274
MovePlugin::slotScale
void slotScale()
Scale (with values from Tab)
Definition: MovePlugin.cc:1578
ContextMenuInterface.hh
MovePlugin::currentPoseManipAction_
QAction * currentPoseManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:303
ToolboxInterface
Plugins can add its own toolbox to the main widget&#39;s toolbox area by using this interface.
Definition: ToolboxInterface.hh:68
MovePlugin::toAllTargets_
QAction * toAllTargets_
Checked if transformation should be applied to all target objs.
Definition: MovePlugin.hh:485
IdList
std::vector< int > IdList
Standard Type for id Lists used for scripting.
Definition: DataTypes.hh:179
MovePlugin::slotProjectToTangentPlane
void slotProjectToTangentPlane()
Project the current manipulator onto the tangent plane of the object.
Definition: MovePlugin.cc:1338
MovePlugin::placeAndSnapAction_
QAction * placeAndSnapAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:305
ToolbarInterface.hh
MovePlugin::slotEnableObjectMode
void slotEnableObjectMode()
stores the current axes in the tool
Definition: MovePlugin.cc:482
MovePlugin::objectRenderingMatrixScale
void objectRenderingMatrixScale(int _objectId, double _s)
Adds a scaling factor to the Object rendering Matrix in the scenegraph.
Definition: MovePluginScript.cc:1904
MovePlugin::contextAction_
QAction * contextAction_
Context menu entry for showing per manipulator settings.
Definition: MovePlugin.hh:479
LoadSaveInterface.hh
MovePlugin::description
QString description()
Description of the Plugin.
Definition: MovePlugin.hh:186
MovePlugin::unifyBB
void unifyBB(MeshT &_mesh, Unificationtype u=MovePlugin::DIAGONAL)
scale mesh to have a boundingboxdiagonal of one
Definition: MovePlugin.cc:2441
MovePlugin::moveObject
void moveObject(ACG::Matrix4x4d mat, int _id)
Move an object with given id.
Definition: MovePlugin.cc:574
MovePlugin::rotateTranslateAction_
QAction * rotateTranslateAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:294
MovePlugin::transformVertexSelection
bool transformVertexSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
Definition: MovePluginScript.cc:1018
MovePlugin::objectRenderingMatrixIdentity
void objectRenderingMatrixIdentity(int _objectId)
Sets the Object Matrix in the scenegraph to identity.
Definition: MovePluginScript.cc:1889
BaseInterface
Interface class from which all plugins have to be created.
Definition: BaseInterface.hh:65
MovePlugin::smallerManipAction_
QAction * smallerManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:299
MovePlugin::slotUnifyBoundingBoxLongestAxis
void slotUnifyBoundingBoxLongestAxis()
Scale Boundingbox longest axis to unit size (keeps aspect ratio)
Definition: MovePlugin.cc:1907
MovePlugin::contextActionHide_
QAction * contextActionHide_
Context menu entry to hide a manipulator.
Definition: MovePlugin.hh:482
MovePlugin::ManipulatorPositionChanged
void ManipulatorPositionChanged(QtTranslationManipulatorNode *_node)
update object when its manipulator changes position
Definition: MovePlugin.cc:832
ToolboxInterface.hh
MovePlugin::slotTranslation
void slotTranslation()
perform a translation for Manipulator in tab
Definition: MovePlugin.cc:1233
ACG::SceneGraph::QtTranslationManipulatorNode
Definition: QtTranslationManipulatorNode.hh:81
MovePlugin::rotateManipAction_
QAction * rotateManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:295
MovePlugin::transformEdgeSelection
bool transformEdgeSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
Definition: MovePluginScript.cc:1376
MovePlugin::toolIcon_
QIcon * toolIcon_
stores the current axes in the tool
Definition: MovePlugin.hh:261
ACG::Matrix4x4T< double >
ToolbarInterface
Add a toolbox to OpenFlipper.
Definition: ToolbarInterface.hh:62
MovePlugin::translateFaceSelection
void translateFaceSelection(int _objectId, Vector _vector)
translate current face selection of an Object by a given vector
Definition: MovePluginScript.cc:483
MovePlugin::fixChildManipAction_
QAction * fixChildManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:301
MovePlugin::~MovePlugin
~MovePlugin()
Destructor.
Definition: MovePlugin.cc:125
BackupInterface.hh
PythonInterface.hh
MovePlugin::manipulatorMoved
void manipulatorMoved(QtTranslationManipulatorNode *_node, QMouseEvent *_event)
move the object when its manipulator moves
Definition: MovePlugin.cc:774
Types.hh
KeyInterface
Keyboard Event Interface.
Definition: KeyInterface.hh:59
MovePlugin::transformRefPoseManipAction_
QAction * transformRefPoseManipAction_
Called by pick Toolbar.
Definition: MovePlugin.hh:302
MovePlugin::slotMoveManipToCOG
void slotMoveManipToCOG()
Move the current manipulator to the cog of the object.
Definition: MovePlugin.cc:1360
MovePlugin::getDialogFromButton
movePropsWidget * getDialogFromButton(QPushButton *_but)
Get parent properties dialog widget of QPushButton but.
Definition: MovePlugin.cc:1022
MovePlugin::toolbar_
QToolBar * toolbar_
Called by Toolbar to enable move mode.
Definition: MovePlugin.hh:276
MovePlugin
Definition: MovePlugin.hh:81
MovePlugin::manip_size_modifier_
double manip_size_modifier_
Modifier for the Size (changed by Mousewheel Events)
Definition: MovePlugin.hh:403
OpenMesh::VectorT< double, 3 >
MovePlugin::hideManipulator
void hideManipulator()
Hide the manipulator( Called via context for picking. Get the picked id from the Qvariant attached to...
Definition: MoveContextMenu.cc:49
MovePlugin::setAllTargets
void setAllTargets(bool _state)
Sets whether all targets should be affected or not.
Definition: MovePlugin.cc:2632
MovePlugin::getNearestEdge
OpenMesh::Vec3d getNearestEdge(MeshType *_mesh, uint _fh, OpenMesh::Vec3d &_hitPoint)
Get closest edge to hitpoint.
Definition: MovePlugin.cc:2674
MovePlugin::slotPickToolbarAction
void slotPickToolbarAction(QAction *_action)
Called by pick Toolbar.
Definition: MovePlugin.cc:2139
Plane.hh
MovePlugin::slotUnifyBoundingBoxDiagonal
void slotUnifyBoundingBoxDiagonal()
Scale Boundingbox Diagonal to unit size.
Definition: MovePlugin.cc:1902
MovePlugin::selectionType_
SelectionType selectionType_
Current SelectionType of SelectionPlugin.
Definition: MovePlugin.hh:435
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:2187
MovePlugin::getNearestVertex
OpenMesh::Vec3d getNearestVertex(MeshType *_mesh, uint _fh, OpenMesh::Vec3d &_hitPoint)
Get closest vertex to hitpoint.
Definition: MovePlugin.cc:2642
MovePlugin::slotUpdateContextMenuNode
void slotUpdateContextMenuNode(int _nodeId)
Hide context menu entry when right clicking on node other than manipulator node.
Definition: MovePlugin.cc:753
BaseObjectData
Definition: BaseObjectData.hh:102
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:1934
moveToolbarWidget
Definition: MoveToolbar.hh:46
MovePlugin::activeManipulators_
std::vector< int > activeManipulators_
Size for the manipulators.
Definition: MovePlugin.hh:323
MovePlugin::translateEdgeSelection
void translateEdgeSelection(int _objectId, Vector _vector)
translate current edge selection of an Object by a given vector
Definition: MovePluginScript.cc:615
MovePlugin::lastActiveManipulator_
int lastActiveManipulator_
Stores the last manipulator which has been clicked ( used for the toolbox dialog) ...
Definition: MovePlugin.hh:406
MoveObjectMarker
Definition: MoveObjectMarker.hh:52
MovePlugin::slotSetMoveMode
void slotSetMoveMode(QAction *_action)
Called by Toolbar to enable move mode.
Definition: MovePlugin.cc:2114
MovePlugin::objectRenderingMatrixTranslate
void objectRenderingMatrixTranslate(int _objectId, Vector _translation)
Adds a scaling factor to the Object rendering Matrix in the scenegraph.
Definition: MovePluginScript.cc:1919
MovePlugin::slotRotate
void slotRotate()
Rotate Manipulator (with values from Tab)
Definition: MovePlugin.cc:1422
BackupInterface
Interface class for backup handling.
Definition: BackupInterface.hh:59
RPCInterface.hh
PythonInterface
Interface class for exporting functions to python.
Definition: PythonInterface.hh:58
MovePlugin::manipulatorDirectionY
Vector manipulatorDirectionY(int _objectId)
Get the y-direction of the manipulator.
Definition: MovePluginScript.cc:1857
MovePlugin::unifyBoundingBox
void unifyBoundingBox(Unificationtype u)
Size for the manipulators.
Definition: MovePlugin.cc:1917
PolyMesh.hh
MovePlugin::getObjectRenderingMatrix
Matrix4x4 getObjectRenderingMatrix(int _objectId)
Gets the Object Matrix in the scenegraph.
Definition: MovePluginScript.cc:1949
MovePlugin::setManipulatorPosition
void setManipulatorPosition(int _objectId, Vector _position)
Set the position of the manipulator.
Definition: MovePluginScript.cc:1742
MovePlugin::translateVertexSelection
void translateVertexSelection(int _objectId, Vector _vector)
translate current vertex selection of an Object by a given vector
Definition: MovePluginScript.cc:359
MovePlugin::slotPickModeChanged
void slotPickModeChanged(const std::string &_mode)
slot is called when the pickMode changed
Definition: MovePlugin.cc:525
MovePlugin::slotMouseEvent
void slotMouseEvent(QMouseEvent *_event)
MousePress event occured.
Definition: MovePlugin.cc:400
MovePlugin::contextMenuManipControl_
QMenu * contextMenuManipControl_
Additional Context Menu replicating the toolbar stuff.
Definition: MovePlugin.hh:488
ContextMenuType
ContextMenuType
Definition: ContextMenuInterface.hh:56
MovePlugin::slotUnifyBoundingBoxAllAxis
void slotUnifyBoundingBoxAllAxis()
Scale all Boundingbox axis to unit size.
Definition: MovePlugin.cc:1912
MovePlugin::pluginsInitialized
void pluginsInitialized()
Initialization of the plugin when it is loaded by the core.
Definition: MovePlugin.cc:156
ScriptInterface.hh
MovePlugin::manipulatorPosition
Vector manipulatorPosition(int _objectId)
Get the position of the manipulator.
Definition: MovePluginScript.cc:1786
MovePlugin::moveSelectionAction_
QAction * moveSelectionAction_
Called by Toolbar to enable move mode.
Definition: MovePlugin.hh:272