Developer Documentation

Public Types | Public Slots | Signals | Public Member Functions | Static Public Attributes | Private Slots | Private Member Functions | Private Attributes | List of all members
MovePlugin Class Reference

`#include <Plugin-Move/MovePlugin.hh>`

Inheritance diagram for MovePlugin:

## Public Types
typedef unsigned int | SelectionType

## Public Slots
QString | version ()
Scriptable Functions
void | slotMoveToOrigin ()
| Move target Meshes cog to the origin. More...
void | slotUnifyBoundingBoxDiagonal ()
| Scale Boundingbox Diagonal to unit size. More...
void | slotUnifyBoundingBoxLongestAxis ()
| Scale Boundingbox longest axis to unit size (keeps aspect ratio)
void | slotUnifyBoundingBoxAllAxis ()
| Scale all Boundingbox axis to unit size.
void | translate (int _objectId, Vector _vector)
| translate an Object by a given vector More...
void | translate (int _objectId, IdList _vHandles, Vector _vector)
| translate given vertices by a vector More...
void | translateVertexSelection (int _objectId, Vector _vector)
| translate current vertex selection of an Object by a given vector More...
void | translateFaceSelection (int _objectId, Vector _vector)
| translate current face selection of an Object by a given vector More...
void | translateEdgeSelection (int _objectId, Vector _vector)
| translate current edge selection of an Object by a given vector More...
void | transform (int _objectId, Matrix4x4 _matrix)
| transform an Object by a given matrix More...
void | transform (int _objectId, IdList _vHandles, Matrix4x4 _matrix)
| transform given vertices by a matrix More...
bool | transformVertexSelection (int _objectId, Matrix4x4 _matrix)
| transform current selection of an Object by a given matrix More...
bool | transformFaceSelection (int _objectId, Matrix4x4 _matrix)
| transform current selection of an Object by a given matrix More...
bool | transformEdgeSelection (int _objectId, Matrix4x4 _matrix)
| transform current selection of an Object by a given matrix More...
bool | transformCellSelection (int _objectId, Matrix4x4 _matrix)
| transform current selection of an Object by a given matrix More...
void | transformHandleRegion (int _objectId, Matrix4x4 _matrix)
| Transform handle region using the given transformation matrix.
void | setManipulatorPosition (int _objectId, Vector _position)
| Set the position of the manipulator. More...
Vector | manipulatorPosition (int _objectId)
| Get the position of the manipulator. More...
void | setManipulatorDirection (int _objectId, Vector _directionX, Vector _directionY)
| Set the direction of the manipulator. More...
Vector | manipulatorDirectionX (int _objectId)
| Get the x-direction of the manipulator. More...
Vector | manipulatorDirectionY (int _objectId)
| Get the y-direction of the manipulator. More...
Vector | manipulatorDirectionZ (int _objectId)
| Get the z-direction of the manipulator. More...
void | objectRenderingMatrixIdentity (int _objectId)
| Sets the Object Matrix in the scenegraph to identity.
void | objectRenderingMatrixScale (int _objectId, double _s)
| Adds a scaling factor to the Object rendering Matrix in the scenegraph. More...
void | objectRenderingMatrixTranslate (int _objectId, Vector _translation)
| Adds a scaling factor to the Object rendering Matrix in the scenegraph. More...
void | objectRenderingMatrixRotate (int _objectId, Vector _axis, double _angle)
| Adds a scaling factor to the Object rendering Matrix in the scenegraph. More...
Matrix4x4 | getObjectRenderingMatrix (int _objectId)
| Gets the Object Matrix in the scenegraph. More...

## Signals
void | updateView ()
void | updatedObject (int, const UpdateType &_type)
void | nodeVisibilityChanged (int)
void | addPickMode (const std::string &_mode)
void | addHiddenPickMode (const std::string &_mode)
void | setPickModeMouseTracking (const std::string &_mode, bool _mouseTracking)
void | setPickModeToolbar (const std::string &_mode, QToolBar *_toolbar)
void | addContextMenuItem (QAction *_action, ContextMenuType _type)
void | createBackup (int _objectid, QString _name, UpdateType _type=UPDATE_ALL)
void | log (Logtype _type, QString _message)
void | log (QString _message)
void | scriptInfo (QString _functionName)
void | setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
void | addToolbar (QToolBar *_toolbar)
void | getToolBar (QString _name, QToolBar *&_toolbar)
void | registerKey (int _key, Qt::KeyboardModifiers _modifiers, QString _description, bool _multiUse=false)
void | addToolbox (QString _name, QWidget *_widget, QIcon *_icon)
void | pluginExists (QString _pluginName, bool &_exists)
void | functionExists (QString _pluginName, QString _functionName, bool &_exists)
Signals inherited from BaseInterface
virtual void | updateView ()
| Update current view in Main Application. More...
virtual void | setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
| Set a description for a public slot. More...
virtual void | setRenderer (unsigned int _viewer, QString _rendererName)
| Set a renderer for the given viewer. More...
Signals inherited from KeyInterface
virtual void | registerKey (int _key, Qt::KeyboardModifiers _modifiers, QString _description, bool _multiUse=false)
| Register a key-combination for your plugin. More...
Signals inherited from PickingInterface
virtual void | addPickMode (const std::string &_mode)
| Add a new picking mode to the examiner. More...
Signals inherited from ToolboxInterface
virtual void | addToolbox (QString _name, QWidget *_widget)
| Add a toolbox widget to the gui with the given name. More...
Signals inherited from BackupInterface
virtual void | createBackup (int _objectid, QString _name, UpdateType _type=UPDATE_ALL)
| Tell Backup Plugin to create a backup. More...
virtual void | aboutToRestore (int _objectid)
| Backup Plugin tells other Plugins that a restore will happen. More...
virtual void | generateBackup (int _id, QString _name, UpdateType _type)
| This signal is emitted by a BackupPlugin and tells a TypePlugin to generate a backup. More...
Signals inherited from LoggingInterface
virtual void | log (Logtype _type, QString _message)=0
virtual void | log (QString _message)=0
Signals inherited from ScriptInterface
virtual void | scriptInfo (QString _functionWithParameters)
| Emit this signal if a scriptable function is executed. More...
virtual void | getScriptingEngine (QScriptEngine *&_engine)
virtual void | executeScript (QString _script)
virtual void | getAvailableFunctions (QStringList &_functions)
Signals inherited from ToolbarInterface
virtual void | addToolbar (QToolBar *_toolbar)
| Adds a Toolbar to the main widget. More...
Signals inherited from ContextMenuInterface
virtual void | addContextMenuItem (QAction *_action, ContextMenuType _type)
| Add an entry for a context Menu. More...
Signals inherited from LoadSaveInterface
virtual void | save (int _id, QString _filename)
| Save object to a file. More...
virtual void | load (QString _filename, DataType _type, int &_id)
| Load object from file with a specific DataType. More...
Signals inherited from RPCInterface
virtual void | pluginExists (QString _pluginName, bool &_exists)

