Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
ViewerExaminer.h
1#ifndef ViewerExaminer_H
2#define ViewerExaminer_H
3
4#include <Inventor/sys/port.h>
5
6#include <QtWidgets/QWidget>
7
8#include <Inventor/ViewerComponents/Qt/RenderAreaExaminer.h>
9
10class SoNode;
11
13namespace Ui
14{
15 class ViewerExaminer;
16}
25class QTVIEWERCOMPONENTS_API ViewerExaminer : public QWidget
26{
27 Q_OBJECT
28public:
29
33 ViewerExaminer( QWidget* parent );
34
36
43 void loadFile( QString filename );
44
48 void setSceneGraph( SoNode* sceneGraph );
49
54
59
64
69
74
75
81 virtual void viewAxis( const SbVec3f& direction, const SbVec3f& up );
82
86 virtual void setCameraType( SoType type );
87
88 /*
89 * Activate/Deactivate stereo.
90 */
91 void activateStereo( bool activated );
92
93 /*
94 * Returns true if stereo buffering is enabled.
95 */
97
98 /*
99 * Returns true if stereo can be activated.
100 */
102
103 /*
104 * Set the stereo offset.
105 */
106 void setStereoCameraOffset( float offset );
107
108 /*
109 * Set the stereo balance.
110 */
111 void setStereoCameraBalance( float balance );
112
113public Q_SLOTS:
117 virtual void viewAll();
118
119protected Q_SLOTS:
120
124 virtual void setYZView();
125
129 virtual void setXZView();
130
134 virtual void setXYView();
135
139 virtual void saveCamera();
140
144 virtual void restoreCamera();
145
149 virtual void setCameraPerspective();
150
154 virtual void setCameraOrtho();
155
159 virtual void setSeekMode();
160
164 virtual void openPreferences();
165
166private:
167
168 // Instance of the ui class auto generated by moc from ViewerExaminer.ui
169 Ui::ViewerExaminer *m_ui;
170 RenderAreaExaminer* m_renderArea;
171 SoNode* m_sceneGraph;
172
173};
174
175#endif // ViewerExaminer_H
176
177
Class to render an OpenInventor scene graph in a Qt OpenGL window.
ClippingPlanesAdjustMode
Camera clipping planes adjustment mode.
3D vector class.
Definition SbVec.h:932
NavigationMode
Navigation Mode.
Abstract base class for all database nodes.
Definition SoNode.h:145
Stores runtime type information.
Definition SoType.h:98
Base class to have a MFC viewer with the OpenInventor OpenGL rendering.
virtual void setSeekMode()
Activate/Deactivate seek mode.
ViewerExaminer(QWidget *parent)
Constructor.
virtual void setClippingPlanesAdjustMode(RenderAreaInteractive::ClippingPlanesAdjustMode mode)
Set the camera clipping planes adjustment mode.
void setSceneGraph(SoNode *sceneGraph)
Sets the scene graph.
void loadFile(QString filename)
This method loads an IV file using SoInput::openFile and SoDB::readAll.
virtual void setXZView()
Set XZ view.
virtual void setCameraType(SoType type)
Select the camera type.
bool isRawStereoAvailable()
void setStereoCameraOffset(float offset)
virtual void setCameraPerspective()
Select the perspective camera.
virtual void openPreferences()
Open preferences dialog.
virtual void setNavigationMode(SceneExaminer::NavigationMode mode)
Set navigation mode.
virtual void restoreCamera()
Restore the camera position.
virtual SceneExaminer::NavigationMode getNavigationMode()
Returns the current navigation mode.
RenderAreaExaminer * getRenderArea()
Gets the render area examiner.
virtual void setCameraOrtho()
Select the orthographic camera.
virtual void viewAll()
Set the camera in order to see the whole scene.
virtual void setYZView()
Set YZ view.
virtual void setXYView()
Set XY view.
bool isStereoSupported()
void activateStereo(bool activated)
virtual void saveCamera()
Save the camera position.
virtual RenderAreaInteractive::ClippingPlanesAdjustMode getClippingPlanesAdjustMode()
Get the camera clipping planes adjustment mode.
void setStereoCameraBalance(float balance)
virtual void viewAxis(const SbVec3f &direction, const SbVec3f &up)
Moves the camera to be aligned with the given direction vector while keeping the "up" direction of th...