Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MovePlugin Class Reference

#include <Plugin-Move/MovePlugin.hh>

Inheritance diagram for MovePlugin:
RPCInterface LoadSaveInterface ContextMenuInterface 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 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 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 87 of file MovePlugin.hh.

Constructor & Destructor Documentation

MovePlugin::MovePlugin ( )

Default Constructor.

Definition at line 86 of file MovePlugin.cc.

MovePlugin::~MovePlugin ( )

Destructor.

Deconstructor.

Definition at line 129 of file MovePlugin.cc.

Member Function Documentation

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 2433 of file MovePlugin.cc.

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 1020 of file MovePlugin.cc.

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 2037 of file MovePlugin.cc.

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 2125 of file MovePlugin.cc.

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 2612 of file MovePlugin.cc.

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 2657 of file MovePlugin.cc.

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 2580 of file MovePlugin.cc.

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 1780 of file MovePluginScript.cc.

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 1669 of file MovePluginScript.cc.

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 1688 of file MovePluginScript.cc.

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 1707 of file MovePluginScript.cc.

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 767 of file MovePlugin.cc.

Vector MovePlugin::manipulatorPosition ( int  _objectId)
slot

Get the position of the manipulator.

Parameters
_objectIdid of an object
Returns
current manipulator position

Definition at line 1617 of file MovePluginScript.cc.

void MovePlugin::ManipulatorPositionChanged ( QtTranslationManipulatorNode _node)
privateslot

update object when its manipulator changes position

Parameters
_nodethe manipulator node

Definition at line 825 of file MovePlugin.cc.

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 573 of file MovePlugin.cc.

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 632 of file MovePlugin.cc.

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 1765 of file MovePluginScript.cc.

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 1735 of file MovePluginScript.cc.

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 1750 of file MovePluginScript.cc.

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

Place and show the Manipulator.

Parameters
_eventmouseEvent that occurred
_snapSnap manipulator to nearest geometry primitive?

TODO: Whats this?

Definition at line 856 of file MovePlugin.cc.

void MovePlugin::pluginsInitialized ( )
privateslot

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

Definition at line 160 of file MovePlugin.cc.

void MovePlugin::setAllTargets ( bool  _state)
privateslot

Sets whether all targets should be affected or not.

Parameters
_stateQt::CheckState of checkbox

Definition at line 2570 of file MovePlugin.cc.

void MovePlugin::setDescriptions ( )
private

Set Descriptions for scriptable functions.

Set Descriptions for Scripting Slots.

Definition at line 70 of file MovePluginScript.cc.

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

Set the manipulator manipulation mode.

Parameters
_modeMode

Definition at line 665 of file MovePlugin.cc.

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 1637 of file MovePluginScript.cc.

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 1573 of file MovePluginScript.cc.

void MovePlugin::showManipulators ( )
private

Checks if the manipulators should be visible or not.

Definition at line 976 of file MovePlugin.cc.

void MovePlugin::slotMouseEvent ( QMouseEvent *  _event)
privateslot

MousePress event occured.

Parameters
_eventthe event that occured

Definition at line 399 of file MovePlugin.cc.

void MovePlugin::slotMoveManipToCOG ( )
privateslot

Move the current manipulator to the cog of the object.

Definition at line 1358 of file MovePlugin.cc.

void MovePlugin::slotMoveToOrigin ( )
slot

Move target Meshes cog to the origin.

Definition at line 1707 of file MovePlugin.cc.

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

slot is called when the pickMode changed

Parameters
_modenew pickMode

Definition at line 524 of file MovePlugin.cc.

void MovePlugin::slotPickToolbarAction ( QAction *  _action)
privateslot

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters
_actionthe action that was triggered

Definition at line 2077 of file MovePlugin.cc.

void MovePlugin::slotProjectToTangentPlane ( )
privateslot

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

Definition at line 1336 of file MovePlugin.cc.

void MovePlugin::slotRotate ( )
privateslot

Rotate Manipulator (with values from Tab)

Definition at line 1416 of file MovePlugin.cc.

void MovePlugin::slotScale ( )
privateslot

Scale (with values from Tab)

Scale Manipulator (with values from Tab)

Definition at line 1564 of file MovePlugin.cc.

void MovePlugin::slotSetDirection ( )
privateslot

Set Direction of manipulator in tab changed.

Definition at line 1150 of file MovePlugin.cc.

void MovePlugin::slotSetMoveMode ( QAction *  _action)
privateslot

Called by Toolbar to enable move mode.

Parameters
_actionthe action that was triggered