## Public Member Functions
| MovePlugin ()
| Default Constructor. More...
| ~MovePlugin ()
| Destructor. More...
QString | name ()
| Name of the Plugin.
QString | description ()
| Description of the Plugin.

## Static Public Attributes
static const SelectionType | VERTEX = 1
static const SelectionType | EDGE = 2
static const SelectionType | FACE = 4
static const SelectionType | CELL = 8

## Private Slots
void | initializePlugin ()
void | pluginsInitialized ()
| Initialization of the plugin when it is loaded by the core. More...
void | slotAllCleared ()
void | objectDeleted (int _id)
void | slotMouseWheelEvent (QWheelEvent *_event, const std::string &_mode)
void | slotMouseEvent (QMouseEvent *_event)
| MousePress event occured. More...
void | slotKeyEvent (QKeyEvent *_event)
void | slotKeyReleaseEvent (QKeyEvent *_event)
void | slotPickModeChanged (const std::string &_mode)
| slot is called when the pickMode changed More...
void | slotBackupRequested (int, QString, int)
Private Slots inherited from BaseInterface
virtual void | exit ()
virtual QString | version ()
| Return a version string for your plugin. More...
Private Slots inherited from KeyInterface
virtual void | slotKeyEvent (QKeyEvent *_event)
| Key Event from Main App. More...

## Private Member Functions
void | slotRestoreRequested (int, QString, int)
Private Member Functions inherited from BaseInterface
virtual void | noguiSupported ()
virtual | ~BaseInterface ()
| Destructor.
virtual void | blockScenegraphUpdates (bool _block)
| Tell the core to prevent scenegraph updates. More...
virtual void | updatedObject (int _objectId)
| An object has been changed or added by this plugin. More...
virtual void | updatedObject (int _identifier, const UpdateType &_type)
| An object has been changed or added by this plugin. More...
virtual void | nodeVisibilityChanged (int _identifier)
| A scenegraph node has been shown or hidden. More...
virtual void | getCurrentRenderer (unsigned int _viewer, QString &_rendererName)
| Get the current renderer for the given viewer. More...
Private Member Functions inherited from MouseInterface
virtual | ~MouseInterface ()
| Destructor.
Private Member Functions inherited from KeyInterface
virtual void | slotKeyReleaseEvent (QKeyEvent *_event)
| Key Release Event from Main App. More...
virtual | ~KeyInterface ()
| Destructor.
Private Member Functions inherited from PickingInterface
virtual void | addHiddenPickMode (const std::string &_mode)
| Add a new picking mode to the examiner which will be invisible. More...
virtual void | setPickModeCursor (const std::string &_mode, QCursor _cursor)
| Set the cursor of the given PickMode. More...
virtual void | setPickModeMouseTracking (const std::string &_mode, bool _mouseTracking)
| Set mouse tracking for the given PickMode. More...
virtual void | setPickModeToolbar (const std::string &_mode, QToolBar *_toolbar)
| Set the additional toolbar of the given PickMode. More...
virtual void | removePickModeToolbar (const std::string &_mode)
| Removes the additional toolbar of the given PickMode. More...
virtual | ~PickingInterface ()
| Destructor.
Private Member Functions inherited from ToolboxInterface
virtual | ~ToolboxInterface ()
| Destructor.
virtual void | addToolbox (QString _name, QWidget *_widget, QIcon *_icon)
| Add a toolbox widget to the gui with the given name and an icon. More...
virtual void | addToolbox (QString _name, QWidget *_widget, QIcon *_icon, QWidget *_headerAreaWidget)
| Add a toolbox widget to the gui with the given name, icon and header area widget. More...
Private Member Functions inherited from BackupInterface
virtual void | createBackup (IdList _objectids, QString _name, std::vector< UpdateType > _types)
| Tell Backup Plugin to create a group backup. More...
virtual void | undo (int _objectid)
| Tell Backup Plugin to undo the last action of an object. More...
virtual void | redo (int _objectid)
| Tell Backup Plugin to redo the last action on an object. More...
virtual void | undo ()
| Tell Backup Plugin to undo the last action. More...
virtual void | redo ()
| Tell Backup Plugin to redo the last action. More...
virtual | ~BackupInterface ()
| Destructor.
virtual void | restored (int _objectid)
| Backup Plugin tells other Plugins that a restore has happened. More...
Private Member Functions inherited from LoggingInterface
virtual | ~LoggingInterface ()
| Destructor.
Private Member Functions inherited from ScriptInterface
virtual | ~ScriptInterface ()
| Destructor.
virtual void | executeFileScript (QString _filename)
virtual void | getDescription (QString _function, QString &_description, QStringList &_parameters, QStringList &_descriptions)
Private Member Functions inherited from ToolbarInterface
virtual | ~ToolbarInterface ()
| Destructor.
virtual void | removeToolbar (QToolBar *_toolbar)
| Remove a Toolbar from the main widget. More...
virtual void | getToolBar (QString _name, QToolBar *&_toolbar)
| Get a pointer to a Toolbar of the given name or 0 if it does not exist. More...
Private Member Functions inherited from PythonInterface
virtual | ~PythonInterface ()
| Destructor.
Private Member Functions inherited from ContextMenuInterface
virtual | ~ContextMenuInterface ()
| Destructor.
virtual void | addContextMenuItem (QAction *_action, DataType _objectType, ContextMenuType _type)
| Add an entry for a context Menu. More...
virtual void | hideContextMenu ()
| hide the main context menu
Private Member Functions inherited from LoadSaveInterface
virtual | ~LoadSaveInterface ()
| Destructor.
virtual void | addEmptyObject (DataType _type, int &_id)
virtual void | copyObject (int _oldId, int &_newId)
virtual void | emptyObjectAdded (int _id)
| DEPRECATED HERE (Moved to Type Interface)! Emit this signal if an empty object has been created. More...
virtual void | deleteObject (int _id)
| Delete an object This signal can be called from any thread. . More...
virtual void | deleteAllObjects ()
| Delete all Objects. More...
virtual void | getAllFileFilters (QStringList &_filters)
| Get all file filters that are registered. More...
Private Member Functions inherited from RPCInterface
virtual | ~RPCInterface ()
| Destructor.
virtual void | functionExists (QString _pluginName, QString _functionName, bool &_exists)

