ctkVTKRenderView_p.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*=========================================================================
  2. Library: CTK
  3. Copyright (c) Kitware Inc.
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0.txt
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. =========================================================================*/
  14. #ifndef __ctkVTKRenderView_p_h
  15. #define __ctkVTKRenderView_p_h
  16. // Qt includes
  17. #include <QObject>
  18. // CTK includes
  19. #include <ctkPimpl.h>
  20. #include "ctkVTKAbstractView_p.h"
  21. #include <ctkVTKObject.h>
  22. #include "ctkVTKRenderView.h"
  23. // VTK includes
  24. #include <vtkAxesActor.h>
  25. #include <vtkCornerAnnotation.h>
  26. #include <vtkOrientationMarkerWidget.h>
  27. #include <vtkRenderer.h>
  28. #include <vtkRenderWindow.h>
  29. #include <vtkSmartPointer.h>
  30. #include <vtkWeakPointer.h>
  31. class vtkRenderWindowInteractor;
  32. //-----------------------------------------------------------------------------
  33. /// \ingroup Visualization_VTK_Widgets
  34. class ctkVTKRenderViewPrivate : public ctkVTKAbstractViewPrivate
  35. {
  36. Q_OBJECT
  37. Q_DECLARE_PUBLIC(ctkVTKRenderView);
  38. public:
  39. ctkVTKRenderViewPrivate(ctkVTKRenderView& object);
  40. /// Convenient setup methods
  41. virtual void setupCornerAnnotation();
  42. virtual void setupRendering();
  43. void zoom(double zoomFactor);
  44. void pitch(double rotateDegrees, ctkVTKRenderView::RotateDirection pitchDirection);
  45. void roll(double rotateDegrees, ctkVTKRenderView::RotateDirection rollDirection);
  46. void yaw(double rotateDegrees, ctkVTKRenderView::RotateDirection yawDirection);
  47. public Q_SLOTS:
  48. void doSpin();
  49. void doRock();
  50. public:
  51. vtkSmartPointer<vtkRenderer> Renderer;
  52. vtkSmartPointer<vtkAxesActor> Axes;
  53. vtkSmartPointer<vtkOrientationMarkerWidget> Orientation;
  54. double ZoomFactor;
  55. double PitchRollYawIncrement;
  56. ctkVTKRenderView::RotateDirection PitchDirection;
  57. ctkVTKRenderView::RotateDirection RollDirection;
  58. ctkVTKRenderView::RotateDirection YawDirection;
  59. ctkVTKRenderView::RotateDirection SpinDirection;
  60. bool SpinEnabled;
  61. int AnimationIntervalMs;
  62. double SpinIncrement;
  63. bool RockEnabled;
  64. int RockIncrement;
  65. int RockLength;
  66. };
  67. #endif