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 <QVTKWidget2.h> 38 #include <vtkSmartPointer.h> 39 #include <vtkInteractorStyle.h> 41 #include <vtkGenericOpenGLRenderWindow.h> 42 #include <vtkRenderWindowInteractor.h> 43 #include <QVTKInteractor.h> 49 class vtkInteractorStyle;
54 class vtkScalarBarActor;
55 class vtkEventQtSlotConnect;
56 class vtkCallbackCommand;
59 class vtkAnnotatedCubeActor;
60 class vtkScalarBarWidget;
61 class vtkUnsignedCharArray;
66 class GeometricObject;
76 void PrintSelf(ostream& os, vtkIndent indent)
override;
143 enum CameraOrientation {
236 void setPicker(vtkSmartPointer<vtkAbstractPropPicker> woodyWood);
242 void pickActor(
int x,
int y);
245 void keyPressEvent(QKeyEvent* e)
override;
258 void screenshot(QString filename);
267 void setBackfaceCulling(
bool);
270 bool getBackfaceCulling()
const;
279 void setLightFollowCamera(
bool);
282 bool getLightFollowCamera()
const;
285 void setPointSize(
double size);
288 double getPointSize()
const;
291 void rotateCamera(
double angle,
int axe);
300 void resetCamera(
double* bounds);
303 void getCameraSettings(
double* position,
double* focalPoint,
double* viewUp);
306 void setActiveCamera(vtkCamera* cam);
309 vtkCamera* getActiveCamera();
312 void getMouse3DCoordinates(
double& x,
double& y,
double& z);
315 void setBackgroundColor(
double,
double,
double);
318 void getBackgroundColor(
double&,
double&,
double&);
321 bool getGradientBackground();
324 void setGradientBackground(
bool);
327 void toogle3DRedBlue();
330 void toggleCopyright(
bool);
333 void toggleAxes(
bool);
339 void toggleOrientationDecorations(
bool);
342 void setOrientationDecorationsLetters(QString letters[4]);
346 void setColorScale(
bool);
349 bool getColorScale()
const;
355 void setColorScaleMinMax(
double m,
double M);
360 void setColorScaleTitle(QString t);
363 void computeVisiblePropBounds(
double* bounds);
369 void resetClippingPlanes(
double* bounds =
nullptr);
382 void addProp(vtkSmartPointer<vtkProp> p,
bool refresh =
false);
385 bool containsProp(vtkSmartPointer<vtkProp>);
391 void removeProp(vtkSmartPointer<vtkProp> p,
bool refresh =
false);
394 void actorTransform(vtkSmartPointer<vtkActor>,
double*,
int,
double**,
double*,
double*);
424 void actorPicked(vtkSmartPointer<vtkPicker>);
427 void rightButtonPressed();
434 void mousePressEvent(QMouseEvent* event)
override;
437 void mouseReleaseEvent(QMouseEvent* event)
override;
440 void mouseMoveEvent(QMouseEvent* event)
override;
463 void resetCameraSettings();
490 static void divertionCallback(vtkObject* caller,
unsigned long eid,
void* clientdata,
void* calldata) {};
506 static void buildScreenshotMap();
533 vtkSmartPointer<vtkAxesActor>
axes;
538 vtkSmartPointer<vtkActor2D> orientationDecorationActors[4];
539 vtkSmartPointer<vtkTextMapper> orientationDecorationsTextMapper[4];
547 #endif //RENDERERWIDGET_H vtkSmartPointer< vtkUnsignedCharArray > pixelArray
Definition: RendererWidget.h:100
void SetAreaPicking(bool b)
Definition: RendererWidget.cpp:112
void OnLeftButtonDown() override
Definition: RendererWidget.cpp:117
vtkTypeMacro(vtkInteractorStylePick, vtkInteractorStyle)
Definition: Action.cpp:36
int endPosition[2]
Definition: RendererWidget.h:96
#define CAMITK_API
Definition: CamiTKAPI.h:49
static vtkInteractorStylePick * New()
void RedrawRubberBand()
Definition: RendererWidget.cpp:205
void PrintSelf(ostream &os, vtkIndent indent) override
Definition: RendererWidget.cpp:358
int moving
Definition: RendererWidget.h:98
void OnMouseMove() override
Definition: RendererWidget.cpp:154
Interactor used when we are in picking mode.
Definition: RendererWidget.h:69
~vtkInteractorStylePick() override=default
void OnLeftButtonUp() override
Definition: RendererWidget.cpp:189
bool areaPicking
Definition: RendererWidget.h:102
vtkInteractorStylePick()
Definition: RendererWidget.cpp:103
int startPosition[2]
Definition: RendererWidget.h:95
virtual void Pick()
Definition: RendererWidget.cpp:276