## Private Attributes
bool | hide_
bool | allTargets_
bool | placeMode_
bool | transformedSelected_
| stores if any selected elements where transformed

## ToolBox
enum | Unificationtype { DIAGONAL, LONGEST_AXIS, ALL_AXIS }
| stores the current axes in the tool
int | axisA_
| stores the current axes in the tool
int | axisB_
| stores the current axes in the tool
bool | toolboxActive_
| True if the toolbox widget is active.
moveToolbarWidget * | tool_
| Widget for Toolbox.
QIcon * | toolIcon_
| stores the current axes in the tool
void | slotSetPosition ()
| Position of manipulator in tab changed. More...
void | slotToggleAxisA ()
| Toggle the first axis for changing direction in tab. More...
void | slotToggleAxisB ()
| Toggle the second axis for changing direction in tab. More...
void | slotSetDirection ()
| Set Direction of manipulator in tab changed. More...
void | slotTranslation ()
| perform a translation for Manipulator in tab More...
void | slotProjectToTangentPlane ()
| Project the current manipulator onto the tangent plane of the object. More...
void | slotMoveManipToCOG ()
| Move the current manipulator to the cog of the object. More...
void | slotRotate ()
| Rotate Manipulator (with values from Tab) More...
void | slotScale ()
| Scale (with values from Tab) More...
void | slotEnableSelectionMode ()
| stores the current axes in the tool
void | slotEnableObjectMode ()
| stores the current axes in the tool
void | updateManipulatorDialog ()
| Update the Dialog with the last clicked manipulator. More...
template<typename MeshType >
OpenMesh::Vec3d | getNearestVertex (MeshType *_mesh, uint _fh, OpenMesh::Vec3d &_hitPoint)
| Get closest vertex to hitpoint. More...
template<typename MeshType >
OpenMesh::Vec3d | getNearestEdge (MeshType *_mesh, uint _fh, OpenMesh::Vec3d &_hitPoint)
| Get closest edge to hitpoint. More...
template<typename MeshType >
OpenMesh::Vec3d | getNearestFace (MeshType *_mesh, uint _fh, OpenMesh::Vec3d &_hitPoint)
| Get closest face to hitpoint. More...

## ToolBar
QAction * | moveAction_
| Called by Toolbar to enable move mode. More...
QAction * | moveSelectionAction_
| Called by Toolbar to enable move mode. More...
QActionGroup * | toolBarActions_
| Called by Toolbar to enable move mode. More...
QToolBar * | toolbar_
| Called by Toolbar to enable move mode. More...
void | slotSetMoveMode (QAction *_action)
| Called by Toolbar to enable move mode. More...

## PickToolBar
QToolBar * | pickToolbar_
| Called by pick Toolbar. More...
QAction * | placeAction_
| Called by pick Toolbar. More...
QAction * | rotateTranslateAction_
| Called by pick Toolbar. More...
QAction * | rotateManipAction_
| Called by pick Toolbar. More...
QAction * | resizeAction_
| Called by pick Toolbar. More...
QAction * | biggerManipAction_
| Called by pick Toolbar. More...
QAction * | smallerManipAction_
| Called by pick Toolbar. More...
QAction * | fixChildManipAction_
| Called by pick Toolbar. More...
QAction * | transformRefPoseManipAction_
| Called by pick Toolbar. More...
QAction * | currentPoseManipAction_
| Called by pick Toolbar. More...
QAction * | placeAndSnapAction_
| Called by pick Toolbar. More...
QActionGroup * | pickToolBarActions_
| Called by pick Toolbar. More...
void | slotPickToolbarAction (QAction *_action)
| Called by pick Toolbar. More...

