NDEVR
API Documentation
MatrixEditor.h
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: Widgets
28File: MatrixEditor
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/OrientationEditor.h>
35#include <NDEVR/Resource.h>
36#include <NDEVR/Matrix.h>
37namespace Ui { class MatrixEditorUI; }
38namespace NDEVR
39{
45 class NDEVR_WIDGETS_API MatrixEditor : public QWidget
46 {
47 Q_OBJECT
48 public:
53 MatrixEditor(QWidget *parent = nullptr);
64 bool hasParent();
73 void setEditable(bool editable);
79 public:
81 signals:
82 void edited();
83 protected slots:
92 private:
93 Matrix<fltp08, 4, 4> m_parent_matrix;
94 Ui::MatrixEditorUI* ui;
95 OrientationEditor* m_orientation_editor;
96 };
97}
void OrientationEdited()
Slot called when the orientation editor values change, to sync back to the matrix.
Resource< Matrix< fltp08, 4, 4 > > matrix
The 4x4 transformation matrix resource being edited.
bool hasParent()
Checks whether a parent matrix has been set.
OrientationEditor * orientationWidget()
Returns the orientation editor sub-widget.
void updateOrientation()
Updates the orientation editor to reflect the current matrix value.
void setParentMatrix(const Matrix< fltp08, 4, 4 > &matrix)
Sets the parent transformation matrix used as a reference frame.
void updateMatrix()
Slot that updates the matrix resource from the UI field values.
MatrixEditor(QWidget *parent=nullptr)
Constructs a MatrixEditor widget.
void setEditable(bool editable)
Sets whether the matrix fields are editable by the user.
void edited()
Emitted when the matrix has been modified by the user.
Templated logic for doing matrix multiplication.
Definition Matrix.hpp:182
A dialog where the user can set a 3D orientation of an object.
A core part of the engine, stores variables that can be listened to with ResourceListener which will ...
Definition Resource.h:42
The primary namespace for the NDEVR SDK.