#include <SIG_VisualisationWidget.h>
Inheritance diagram for SIGEL_CommonGUI::SIG_VisualisationWidget:
Public Methods | |
SIG_VisualisationWidget ( QWidget *parent=0, char const *name=0, WFlags f=0 ) | |
The constructor of the SIG_VisualisationWidget. More... | |
~SIG_VisualisationWidget () | |
The destructor of the SIG_VisualisationWidget. More... | |
Public Slots | |
virtual void | setRenderMode ( const QString & string ) |
virtual void | setAmbientLighting ( int newValue ) |
virtual void | setShowAncorPoints ( int state ) |
virtual void | setYaw ( double yyaw ) |
This method sets the eyepoint's yaw angle. More... | |
virtual void | setPitch ( double ppitch ) |
This method sets the eyepoint's pitch angle. More... | |
virtual void | setDistance ( double ddistance ) |
This method sets the distance between eyepoint and lookpoint. More... | |
Signals | |
void | signalMouseRotation (int, int) |
This signal is emmited when the user has moved the mouse. More... | |
void | signalMouseZoom (int) |
This signal is emmited when the user has moved the mouse. More... | |
Protected Methods | |
virtual void | initializeGL () |
Initaliazes some OpenGL stuff. More... | |
virtual void | resizeGL (int width, int height) |
Resizes the contents of this widget. More... | |
virtual void | paintGL () |
Refreshes the contents of this widget by initiating the execution of appropriate OpenGL drawing commands. More... | |
virtual void | updateEyePoint () |
Calculates the actual eyepoint from the attributes yaw, pitch and distance. More... | |
void | initFloatingTextWidgets () |
virtual void | mousePressEvent ( QMouseEvent *event ) |
This methid is inherited from the QWidget. More... | |
virtual void | mouseMoveEvent ( QMouseEvent *event ) |
This methid is inherited from the QWidget. More... | |
Protected Attributes | |
SIGEL_Visualisation::SIG_Visualisation* | visualisation |
The pointer to the SIG_Visualisation object that is finally responsible for the drawing of this widgets contents. More... | |
double | yaw |
The eyepoints actual yaw angle. More... | |
double | pitch |
The eyepoints actual pitch angle. More... | |
double | distance |
The actual distance between the eyepoint and the lookpoint. More... | |
int | mouseXPos |
The last X-position of the mouse. More... | |
int | mouseYPos |
The last Y-position of the mouse. More... | |
bool | automaticRefresh |
If true, changing of the eyepoint effects refreshing this widget. More... | |
double const | mouseSensity |
The mouse sensity. More... | |
double const | pi |
The mathematical constant ![]() | |
QVector< SIG_FloatingTextLabel > | floatingTextWidgets |
QSize | floatingTextsSize |
int | showAncorPointsState |
It inherits from QGLWidget and extends it with functionality used in all subclasses, which finally are instantiated in the GUI widgets that contain 3D views of a robot, an environment or a simulation. This includes easily changing the eyepoint (due to yaw and pitch angles and a distance value), lookpoint and OpenGL related stuff involved in widget resizing for example. To provide this functionality it need some basic features that have all visualisation-classes in common. That's why this class aggregates a pointer to the SIG_Visualisation superclass.
Definition at line 34 of file SIG_VisualisationWidget.h.
|
The constructor of the SIG_VisualisationWidget.
Initializes the eyepoint and calculates
Definition at line 8 of file SIG_VisualisationWidget.cpp. |
|
The destructor of the SIG_VisualisationWidget.
Definition at line 28 of file SIG_VisualisationWidget.cpp. |
|
Definition at line 142 of file SIG_VisualisationWidget.cpp. |
|
Initaliazes some OpenGL stuff. This method is inherited from the QGLWidget. It is called automatically by the QT runtime system. Because some initialization is already done in the constructor of the contained SIG_Visualisation, there's not much to do here. At the moment just the glClearColor is set to white. Definition at line 179 of file SIG_VisualisationWidget.cpp. |
|
This methid is inherited from the QWidget. Subclasses of SIG_VisualisationWidget should reimplement this method and call SIG_VisualisationWidget::mouseMoveEvent from there, supplied with their QMouseEvent. When the user moves the mouse, this method emits the appropriate signals. Reimplemented in SIG_SimulationVisualisationWidget. Definition at line 164 of file SIG_VisualisationWidget.cpp. Referenced by SIG_SimulationVisualisationWidget::mouseMoveEvent(). |
|
This methid is inherited from the QWidget. Subclasses of SIG_VisualisationWidget should reimplement this method and call SIG_VisualisationWidget::mousePressEvent from there, supplied with their QMouseEvent. When the user presses a mousebutton the actual mouse position is stored in mouseXPos and mouseYPos. Reimplemented in SIG_SimulationVisualisationWidget. Definition at line 158 of file SIG_VisualisationWidget.cpp. Referenced by SIG_SimulationVisualisationWidget::mousePressEvent(). |
|
Refreshes the contents of this widget by initiating the execution of appropriate OpenGL drawing commands. This methid is inherited from the QGLWidget. It is called automatically by the QT runtime system. In some cases it is also called by other methods (when changing the eyepoint while automaticRefresh being true). This is only done indirectly by calling the method updateGL. Reimplemented in SIG_SimulationVisualisationWidget. Definition at line 198 of file SIG_VisualisationWidget.cpp. Referenced by SIG_SimulationVisualisationWidget::paintGL(). |
|
Resizes the contents of this widget. This methid is inherited from the QGLWidget. It is called automatically by the QT runtime system. The OpenGL viewport is resizes. If visualisation points to a SIG_Visualisation object, its aspect ratio is updated.
Definition at line 184 of file SIG_VisualisationWidget.cpp. Referenced by SIG_SimulationVisualisationWidget::visualizeThis(). |
|
Definition at line 48 of file SIG_VisualisationWidget.cpp. |
|
This method sets the distance between eyepoint and lookpoint. If automaticRefresh is true, the widget's contents are refreshed (now according to the new eyepoint).
Definition at line 90 of file SIG_VisualisationWidget.cpp. |
|
This method sets the eyepoint's pitch angle. If automaticRefresh is true, the widget's contents are refreshed (now according to the new eyepoint).
Definition at line 84 of file SIG_VisualisationWidget.cpp. |
|
Definition at line 33 of file SIG_VisualisationWidget.cpp. |
|
Definition at line 63 of file SIG_VisualisationWidget.cpp. |
|
This method sets the eyepoint's yaw angle. If automaticRefresh is true, the widget's contents are refreshed (now according to the new eyepoint).
Definition at line 78 of file SIG_VisualisationWidget.cpp. |
|
This signal is emmited when the user has moved the mouse. The supplied values are calculated by multiplying the mouseSensity with the amount of pixels the mouse was moved across the x- respectively y-axis while the left mouse button was pressed. This signal should be intercepted by the widget containing this SIG_Visualisationwidget and effect appropriate calling of the slots setYaw and setPitch. |
|
This signal is emmited when the user has moved the mouse. The supplied value is calculated by multiplying the mouseSensity with the amount of pixels the mouse was moved across the y-axis while the right mouse button was pressed. This signal should be intercepted by the widget containing this SIG_Visualisationwidget and effect appropriate calling of the slot setDistance. |
|
Calculates the actual eyepoint from the attributes yaw, pitch and distance. If automaticRefresh is true, the widget's contents are refreshed. Definition at line 96 of file SIG_VisualisationWidget.cpp. |
|
If true, changing of the eyepoint effects refreshing this widget.
Definition at line 248 of file SIG_VisualisationWidget.h. |
|
The actual distance between the eyepoint and the lookpoint.
Definition at line 224 of file SIG_VisualisationWidget.h. |
|
Definition at line 266 of file SIG_VisualisationWidget.h. |
|
Definition at line 268 of file SIG_VisualisationWidget.h. |
|
The mouse sensity. A higher value increases the effect of mouse movements. Definition at line 256 of file SIG_VisualisationWidget.h. |
|
The last X-position of the mouse. This is used to calculate the amount of pixels the mouse was moved since the last mousePresseEvent respectively mouseMoveEvent. Definition at line 233 of file SIG_VisualisationWidget.h. |
|
The last Y-position of the mouse. This is used to calculate the amount of pixels the mouse was moved since the last mousePresseEvent respectively mouseMoveEvent. Definition at line 242 of file SIG_VisualisationWidget.h. |
|
The mathematical constant
Its value is calculated in the constructor as Definition at line 264 of file SIG_VisualisationWidget.h. |
|
The eyepoints actual pitch angle.
Definition at line 219 of file SIG_VisualisationWidget.h. |
|
Definition at line 270 of file SIG_VisualisationWidget.h. |
|
The pointer to the SIG_Visualisation object that is finally responsible for the drawing of this widgets contents.
Definition at line 209 of file SIG_VisualisationWidget.h. |
|
The eyepoints actual yaw angle.
Definition at line 214 of file SIG_VisualisationWidget.h. |