## Manipulator Handling
std::vector< int > | activeManipulators_
| Size for the manipulators.
double | manip_size_
| Size for the manipulators.
double | manip_size_modifier_
| Modifier for the Size (changed by Mousewheel Events)
int | lastActiveManipulator_
| Stores the last manipulator which has been clicked ( used for the toolbox dialog)
MoveObjectMarker | objectMarker_
| Object marker to dimm Objects during manipulator transformation.
QtTranslationManipulatorNode::ManipulatorMode | manMode_
| Holds the current manipulator mode.
void | manipulatorMoved (QtTranslationManipulatorNode *_node, QMouseEvent *_event)
| move the object when its manipulator moves More...
void | ManipulatorPositionChanged (QtTranslationManipulatorNode *_node)
| update object when its manipulator changes position More...
void | unifyBoundingBox (Unificationtype u)
| Size for the manipulators.
template<typename MeshT >
void | transformMesh (ACG::Matrix4x4d _mat, MeshT &_mesh)
| Transform a mesh with the given transformation matrix. More...
ACG::Matrix4x4d | getLastManipulatorMatrix (bool _reset=true)
| Get the Matrix of the last active Manipulator ( Identity if not found or hidden Manipulator ) More...
void | showManipulators ()
| Checks if the manipulators should be visible or not. More...
void | placeManip (QMouseEvent *_event, bool _snap=false)
| Place and show the Manipulator. More...
template<typename MeshT >
void | unifyBB (MeshT &_mesh, Unificationtype u=MovePlugin::DIAGONAL)
| scale mesh to have a boundingboxdiagonal of one More...
template<typename MeshT >
void | getBB (MeshT &_mesh, ACG::Vec3d &_bb_min, ACG::Vec3d &_bb_max)
| get bounding box diagonal of a mesh More...
template<typename MeshT >
void | unifyBB (MeshT &_mesh, ACG::Vec3d &_bb_min, ACG::Vec3d &_bb_max, Unificationtype u=MovePlugin::DIAGONAL)
| Scales object such that bounding box diagonal has unit length. More...
void | setDescriptions ()
| Set Descriptions for scriptable functions. More...
void | moveObject (ACG::Matrix4x4d mat, int _id)
| Move an object with given id. More...
void | moveSelection (ACG::Matrix4x4d mat, int _id, QEvent::Type _type)
| Move selection on an object with given id. More...
void | setManipMode (QtTranslationManipulatorNode::ManipulatorMode _mode)
| Set the manipulator manipulation mode. More...

## Selection Plugin Communication
SelectionType | selectionType_
| Current SelectionType of SelectionPlugin.
void | setAllTargets (bool _state)
| Sets whether all targets should be affected or not. More...
void | updateSelectionType ()
| Get current primitive selection. More...

## Context Menu
QList< movePropsWidget * > | propsWindows_
| List of properties dialogs (each corresponding to one manipulator)
QAction * | contextAction_
| Context menu entry for showing per manipulator settings.
QAction * | contextActionHide_
| Context menu entry to hide a manipulator.
QAction * | toAllTargets_
| Checked if transformation should be applied to all target objs.
QMenu * | contextMenuManipControl_
| Additional Context Menu replicating the toolbar stuff.
QAction * | contextMenuManipControlsAction_
| Action holding the context menu for toolbar replication.
void | showProps ()
| Show properties of move manipulator in a dialog ( Called via context for picking. Get the picked id from the Qvariant attached to the connected action)
void | hideManipulator ()
| Hide the manipulator( Called via context for picking. Get the picked id from the Qvariant attached to the connected action)
movePropsWidget * | getDialogWidget (BaseObjectData *_obj)
| Get properties dialog widget that is attached to BaseDataObject obj. More...
movePropsWidget * | getDialogFromButton (QPushButton *_but)
| Get parent properties dialog widget of QPushButton but. More...
void | slotUpdateContextMenuNode (int _nodeId)
| Hide context menu entry when right clicking on node other than manipulator node. More...
void | setPickModeProps (movePropsWidget *_pW, const std::string &_pickmode)
| List of properties dialogs (each corresponding to one manipulator)

## Detailed Description

Plugin for moving objects and selections

Definition at line 81 of file MovePlugin.hh.

## Constructor & Destructor Documentation

## ◆ MovePlugin()

MovePlugin::MovePlugin | ( |  | ) |

Default Constructor.

Definition at line 82 of file MovePlugin.cc.

## ◆ ~MovePlugin()

MovePlugin::~MovePlugin | ( |  | ) |

Destructor.

Deconstructor.

Definition at line 125 of file MovePlugin.cc.

## Member Function Documentation

## ◆ getBB()

template<typename MeshT >

void MovePlugin::getBB | ( | MeshT & | _mesh,
|  | ACG::Vec3d & | _bb_min,
|  | ACG::Vec3d & | _bb_max
| ) |  |
| private

get bounding box diagonal of a mesh

Get the bounding box of a mesh.

Parameters

  _mesh | the mesh
  _bb_min | Lower left corner of bounding box
  _bb_max | Upper right corner of bounding box

Definition at line 2495 of file MovePlugin.cc.

## ◆ getDialogFromButton

movePropsWidget * MovePlugin::getDialogFromButton | ( | QPushButton * | _but | ) |
| private slot

Get parent properties dialog widget of QPushButton but.

Get Dialog Widget that contains the button.

Parameters

  _but | Reference to QPushButton object that has been pressed

Definition at line 1022 of file MovePlugin.cc.

## ◆ getDialogWidget

movePropsWidget * MovePlugin::getDialogWidget | ( | BaseObjectData * | _obj | ) |
| private slot

