26#ifndef RENDERERWIDGET_H
27#define RENDERERWIDGET_H
30#error "Header Error: headers reordering required. Please include Log.h after including RendererWidget.h and InteractiveViewer.h or any OpenGL window based class."
37#include <vtkVersion.h>
40#include "CamiTKDisableWarnings"
41#include <QVTKInteractor.h>
42#include "CamiTKReEnableWarnings"
45class vtkInteractorStyle;
50class vtkScalarBarActor;
51class vtkEventQtSlotConnect;
52class vtkCallbackCommand;
55class vtkAnnotatedCubeActor;
56class vtkScalarBarWidget;
58class vtkAbstractPropPicker;
62#include <QVTKOpenGLNativeWidget.h>
63#include <vtkGenericOpenGLRenderWindow.h>
71class vtkInteractorStylePick;
114 Q_ENUM(CameraOrientation)
145 RendererWidget(QWidget* parent =
nullptr, ControlMode mode = RendererWidget::TRACKBALL);
153 void setAreaPicking(
bool areaPicking);
156 ControlMode getControlMode()
const;
159 void setControlMode(ControlMode mode);
164 void setPicker(vtkSmartPointer<vtkAbstractPropPicker> woodyWood);
167 void keyPressEvent(QKeyEvent* e)
override;
172 void screenshot(QString filename);
181 void setBackfaceCulling(
bool);
184 bool getBackfaceCulling()
const;
187 void setFxaaAntialiasing(
bool);
190 bool getFxaaAntialiasing()
const;
199 void setLightFollowCamera(
bool);
202 bool getLightFollowCamera()
const;
205 void setPointSize(
double size);
208 double getPointSize()
const;
211 void rotateCamera(
double angle,
int axe);
220 void resetCamera(
double* bounds);
223 void getCameraSettings(
double* position,
double* focalPoint,
double* viewUp);
226 void setActiveCamera(vtkCamera* cam);
229 vtkCamera* getActiveCamera();
232 vtkSmartPointer<QVTKInteractor> getInteractor();
235 vtkSmartPointer<vtkRenderWindow> getRenderWindow();
238 void getMouse3DCoordinates(
double& x,
double& y,
double& z);
241 void setBackgroundColor(
double,
double,
double);
244 void getBackgroundColor(
double&,
double&,
double&);
247 bool getGradientBackground();
250 void setGradientBackground(
bool);
253 void toogle3DRedBlue();
256 void toggleLogo(
bool);
259 void toggleAxes(
bool);
265 void toggleOrientationDecorations(
bool);
268 void setOrientationDecorationsLetters(QStringList letters);
271 void setColorScale(
bool);
274 bool getColorScale()
const;
280 void setColorScaleMinMax(
double m,
double M);
285 void setColorScaleTitle(QString t);
288 void computeVisiblePropBounds(
double* bounds);
293 void resetClippingPlanes(
double* bounds =
nullptr);
307 void addProp(vtkSmartPointer<vtkProp> p,
bool refresh =
false);
310 bool containsProp(vtkSmartPointer<vtkProp>);
316 void removeProp(vtkSmartPointer<vtkProp> p,
bool refresh =
false);
343 void mousePressEvent(QMouseEvent* event)
override;
346 void mouseReleaseEvent(QMouseEvent* event)
override;
349 void mouseMoveEvent(QMouseEvent* event)
override;
369 void resetCameraSettings();
422 vtkSmartPointer<vtkAxesActor>
axes;
428 vtkSmartPointer<vtkActor2D> orientationDecorationActors[4];
431 vtkSmartPointer<vtkTextMapper> orientationDecorationsTextMapper[4];
#define CAMITK_API
Definition CamiTKAPI.h:66