cisst-saw
Loading...
Searching...
No Matches
vctVector3DQtWidget.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3
4/*
5 Author(s): Anton Deguet
6 Created on: 2017-11-30
7
8 (C) Copyright 2017-2020 Johns Hopkins University (JHU), All Rights Reserved.
9
10--- begin cisst license - do not edit ---
11
12This software is provided "as is" under an open source license, with
13no warranty. The complete license can be found in license.txt and
14http://www.cisst.org/cisst/license.txt.
15
16--- end cisst license ---
17*/
18
19#ifndef _vctVector3DQtWidget_h
20#define _vctVector3DQtWidget_h
21
22// cisst include
27
28// Always include last
30
31
36{
37 Q_OBJECT;
38
39public:
40 vctVector3DQtWidget(QWidget * parent = 0);
41 inline ~vctVector3DQtWidget(void) {};
42
43 void SetValue(const vct3 & value);
44 void SetAutoResize(const bool autoResize);
45 inline const double & MaxNorm(void) const {
46 return mMaxNorm;
47 }
48 inline float & AxisLength(void) {
49 return mAxisLength;
50 }
51
52protected:
53 void ResetOrientation(void);
54 void mouseMoveEvent(QMouseEvent * event);
55 void mouseReleaseEvent(QMouseEvent * event);
56 void keyPressEvent(QKeyEvent * event);
57 void initializeGL(void);
58 void paintGL(void);
59 void resizeGL(int width, int height);
60
66 float mScale; // = 1 / mMaxNorm
68};
69
70#endif // _vctVector3DQtWidget_h
vctInt2 mStartMousePosition
Definition vctVector3DQtWidget.h:63
float & AxisLength(void)
Definition vctVector3DQtWidget.h:48
vct3 mVector
Definition vctVector3DQtWidget.h:61
~vctVector3DQtWidget(void)
Definition vctVector3DQtWidget.h:41
void mouseReleaseEvent(QMouseEvent *event)
void SetAutoResize(const bool autoResize)
void mouseMoveEvent(QMouseEvent *event)
void resizeGL(int width, int height)
vctQuatRot3 mCurrentOrientation
Definition vctVector3DQtWidget.h:62
float mAxisLength
Definition vctVector3DQtWidget.h:67
vctQuatRot3 mDeltaOrientation
Definition vctVector3DQtWidget.h:62
double mMaxNorm
Definition vctVector3DQtWidget.h:65
const double & MaxNorm(void) const
Definition vctVector3DQtWidget.h:45
void SetValue(const vct3 &value)
double mVectorNorm
Definition vctVector3DQtWidget.h:65
float mScale
Definition vctVector3DQtWidget.h:66
void initializeGL(void)
vctVector3DQtWidget(QWidget *parent=0)
void ResetOrientation(void)
void keyPressEvent(QKeyEvent *event)
bool mAutoResize
Definition vctVector3DQtWidget.h:64
#define CISST_EXPORT
Definition cmnExportMacros.h:50
size_type height() const
Definition vctDynamicConstMatrixBase.h:248
size_type width() const
Definition vctDynamicConstMatrixBase.h:253
Macros to export the symbols of cisstVectorQt (in a Dll).
Typedef for fixed size vectors.
vctFixedSizeVector< double, 3 > vct3
Definition vctFixedSizeVectorTypes.h:46
vctFixedSizeVector< int, 2 > vctInt2
Definition vctFixedSizeVectorTypes.h:143
Forward declarations and #define for cisstVector.
QGLWidget vctQtOpenGLBaseWidget
Definition vctForwardDeclarationsQt.h:31
Typedef for different transformations.
vctQuaternionRotation3< double > vctQuatRot3
Definition vctTransformationTypes.h:67