Get properties dialog widget that is attached to BaseDataObject obj.

Get pointer to corresponding dialog widget.

Parameters

  _obj | the object to which the dialog is attached

Definition at line 2099 of file MovePlugin.cc.

## ◆ getLastManipulatorMatrix()

ACG::Matrix4x4d MovePlugin::getLastManipulatorMatrix | ( | bool | _reset = `true` | ) |
| private

Get the Matrix of the last active Manipulator ( Identity if not found or hidden Manipulator )

Get the Matrix of the last active Manipulator ( Identity if not found or hidden Manipulator )

Parameters

  _reset | reset the transformation matrix of the manipulator to identity)

Returns
  current transformation matrix of the manipulator

Parameters

  _reset | reset the transformation matrix of the manipulator to identity)

Returns
  current transformation matrix of the manipulator

Definition at line 2187 of file MovePlugin.cc.

## ◆ getNearestEdge()

template<typename MeshType >

OpenMesh::Vec3d MovePlugin::getNearestEdge | ( | MeshType * | _mesh,
|  | uint | _fh,
|  | OpenMesh::Vec3d & | _hitPoint
| ) |  |
| private

Get closest edge to hitpoint.

Get nearest edge to hitPoint (use for snapping)

Definition at line 2674 of file MovePlugin.cc.

## ◆ getNearestFace()

template<typename MeshType >

OpenMesh::Vec3d MovePlugin::getNearestFace | ( | MeshType * | _mesh,
|  | uint | _fh,
|  | OpenMesh::Vec3d & | _hitPoint
| ) |  |
| private

Get closest face to hitpoint.

Get nearest face center to hitPoint (use for snapping)

Definition at line 2719 of file MovePlugin.cc.

## ◆ getNearestVertex()

template<typename MeshType >

OpenMesh::Vec3d MovePlugin::getNearestVertex | ( | MeshType * | _mesh,
|  | uint | _fh,
|  | OpenMesh::Vec3d & | _hitPoint
| ) |  |
| private

Get closest vertex to hitpoint.

Get nearest vertex to hitPoint (use for snapping)

Definition at line 2642 of file MovePlugin.cc.

## ◆ getObjectRenderingMatrix

Matrix4x4 MovePlugin::getObjectRenderingMatrix | ( | int | _objectId | ) |
| slot

Gets the Object Matrix in the scenegraph.

The object itself is not modified b< this matrix. Only the transformation matrix applied to the object coordinates before rendering gets modified.

Parameters

  _objectId | Id of the object to modify

Returns
  Current Matrix of the object

Definition at line 1949 of file MovePluginScript.cc.

## ◆ manipulatorDirectionX

Vector MovePlugin::manipulatorDirectionX | ( | int | _objectId | ) |
| slot

Get the x-direction of the manipulator.

Parameters

  _objectId | id of an object

Returns
  x-direction of the manipulator

Definition at line 1838 of file MovePluginScript.cc.

## ◆ manipulatorDirectionY

Vector MovePlugin::manipulatorDirectionY | ( | int | _objectId | ) |
| slot

Get the y-direction of the manipulator.

Parameters

  _objectId | id of an object

Returns
  y-direction of the manipulator

Definition at line 1857 of file MovePluginScript.cc.

## ◆ manipulatorDirectionZ

Vector MovePlugin::manipulatorDirectionZ | ( | int | _objectId | ) |
| slot

Get the z-direction of the manipulator.

Parameters

  _objectId | id of an object

Returns
  z-direction of the manipulator

Definition at line 1876 of file MovePluginScript.cc.

## ◆ manipulatorMoved

void MovePlugin::manipulatorMoved | ( | QtTranslationManipulatorNode * | _node,
|  | QMouseEvent * | _event
| ) |  |
| private slot

move the object when its manipulator moves

Parameters

  _node | the manipulator node
  _event | the mouse event

Definition at line 774 of file MovePlugin.cc.

## ◆ manipulatorPosition

Vector MovePlugin::manipulatorPosition | ( | int | _objectId | ) |
| slot

Get the position of the manipulator.

Parameters

  _objectId | id of an object

Returns
  current manipulator position

Definition at line 1786 of file MovePluginScript.cc.

## ◆ ManipulatorPositionChanged

void MovePlugin::ManipulatorPositionChanged | ( | QtTranslationManipulatorNode * | _node | ) |
| private slot

update object when its manipulator changes position

Parameters

  _node | the manipulator node

Definition at line 832 of file MovePlugin.cc.

## ◆ moveObject()

void MovePlugin::moveObject | ( | ACG::Matrix4x4d | mat,
|  | int | _id
| ) |  |
| private

Move an object with given id.

Move object with given transformation matrix.

Parameters

  mat | transformation matrix
  _id | id of the object

Definition at line 574 of file MovePlugin.cc.

## ◆ moveSelection()

void MovePlugin::moveSelection | ( | ACG::Matrix4x4d | _mat,
|  | int | _id,
|  | QEvent::Type | _type
| ) |  |
| private

Move selection on an object with given id.

Move selection on an object with given transformation matrix.

Which Selection (Vertex, Edge, Face) is used is determined by the current SelectionMode in SelectionPlugin. If the Plugin is unable to communicate with SelectionPlugin, Vertex Selection is used.

Parameters

  _mat | Matrix that should be applied to the selection
  _id | Object id of the target object
  _type | Type of mouse event ( release of the button creates a backup)

Definition at line 638 of file MovePlugin.cc.

## ◆ objectRenderingMatrixRotate