Definition at line 2052 of file MovePlugin.cc.

void MovePlugin::slotSetPosition ( )
privateslot

Position of manipulator in tab changed.

Definition at line 1030 of file MovePlugin.cc.

void MovePlugin::slotToggleAxisA ( )
privateslot

Toggle the first axis for changing direction in tab.

Definition at line 1100 of file MovePlugin.cc.

void MovePlugin::slotToggleAxisB ( )
privateslot

Toggle the second axis for changing direction in tab.

Definition at line 1125 of file MovePlugin.cc.

void MovePlugin::slotTranslation ( )
privateslot

perform a translation for Manipulator in tab

Definition at line 1231 of file MovePlugin.cc.

void MovePlugin::slotUnifyBoundingBoxDiagonal ( )
slot

Scale Boundingbox Diagonal to unit size.

Definition at line 1857 of file MovePlugin.cc.

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 746 of file MovePlugin.cc.

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 746 of file MovePluginScript.cc.

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 852 of file MovePluginScript.cc.

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 1471 of file MovePluginScript.cc.

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 1272 of file MovePluginScript.cc.

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 1092 of file MovePluginScript.cc.

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 2151 of file MovePlugin.cc.

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 962 of file MovePluginScript.cc.

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 163 of file MovePluginScript.cc.

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 251 of file MovePluginScript.cc.

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 584 of file MovePluginScript.cc.

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 452 of file MovePluginScript.cc.

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 342 of file MovePluginScript.cc.

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 2379 of file MovePlugin.cc.

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 2461 of file MovePlugin.cc.

void MovePlugin::updateManipulatorDialog ( )
private

Update the Dialog with the last clicked manipulator.

Definition at line 1989 of file MovePlugin.cc.

void MovePlugin::updateSelectionType ( )
private

Get current primitive selection.

Connect to SelectionPlugin.

Definition at line 2498 of file MovePlugin.cc.

Member Data Documentation

QAction* MovePlugin::biggerManipAction_
private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters
_actionthe action that was triggered

Definition at line 305 of file MovePlugin.hh.

QAction* MovePlugin::currentPoseManipAction_
private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters
_actionthe action that was triggered

Definition at line 310 of file MovePlugin.hh.

QAction* MovePlugin::fixChildManipAction_
private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters
_actionthe action that was triggered

Definition at line 308 of file MovePlugin.hh.

QAction* MovePlugin::moveAction_
private

Called by Toolbar to enable move mode.

Parameters
_actionthe action that was triggered

Definition at line 278 of file MovePlugin.hh.

QAction* MovePlugin::moveSelectionAction_
private

Called by Toolbar to enable move mode.

Parameters
_actionthe action that was triggered

Definition at line 279 of file MovePlugin.hh.

QToolBar* MovePlugin::pickToolbar_
private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters
_actionthe action that was triggered

Definition at line 298 of file MovePlugin.hh.

QActionGroup* MovePlugin::pickToolBarActions_
private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters
_actionthe action that was triggered

Definition at line 314 of file MovePlugin.hh.

QAction* MovePlugin::placeAction_
private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters
_actionthe action that was triggered

Definition at line 300 of file MovePlugin.hh.

QAction* MovePlugin::placeAndSnapAction_
private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters
_actionthe action that was triggered

Definition at line 312 of file MovePlugin.hh.

QAction* MovePlugin::resizeAction_
private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters
_actionthe action that was triggered

Definition at line 303 of file MovePlugin.hh.

QAction* MovePlugin::rotateManipAction_
private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters
_actionthe action that was triggered

Definition at line 302 of file MovePlugin.hh.

QAction* MovePlugin::rotateTranslateAction_
private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters
_actionthe action that was triggered

Definition at line 301 of file MovePlugin.hh.

QAction* MovePlugin::smallerManipAction_
private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters
_actionthe action that was triggered

Definition at line 306 of file MovePlugin.hh.

QToolBar* MovePlugin::toolbar_
private

Called by Toolbar to enable move mode.

Parameters
_actionthe action that was triggered

Definition at line 283 of file MovePlugin.hh.

QActionGroup* MovePlugin::toolBarActions_
private

Called by Toolbar to enable move mode.

Parameters
_actionthe action that was triggered

Definition at line 281 of file MovePlugin.hh.

QAction* MovePlugin::transformRefPoseManipAction_
private

Called by pick Toolbar.

Called by pick mode Toolbar.

Parameters
_actionthe action that was triggered

Definition at line 309 of file MovePlugin.hh.


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