VTK
vtkCameraRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCameraRepresentation.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
30 #ifndef vtkCameraRepresentation_h
31 #define vtkCameraRepresentation_h
32 
33 #include "vtkInteractionWidgetsModule.h" // For export macro
35 
36 class vtkRenderer;
38 class vtkCamera;
40 class vtkPoints;
41 class vtkPolyData;
44 class vtkProperty2D;
45 class vtkActor2D;
46 
47 class VTKINTERACTIONWIDGETS_EXPORT vtkCameraRepresentation : public vtkBorderRepresentation
48 {
49 public:
53  static vtkCameraRepresentation *New();
54 
56 
60  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
62 
64 
68  void SetCamera(vtkCamera *camera);
69  vtkGetObjectMacro(Camera,vtkCamera);
71 
73 
80  void SetInterpolator(vtkCameraInterpolator *camInt);
81  vtkGetObjectMacro(Interpolator,vtkCameraInterpolator);
83 
85 
88  vtkSetClampMacro(NumberOfFrames,int,1,VTK_INT_MAX);
89  vtkGetMacro(NumberOfFrames,int);
91 
93 
97  vtkGetObjectMacro(Property,vtkProperty2D);
99 
101 
108  void AddCameraToPath();
109  void AnimatePath(vtkRenderWindowInteractor *rwi);
110  void InitializePath();
112 
116  void BuildRepresentation() VTK_OVERRIDE;
117  void GetSize(double size[2]) VTK_OVERRIDE
118  {size[0]=6.0; size[1]=2.0;}
119 
121 
125  void GetActors2D(vtkPropCollection*) VTK_OVERRIDE;
126  void ReleaseGraphicsResources(vtkWindow*) VTK_OVERRIDE;
127  int RenderOverlay(vtkViewport*) VTK_OVERRIDE;
128  int RenderOpaqueGeometry(vtkViewport*) VTK_OVERRIDE;
129  int RenderTranslucentPolygonalGeometry(vtkViewport*) VTK_OVERRIDE;
130  int HasTranslucentPolygonalGeometry() VTK_OVERRIDE;
132 
133 protected:
135  ~vtkCameraRepresentation() VTK_OVERRIDE;
136 
137  // the camera and the interpolator
138  vtkCamera *Camera;
139  vtkCameraInterpolator *Interpolator;
140  int NumberOfFrames;
141  double CurrentTime;
142 
143  // representation of the camera
144  vtkPoints *Points;
145  vtkPolyData *PolyData;
146  vtkTransformPolyDataFilter *TransformFilter;
148  vtkProperty2D *Property;
149  vtkActor2D *Actor;
150 
151 private:
152  vtkCameraRepresentation(const vtkCameraRepresentation&) VTK_DELETE_FUNCTION;
153  void operator=(const vtkCameraRepresentation&) VTK_DELETE_FUNCTION;
154 };
155 
156 #endif
interpolate a series of cameras to update a new camera
abstract specification for Viewports
Definition: vtkViewport.h:44
#define VTK_INT_MAX
Definition: vtkType.h:157
a actor that draws 2D data
Definition: vtkActor2D.h:39
void GetActors2D(vtkPropCollection *) override
These methods are necessary to make this representation behave as a vtkProp.
abstract specification for renderers
Definition: vtkRenderer.h:57
transform points and associated normals and vectors for polygonal dataset
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
static vtkBorderRepresentation * New()
Instantiate this class.
an ordered list of Props
void PrintSelf(ostream &os, vtkIndent indent) override
Define standard methods.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
platform-independent render window interaction including picking and frame rate control.
void BuildRepresentation() override
Subclasses should implement these methods.
a simple class to control print indentation
Definition: vtkIndent.h:33
a virtual camera for 3D rendering
Definition: vtkCamera.h:44
represent a vtkBorderWidget
represent the vtkCameraWidget
represent surface properties of a 2D image
Definition: vtkProperty2D.h:37
draw vtkPolyData onto the image plane
represent and manipulate 3D points
Definition: vtkPoints.h:33