void MovePlugin::objectRenderingMatrixRotate | ( | int | _objectId,
|  | Vector | _axis,
|  | double | _angle
| ) |  |
| slot

Adds a scaling factor to the Object rendering Matrix in the scenegraph.

Parameters

  _objectId | Id of the object to modify
  _axis | Rotation axis
  _angle | Rotation angle

Definition at line 1934 of file MovePluginScript.cc.

## ◆ objectRenderingMatrixScale

void MovePlugin::objectRenderingMatrixScale | ( | int | _objectId,
|  | double | _s
| ) |  |
| slot

Adds a scaling factor to the Object rendering Matrix in the scenegraph.

Parameters

  _objectId | Id of the object to modify
  _s | Scaling factor

Definition at line 1904 of file MovePluginScript.cc.

## ◆ objectRenderingMatrixTranslate

void MovePlugin::objectRenderingMatrixTranslate | ( | int | _objectId,
|  | Vector | _translation
| ) |  |
| slot

Adds a scaling factor to the Object rendering Matrix in the scenegraph.

Parameters

  _objectId | Id of the object to modify
  _translation | Translation vector

Definition at line 1919 of file MovePluginScript.cc.

## ◆ placeManip()

void MovePlugin::placeManip | ( | QMouseEvent * | _event,
|  | bool | _snap = `false`
| ) |  |
| private

Place and show the Manipulator.

Parameters

  _event | mouseEvent that occurred
  _snap | Snap manipulator to nearest geometry primitive?

Definition at line 863 of file MovePlugin.cc.

## ◆ pluginsInitialized

void MovePlugin::pluginsInitialized | ( |  | ) |
| private slot

Initialization of the plugin when it is loaded by the core.

Definition at line 156 of file MovePlugin.cc.

## ◆ setAllTargets

void MovePlugin::setAllTargets | ( | bool | _state | ) |
| private slot

Sets whether all targets should be affected or not.

Parameters

  _state | Qt::CheckState of checkbox

Definition at line 2632 of file MovePlugin.cc.

## ◆ setDescriptions()

void MovePlugin::setDescriptions | ( |  | ) |
| private

Set Descriptions for scriptable functions.

Set Descriptions for Scripting Slots.

Definition at line 67 of file MovePluginScript.cc.

## ◆ setManipMode()

void MovePlugin::setManipMode | ( | QtTranslationManipulatorNode::ManipulatorMode | _mode | ) |
| private

Set the manipulator manipulation mode.

Parameters

  _mode | Mode

Definition at line 671 of file MovePlugin.cc.

## ◆ setManipulatorDirection

void MovePlugin::setManipulatorDirection | ( | int | _objectId,
|  | Vector | _directionX,
|  | Vector | _directionY
| ) |  |
| slot

Set the direction of the manipulator.

set the direction of the manipulator

Parameters

  _objectId | id of an object
  _directionX | vector for the X direction
  _directionY | vector for the Y direction

Definition at line 1806 of file MovePluginScript.cc.

## ◆ setManipulatorPosition

void MovePlugin::setManipulatorPosition | ( | int | _objectId,
|  | Vector | _position
| ) |  |
| slot

Set the position of the manipulator.

set the position of the manipulator

Parameters

  _objectId | id of an object
  _position | new position

Definition at line 1742 of file MovePluginScript.cc.

## ◆ showManipulators()

void MovePlugin::showManipulators | ( |  | ) |
| private

Checks if the manipulators should be visible or not.

Definition at line 978 of file MovePlugin.cc.

## ◆ slotMouseEvent

void MovePlugin::slotMouseEvent | ( | QMouseEvent * | _event | ) |
| private slot

MousePress event occured.

Parameters

  _event | the event that occured

Definition at line 400 of file MovePlugin.cc.

## ◆ slotMoveManipToCOG

void MovePlugin::slotMoveManipToCOG | ( |  | ) |
| private slot

Move the current manipulator to the cog of the object.

Definition at line 1360 of file MovePlugin.cc.

## ◆ slotMoveToOrigin

void MovePlugin::slotMoveToOrigin | ( |  | ) |
| slot

Move target Meshes cog to the origin.

Definition at line 1729 of file MovePlugin.cc.

## ◆ slotPickModeChanged

void MovePlugin::slotPickModeChanged | ( | const std::string & | _mode | ) |
| private slot

slot is called when the pickMode changed

Parameters

  _mode | new pickMode

Definition at line 525 of file MovePlugin.cc.

## ◆ slotPickToolbarAction

void MovePlugin::slotPickToolbarAction | ( | QAction * | _action | ) |
| private slot

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters

  _action | the action that was triggered

Definition at line 2139 of file MovePlugin.cc.

## ◆ slotProjectToTangentPlane

void MovePlugin::slotProjectToTangentPlane | ( |  | ) |
| private slot

Project the current manipulator onto the tangent plane of the object.

Definition at line 1338 of file MovePlugin.cc.

## ◆ slotRotate

void MovePlugin::slotRotate | ( |  | ) |
| private slot

Rotate Manipulator (with values from Tab)

Definition at line 1422 of file MovePlugin.cc.

## ◆ slotScale

void MovePlugin::slotScale | ( |  | ) |
| private slot

Scale (with values from Tab)

Scale Manipulator (with values from Tab)

Definition at line 1578 of file MovePlugin.cc.

## ◆ slotSetDirection

void MovePlugin::slotSetDirection | ( |  | ) |
| private slot

Set Direction of manipulator in tab changed.

Definition at line 1152 of file MovePlugin.cc.

## ◆ slotSetMoveMode

void MovePlugin::slotSetMoveMode | ( | QAction * | _action | ) |
| private slot

Called by Toolbar to enable move mode.

