Developer Documentation
MovePlugin Class Reference

#include <Plugin-Move/MovePlugin.hh>

Inheritance diagram for MovePlugin:
RPCInterface LoadSaveInterface ContextMenuInterface PythonInterface ToolbarInterface ScriptInterface LoggingInterface BackupInterface ToolboxInterface PickingInterface KeyInterface MouseInterface BaseInterface

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.
 
moveToolbarWidgettool_
 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)
 
movePropsWidgetgetDialogWidget (BaseObjectData *_obj)
 Get properties dialog widget that is attached to BaseDataObject obj. More...
 
movePropsWidgetgetDialogFromButton (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
_meshthe mesh
_bb_minLower left corner of bounding box
_bb_maxUpper right corner of bounding box

Definition at line 2488 of file MovePlugin.cc.

◆ getDialogFromButton

movePropsWidget * MovePlugin::getDialogFromButton ( QPushButton *  _but)
privateslot

Get parent properties dialog widget of QPushButton but.

Get Dialog Widget that contains the button.

Parameters
_butReference to QPushButton object that has been pressed

Definition at line 1019 of file MovePlugin.cc.

◆ getDialogWidget

movePropsWidget * MovePlugin::getDialogWidget ( BaseObjectData _obj)
privateslot

Get properties dialog widget that is attached to BaseDataObject obj.

Get pointer to corresponding dialog widget.

Parameters
_objthe object to which the dialog is attached

Definition at line 2092 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
_resetreset the transformation matrix of the manipulator to identity)
Returns
current transformation matrix of the manipulator
Parameters
_resetreset the transformation matrix of the manipulator to identity)
Returns
current transformation matrix of the manipulator

Definition at line 2180 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 2667 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 2712 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 2635 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
_objectIdId 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
_objectIdid 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
_objectIdid 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
_objectIdid 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 
)
privateslot

move the object when its manipulator moves

Parameters
_nodethe manipulator node
_eventthe mouse event

Definition at line 772 of file MovePlugin.cc.

◆ manipulatorPosition

Vector MovePlugin::manipulatorPosition ( int  _objectId)
slot

Get the position of the manipulator.

Parameters
_objectIdid of an object
Returns
current manipulator position

Definition at line 1786 of file MovePluginScript.cc.

◆ ManipulatorPositionChanged

void MovePlugin::ManipulatorPositionChanged ( QtTranslationManipulatorNode _node)
privateslot

update object when its manipulator changes position

Parameters
_nodethe manipulator node

Definition at line 829 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
mattransformation matrix
_idid of the object

Definition at line 572 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
_matMatrix that should be applied to the selection
_idObject id of the target object
_typeType of mouse event ( release of the button creates a backup)

Definition at line 636 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
_objectIdId of the object to modify
_axisRotation axis
_angleRotation 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
_objectIdId of the object to modify
_sScaling 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
_objectIdId of the object to modify
_translationTranslation 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
_eventmouseEvent that occurred
_snapSnap manipulator to nearest geometry primitive?

Definition at line 860 of file MovePlugin.cc.

◆ pluginsInitialized

void MovePlugin::pluginsInitialized ( )
privateslot

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)
privateslot

Sets whether all targets should be affected or not.

Parameters
_stateQt::CheckState of checkbox

Definition at line 2625 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
_modeMode

Definition at line 669 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
_objectIdid of an object
_directionXvector for the X direction
_directionYvector 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
_objectIdid of an object
_positionnew 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 975 of file MovePlugin.cc.

◆ slotMouseEvent

void MovePlugin::slotMouseEvent ( QMouseEvent *  _event)
privateslot

MousePress event occured.

Parameters
_eventthe event that occured

Definition at line 399 of file MovePlugin.cc.

◆ slotMoveManipToCOG

void MovePlugin::slotMoveManipToCOG ( )
privateslot

Move the current manipulator to the cog of the object.

Definition at line 1354 of file MovePlugin.cc.

◆ slotMoveToOrigin

void MovePlugin::slotMoveToOrigin ( )
slot

Move target Meshes cog to the origin.

Definition at line 1722 of file MovePlugin.cc.

◆ slotPickModeChanged

void MovePlugin::slotPickModeChanged ( const std::string &  _mode)
privateslot

slot is called when the pickMode changed

Parameters
_modenew pickMode

Definition at line 523 of file MovePlugin.cc.

