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 =========================================================================*/
35 #ifndef __vtkCameraRepresentation_h
36 #define __vtkCameraRepresentation_h
37 
39 
40 class vtkRenderer;
42 class vtkCamera;
44 class vtkPoints;
45 class vtkPolyData;
48 class vtkProperty2D;
49 class vtkActor2D;
50 
52 {
53 public:
55  static vtkCameraRepresentation *New();
56 
58 
60  void PrintSelf(ostream& os, vtkIndent indent);
62 
64 
66  void SetCamera(vtkCamera *camera);
67  vtkGetObjectMacro(Camera,vtkCamera);
69 
71 
75  void SetInterpolator(vtkCameraInterpolator *camInt);
76  vtkGetObjectMacro(Interpolator,vtkCameraInterpolator);
78 
80 
81  vtkSetClampMacro(NumberOfFrames,int,1,VTK_LARGE_INTEGER);
82  vtkGetMacro(NumberOfFrames,int);
84 
86 
88  vtkGetObjectMacro(Property,vtkProperty2D);
90 
92 
97  void AddCameraToPath();
98  void AnimatePath(vtkRenderWindowInteractor *rwi);
99  void InitializePath();
101 
103 
104  virtual void BuildRepresentation();
105  virtual void GetSize(double size[2])
106  {size[0]=6.0; size[1]=2.0;}
108 
110 
112  virtual void GetActors2D(vtkPropCollection*);
113  virtual void ReleaseGraphicsResources(vtkWindow*);
114  virtual int RenderOverlay(vtkViewport*);
115  virtual int RenderOpaqueGeometry(vtkViewport*);
117  virtual int HasTranslucentPolygonalGeometry();
119 
120 protected:
123 
124  // the camera and the interpolator
128  double CurrentTime;
129 
130  // representation of the camera
137 
138 private:
139  vtkCameraRepresentation(const vtkCameraRepresentation&); //Not implemented
140  void operator=(const vtkCameraRepresentation&); //Not implemented
141 };
142 
143 #endif