Parameters

  _action | the action that was triggered

Definition at line 2114 of file MovePlugin.cc.

## ◆ slotSetPosition

void MovePlugin::slotSetPosition | ( |  | ) |
| private slot

Position of manipulator in tab changed.

Definition at line 1032 of file MovePlugin.cc.

## ◆ slotToggleAxisA

void MovePlugin::slotToggleAxisA | ( |  | ) |
| private slot

Toggle the first axis for changing direction in tab.

Definition at line 1102 of file MovePlugin.cc.

## ◆ slotToggleAxisB

void MovePlugin::slotToggleAxisB | ( |  | ) |
| private slot

Toggle the second axis for changing direction in tab.

Definition at line 1127 of file MovePlugin.cc.

## ◆ slotTranslation

void MovePlugin::slotTranslation | ( |  | ) |
| private slot

perform a translation for Manipulator in tab

Definition at line 1233 of file MovePlugin.cc.

## ◆ slotUnifyBoundingBoxDiagonal

void MovePlugin::slotUnifyBoundingBoxDiagonal | ( |  | ) |
| slot

Scale Boundingbox Diagonal to unit size.

Definition at line 1902 of file MovePlugin.cc.

## ◆ slotUpdateContextMenuNode

void MovePlugin::slotUpdateContextMenuNode | ( | int | _nodeId | ) |
| private slot

Hide context menu entry when right clicking on node other than manipulator node.

Override ContextMenuInterface slot in order to avoid appearance of context menu entry when clicking on other nodes (other than manpipulator nodes)

Parameters

  _nodeId | Identifier of node that has been clicked

Definition at line 753 of file MovePlugin.cc.

## ◆ transform [1/2]

void MovePlugin::transform | ( | int | _objectId,
|  | Matrix4x4 | _matrix
| ) |  |
| slot

transform an Object by a given matrix

transform an object

Parameters

  _objectId | object id
  _matrix | transformation matrix

Definition at line 777 of file MovePluginScript.cc.

## ◆ transform [2/2]

void MovePlugin::transform | ( | int | _objectId,
|  | IdList | _vHandles,
|  | Matrix4x4 | _matrix
| ) |  |
| slot

transform given vertices by a matrix

Transform a set of vertex handles.

Parameters

  _objectId | id of an object
  _vHandles | list of vertex handles
  _matrix | transformation matrix

Definition at line 896 of file MovePluginScript.cc.

## ◆ transformCellSelection

bool MovePlugin::transformCellSelection | ( | int | _objectId,
|  | Matrix4x4 | _matrix
| ) |  |
| slot

transform current selection of an Object by a given matrix

transform cell selection

Parameters

  _objectId | id of an object
  _matrix | transformation matrix

Returns
  returns true if selected elements were transformed

Definition at line 1608 of file MovePluginScript.cc.

## ◆ transformEdgeSelection

bool MovePlugin::transformEdgeSelection | ( | int | _objectId,
|  | Matrix4x4 | _matrix
| ) |  |
| slot

transform current selection of an Object by a given matrix

transform edge selection

Parameters

  _objectId | id of an object
  _matrix | transformation matrix

Returns
  returns true if selected elements were transformed

Definition at line 1376 of file MovePluginScript.cc.

## ◆ transformFaceSelection

bool MovePlugin::transformFaceSelection | ( | int | _objectId,
|  | Matrix4x4 | _matrix
| ) |  |
| slot

transform current selection of an Object by a given matrix

transform face selection

Parameters

  _objectId | id of an object
  _matrix | transformation matrix

Returns
  returns true if selected elements were transformed

Definition at line 1164 of file MovePluginScript.cc.

## ◆ transformMesh()

template<typename MeshT >

void MovePlugin::transformMesh | ( | ACG::Matrix4x4d | _mat,
|  | MeshT & | _mesh
| ) |  |
| private

Transform a mesh with the given transformation matrix.

Note: The normals have to be transformed with the inverse transposed transformation matrix in order to yield correct results

Parameters

  _mat | transformation matrix
  _mesh | the mesh

Definition at line 2213 of file MovePlugin.cc.

## ◆ transformVertexSelection

bool MovePlugin::transformVertexSelection | ( | int | _objectId,
|  | Matrix4x4 | _matrix
| ) |  |
| slot

transform current selection of an Object by a given matrix

transform vertex selection

Parameters

  _objectId | id of an object
  _matrix | transformation matrix

Returns
  returns true if selected elements were transformed

Definition at line 1018 of file MovePluginScript.cc.

## ◆ translate [1/2]

void MovePlugin::translate | ( | int | _objectId,
|  | Vector | _vector
| ) |  |
| slot

translate an Object by a given vector

Translate an object.

Parameters

  _objectId | id of the object
  _vector | translation vector

Definition at line 160 of file MovePluginScript.cc.

## ◆ translate [2/2]

void MovePlugin::translate | ( | int | _objectId,
|  | IdList | _vHandles,
|  | Vector | _vector
| ) |  |
| slot

translate given vertices by a vector

translate a set of vertex handles

Parameters

  _objectId | id of an object
  _vHandles | list of vertex handles
  _vector | translation vector

Definition at line 258 of file MovePluginScript.cc.

## ◆ translateEdgeSelection

void MovePlugin::translateEdgeSelection | ( | int | _objectId,
|  | Vector | _vector
| ) |  |
| slot

translate current edge selection of an Object by a given vector

translate edge selection

Parameters

  _objectId | id of an object
  _vector | translation vector

Definition at line 615 of file MovePluginScript.cc.

## ◆ translateFaceSelection

void MovePlugin::translateFaceSelection | ( | int | _objectId,
|  | Vector | _vector
| ) |  |
| slot