◆ slotPickToolbarAction

void MovePlugin::slotPickToolbarAction ( QAction *  _action)
privateslot

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters
_actionthe action that was triggered

Definition at line 2132 of file MovePlugin.cc.

◆ slotProjectToTangentPlane

void MovePlugin::slotProjectToTangentPlane ( )
privateslot

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

Definition at line 1332 of file MovePlugin.cc.

◆ slotRotate

void MovePlugin::slotRotate ( )
privateslot

Rotate Manipulator (with values from Tab)

Definition at line 1416 of file MovePlugin.cc.

◆ slotScale

void MovePlugin::slotScale ( )
privateslot

Scale (with values from Tab)

Scale Manipulator (with values from Tab)

Definition at line 1572 of file MovePlugin.cc.

◆ slotSetDirection

void MovePlugin::slotSetDirection ( )
privateslot

Set Direction of manipulator in tab changed.

Definition at line 1149 of file MovePlugin.cc.

◆ slotSetMoveMode

void MovePlugin::slotSetMoveMode ( QAction *  _action)
privateslot

Called by Toolbar to enable move mode.

Parameters
_actionthe action that was triggered

Definition at line 2107 of file MovePlugin.cc.

◆ slotSetPosition

void MovePlugin::slotSetPosition ( )
privateslot

Position of manipulator in tab changed.

Definition at line 1029 of file MovePlugin.cc.

◆ slotToggleAxisA

void MovePlugin::slotToggleAxisA ( )
privateslot

Toggle the first axis for changing direction in tab.

Definition at line 1099 of file MovePlugin.cc.

◆ slotToggleAxisB

void MovePlugin::slotToggleAxisB ( )
privateslot

Toggle the second axis for changing direction in tab.

Definition at line 1124 of file MovePlugin.cc.

◆ slotTranslation

void MovePlugin::slotTranslation ( )
privateslot

perform a translation for Manipulator in tab

Definition at line 1228 of file MovePlugin.cc.

◆ slotUnifyBoundingBoxDiagonal

void MovePlugin::slotUnifyBoundingBoxDiagonal ( )
slot

Scale Boundingbox Diagonal to unit size.

Definition at line 1895 of file MovePlugin.cc.

◆ slotUpdateContextMenuNode

void MovePlugin::slotUpdateContextMenuNode ( int  _nodeId)
privateslot

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
_nodeIdIdentifier of node that has been clicked

Definition at line 751 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
_objectIdobject id
_matrixtransformation 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
_objectIdid of an object
_vHandleslist of vertex handles
_matrixtransformation 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
_objectIdid of an object
_matrixtransformation 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
_objectIdid of an object
_matrixtransformation 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
_objectIdid of an object
_matrixtransformation 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
_mattransformation matrix
_meshthe mesh

Definition at line 2206 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
_objectIdid of an object
_matrixtransformation 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
_objectIdid of the object
_vectortranslation 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
_objectIdid of an object
_vHandleslist of vertex handles
_vectortranslation 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
_objectIdid of an object
_vectortranslation 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
_objectIdid of an object
_vectortranslation 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
_objectIdid of an object
_vectortranslation 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
_meshthe mesh
uthe unification type (Diagonal, longest axis, all axis)

Definition at line 2434 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
_meshthe mesh
_bb_minLower left corner of bounding box
_bb_maxUpper right corner of bounding box
uthe unification type (Diagonal, longest axis, all axis)

Definition at line 2516 of file MovePlugin.cc.

◆ updateManipulatorDialog()

void MovePlugin::updateManipulatorDialog ( )
private

Update the Dialog with the last clicked manipulator.

Definition at line 2044 of file MovePlugin.cc.

◆ updateSelectionType()

void MovePlugin::updateSelectionType ( )
private

Get current primitive selection.

Connect to SelectionPlugin.

Definition at line 2553 of file MovePlugin.cc.

Member Data Documentation

◆ biggerManipAction_

QAction* MovePlugin::biggerManipAction_
private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters
_actionthe 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
_actionthe 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
_actionthe 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
_actionthe 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
_actionthe 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
_actionthe 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
_actionthe 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
_actionthe 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
_actionthe 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
_actionthe 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
_actionthe 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
_actionthe 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
_actionthe 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
_actionthe 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
_actionthe 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
_actionthe action that was triggered

Definition at line 302 of file MovePlugin.hh.


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