![]() |
ImFusion SDK 4.3
|
#include <ImFusion/GUI/TransformationMatrixWidget.h>
Widget to transform a matrix, with global/local and toWorld/fromWorld modifiers. More...
Inheritance diagram for TransformationMatrixWidget:Widget to transform a matrix, with global/local and toWorld/fromWorld modifiers.
Flexible widget that can be inserted in a dialog, allows the user to modify a matrix. Supports copy/paste, using a different matrix convention, and reset/invert actions
Public Types | |
| enum | Type { Translation = 1 << 0 , Rotation = 1 << 1 , ScaleShear = 1 << 2 , Rigid = Translation | Rotation , Affine = Translation | Rotation | ScaleShear } |
| Bitset enumeration to define how to show the menu. More... | |
| enum | Options { Tools = 1 << 0 , CopyPaste = 1 << 1 , GlobalLocal = 1 << 2 , ToFromWorld = 1 << 3 , All = 0xFF } |
Public Slots | |
| virtual void | setMatrixSilent (const mat4 &matrix) |
| Sets the matrix without triggering signals. Expected matrix is from the convention specified in construction. | |
| void | setMatrixAnimated (const mat4 &matrix) |
| Sets the matrix that is displayed in the dialog with an animation. | |
| void | setResetMatrix (const mat4 &matrix) |
| Sets the matrix that will be set when the reset button is pressed. Does not change the currently displayed matrix. | |
| void | resetMatrix () |
| Sets transformation matrix to reset matrix. | |
| void | setCoordinateFrameNames (const std::string &worldName, const std::string &dataName) |
| Updates the names of the coordinate frames in the dropbox list. | |
Signals | |
| void | matrixChanged (const mat4 &matrix) const |
| Signals when the transformation matrix changes. | |
| void | coordinateChanged (bool isLocal) const |
| Signals when the coordinate changes between local/global. | |
Public Member Functions | |
| TransformationMatrixWidget (const mat4 &resetMat=mat4::Identity(), QWidget *parent=nullptr, Pose::TransformationConvention convention=Pose::FROMWORLD, const std::string &worldName="World", const std::string &dataName="Data", Flags< Type > type=Affine, Flags< Options > options=All) | |
| TransformationMatrixWidged constructor. | |
| mat4 | matrix () const |
| Returns the transformation matrix, in the constructor convention. | |
| void | setTranslationSilent (const vec3 &trans) |
| Sets a translation without triggering signals, in the constructor convention. | |
| void | setRotationSilent (const vec3 &rot) |
| Sets a rotation without triggering signals, in the constructor convention. | |
| void | setScaleSilent (const vec3 &scale) |
| Sets a scale without triggering signals, in the constructor convention. | |
| void | setShearSilent (const vec3 &shear) |
| Sets a shear without triggering signals, in the constructor convention. | |
| void | setIs2dTransform (bool is2d) |
| Limits the transformation to 2D. | |
| void | setShownConvention (Pose::TransformationConvention convention) |
| Sets the convention shown in the widget. | |
| bool | isReadOnly () const |
| Returns whether UI elements are read-only. | |
| void | setReadOnly (const bool flag) |
| Sets all UI elements to read-only. | |
Public Member Functions inherited from SignalReceiver | |
| SignalReceiver ()=default | |
| Default constructor. | |
| SignalReceiver (const SignalReceiver &other) | |
| Copy constructor, does not copy any existing signal connections from other. | |
| SignalReceiver & | operator= (SignalReceiver rhs) |
| Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs. | |
| virtual | ~SignalReceiver () |
| Virtual destructor disconnects from all connected signals. | |
Protected Attributes | |
| QVBoxLayout * | m_layout = nullptr |
Additional Inherited Members | |
Protected Member Functions inherited from SignalReceiver | |
| void | disconnectAll () |
| Disconnects all existing connections. | |
| enum Type |
| enum Options |
|
explicit |
TransformationMatrixWidged constructor.
Sets the reset matrix, and is modular with types and options. Sets the convention to be used with this matrix. Calls to matrix() will return the matrix in this convention.
|
virtualslot |
Sets the matrix without triggering signals. Expected matrix is from the convention specified in construction.
Reimplemented in CalibrationMatrixWidget.