translate current face selection of an Object by a given vector

translate face selection

Parameters

  _objectId | id of an object
  _vector | translation vector

Definition at line 483 of file MovePluginScript.cc.

## ◆ translateVertexSelection

void MovePlugin::translateVertexSelection | ( | int | _objectId,
|  | Vector | _vector
| ) |  |
| slot

translate current vertex selection of an Object by a given vector

translate vertex selection

Parameters

  _objectId | id of an object
  _vector | translation vector

Definition at line 359 of file MovePluginScript.cc.

## ◆ unifyBB() [1/2]

template<typename MeshT >

void MovePlugin::unifyBB | ( | MeshT & | _mesh,
|  | Unificationtype | u = `MovePlugin::DIAGONAL`
| ) |  |
| private

scale mesh to have a boundingboxdiagonal of one

scale mesh to have a boundingbox axis('s) or diagonal of one

Parameters

  _mesh | the mesh
  u | the unification type (Diagonal, longest axis, all axis)

Definition at line 2441 of file MovePlugin.cc.

## ◆ unifyBB() [2/2]

template<typename MeshT >

void MovePlugin::unifyBB | ( | MeshT & | _mesh,
|  | ACG::Vec3d & | _bb_min,
|  | ACG::Vec3d & | _bb_max,
|  | Unificationtype | u = `MovePlugin::DIAGONAL`
| ) |  |
| private

Scales object such that bounding box diagonal has unit length.

Scales object such that bounding box axis('s) or diagonal have unit length.

Parameters

  _mesh | the mesh
  _bb_min | Lower left corner of bounding box
  _bb_max | Upper right corner of bounding box
  u | the unification type (Diagonal, longest axis, all axis)

Definition at line 2523 of file MovePlugin.cc.

## ◆ updateManipulatorDialog()

void MovePlugin::updateManipulatorDialog | ( |  | ) |
| private

Update the Dialog with the last clicked manipulator.

Definition at line 2051 of file MovePlugin.cc.

## ◆ updateSelectionType()

void MovePlugin::updateSelectionType | ( |  | ) |
| private

Get current primitive selection.

Connect to SelectionPlugin.

Definition at line 2560 of file MovePlugin.cc.

## Member Data Documentation

## ◆ biggerManipAction_

QAction* MovePlugin::biggerManipAction_
| private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters

  _action | the action that was triggered

Definition at line 298 of file MovePlugin.hh.

## ◆ currentPoseManipAction_

QAction* MovePlugin::currentPoseManipAction_
| private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters

  _action | the action that was triggered

Definition at line 303 of file MovePlugin.hh.

## ◆ fixChildManipAction_

QAction* MovePlugin::fixChildManipAction_
| private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters

  _action | the action that was triggered

Definition at line 301 of file MovePlugin.hh.

## ◆ moveAction_

QAction* MovePlugin::moveAction_
| private

Called by Toolbar to enable move mode.

Parameters

  _action | the action that was triggered

Definition at line 271 of file MovePlugin.hh.

## ◆ moveSelectionAction_

QAction* MovePlugin::moveSelectionAction_
| private

Called by Toolbar to enable move mode.

Parameters

  _action | the action that was triggered

Definition at line 272 of file MovePlugin.hh.

## ◆ pickToolbar_

QToolBar* MovePlugin::pickToolbar_
| private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters

  _action | the action that was triggered

Definition at line 291 of file MovePlugin.hh.

## ◆ pickToolBarActions_

QActionGroup* MovePlugin::pickToolBarActions_
| private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters

  _action | the action that was triggered

Definition at line 307 of file MovePlugin.hh.

## ◆ placeAction_

QAction* MovePlugin::placeAction_
| private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters

  _action | the action that was triggered

Definition at line 293 of file MovePlugin.hh.

## ◆ placeAndSnapAction_

QAction* MovePlugin::placeAndSnapAction_
| private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters

  _action | the action that was triggered

Definition at line 305 of file MovePlugin.hh.

## ◆ resizeAction_

QAction* MovePlugin::resizeAction_
| private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters

  _action | the action that was triggered

Definition at line 296 of file MovePlugin.hh.

## ◆ rotateManipAction_

QAction* MovePlugin::rotateManipAction_
| private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters

  _action | the action that was triggered

Definition at line 295 of file MovePlugin.hh.

## ◆ rotateTranslateAction_

QAction* MovePlugin::rotateTranslateAction_
| private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters

  _action | the action that was triggered

Definition at line 294 of file MovePlugin.hh.

## ◆ smallerManipAction_

QAction* MovePlugin::smallerManipAction_
| private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters

  _action | the action that was triggered

Definition at line 299 of file MovePlugin.hh.

## ◆ toolbar_

QToolBar* MovePlugin::toolbar_
| private

Called by Toolbar to enable move mode.

Parameters

  _action | the action that was triggered

Definition at line 276 of file MovePlugin.hh.

## ◆ toolBarActions_

QActionGroup* MovePlugin::toolBarActions_
| private

Called by Toolbar to enable move mode.

Parameters

  _action | the action that was triggered

Definition at line 274 of file MovePlugin.hh.

## ◆ transformRefPoseManipAction_

QAction* MovePlugin::transformRefPoseManipAction_
| private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters

  _action | the action that was triggered

Definition at line 302 of file MovePlugin.hh.

The documentation for this class was generated from the following files:

- Plugin-Move/MovePlugin.hh
- Plugin-Move/MoveContextMenu.cc
- Plugin-Move/MovePlugin.cc
- Plugin-Move/MovePluginScript.cc