26 #ifndef RENDERERWIDGET_H 27 #define RENDERERWIDGET_H 33 #include <QVTKWidget2.h> 34 #include <vtkSmartPointer.h> 35 #include <vtkInteractorStyle.h> 37 #include <vtkGenericOpenGLRenderWindow.h> 38 #include <vtkRenderWindowInteractor.h> 39 #include <QVTKInteractor.h> 43 class vtkInteractorStyle;
48 class vtkScalarBarActor;
49 class vtkEventQtSlotConnect;
50 class vtkCallbackCommand;
53 class vtkAnnotatedCubeActor;
54 class vtkScalarBarWidget;
55 class vtkUnsignedCharArray;
60 class GeometricObject;
70 void PrintSelf(ostream& os, vtkIndent indent);
143 enum CameraOrientation {
232 void setAreaPicking(
bool areaPicking);
243 void setPicker(vtkSmartPointer<vtkAbstractPropPicker> woodyWood);
249 void pickActor(
int x,
int y);
252 void keyPressEvent(QKeyEvent* e);
265 void screenshot(QString filename);
274 void setBackfaceCulling(
bool);
277 bool getBackfaceCulling()
const;
286 void setLightFollowCamera(
bool);
289 bool getLightFollowCamera()
const;
292 void setPointSize(
double size);
295 double getPointSize()
const;
298 void rotateCamera(
double angle,
int axe);
307 void resetCamera(
double *bounds);
310 void getCameraSettings(
double *position,
double *focalPoint,
double *viewUp);
313 void setActiveCamera( vtkCamera * cam );
316 vtkCamera * getActiveCamera();
319 void getMouse3DCoordinates(
double & x,
double & y,
double & z);
322 void setBackgroundColor(
double,
double,
double);
325 void getBackgroundColor(
double&,
double&,
double&);
328 bool getGradientBackground();
331 void setGradientBackground(
bool);
334 void toogle3DRedBlue();
337 void toggleCopyright(
bool);
340 void toggleAxes(
bool);
346 void toggleOrientationDecorations(
bool);
349 void setOrientationDecorationsLetters(QString letters[4]);
353 void setColorScale(
bool);
356 bool getColorScale()
const;
362 void setColorScaleMinMax(
double m,
double M);
367 void setColorScaleTitle(QString t);
370 void computeVisiblePropBounds(
double *bounds);
385 void addProp(vtkSmartPointer<vtkProp> p,
bool refresh=
false);
388 bool containsProp(vtkSmartPointer<vtkProp>);
394 void removeProp(vtkSmartPointer<vtkProp> p,
bool refresh=
false);
397 void actorTransform(vtkSmartPointer<vtkActor>,
double *,
int ,
double **,
double *,
double *);
427 void actorPicked(vtkSmartPointer<vtkPicker>);
430 void rightButtonPressed();
437 virtual void mousePressEvent(QMouseEvent* event);
440 virtual void mouseReleaseEvent(QMouseEvent* event);
443 virtual void mouseMoveEvent(QMouseEvent* event);
466 void resetCameraSettings();
493 static void divertionCallback(vtkObject * caller,
unsigned long eid,
void *clientdata,
void *calldata) {};
509 static void buildScreenshotMap();
536 vtkSmartPointer<vtkAxesActor>
axes;
541 vtkSmartPointer<vtkActor2D> orientationDecorationActors[4];
542 vtkSmartPointer<vtkTextMapper> orientationDecorationsTextMapper[4];
550 #endif //RENDERERWIDGET_H
void PrintSelf(ostream &os, vtkIndent indent)
Definition: RendererWidget.cpp:359
vtkUnsignedCharArray * PixelArray
Definition: RendererWidget.h:94
void SetAreaPicking(bool b)
Definition: RendererWidget.cpp:117
virtual void OnLeftButtonDown()
Definition: RendererWidget.cpp:122
vtkTypeMacro(vtkInteractorStylePick, vtkInteractorStyle)
Definition: Action.cpp:40
virtual void OnMouseMove()
Definition: RendererWidget.cpp:158
#define CAMITK_API
Definition: CamiTKAPI.h:49
static vtkInteractorStylePick * New()
void RedrawRubberBand()
Definition: RendererWidget.cpp:208
bool AreaPicking
Definition: RendererWidget.h:96
int Moving
Definition: RendererWidget.h:92
int StartPosition[2]
Definition: RendererWidget.h:89
Interactor used when we are in picking mode.
Definition: RendererWidget.h:63
virtual void OnLeftButtonUp()
Definition: RendererWidget.cpp:192
vtkInteractorStylePick()
Definition: RendererWidget.cpp:103
int EndPosition[2]
Definition: RendererWidget.h:90
~vtkInteractorStylePick()
Definition: RendererWidget.cpp:112
virtual void Pick()
Definition: RendererWidget.cpp:279