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 =========================================================================*/
36 #ifndef vtkCameraRepresentation_h
37 #define vtkCameraRepresentation_h
38 
39 #include "vtkInteractionWidgetsModule.h" // For export macro
41 
42 class vtkRenderer;
44 class vtkCamera;
46 class vtkPoints;
47 class vtkPolyData;
50 class vtkProperty2D;
51 class vtkActor2D;
52 
53 class VTKINTERACTIONWIDGETS_EXPORT vtkCameraRepresentation : public vtkBorderRepresentation
54 {
55 public:
59  static vtkCameraRepresentation *New();
60 
62 
66  void PrintSelf(ostream& os, vtkIndent indent);
68 
70 
74  void SetCamera(vtkCamera *camera);
75  vtkGetObjectMacro(Camera,vtkCamera);
77 
79 
86  void SetInterpolator(vtkCameraInterpolator *camInt);
87  vtkGetObjectMacro(Interpolator,vtkCameraInterpolator);
89 
91 
94  vtkSetClampMacro(NumberOfFrames,int,1,VTK_INT_MAX);
95  vtkGetMacro(NumberOfFrames,int);
97 
99 
103  vtkGetObjectMacro(Property,vtkProperty2D);
105 
107 
114  void AddCameraToPath();
115  void AnimatePath(vtkRenderWindowInteractor *rwi);
116  void InitializePath();
118 
122  virtual void BuildRepresentation();
123  virtual void GetSize(double size[2])
124  {size[0]=6.0; size[1]=2.0;}
125 
127 
131  virtual void GetActors2D(vtkPropCollection*);
132  virtual void ReleaseGraphicsResources(vtkWindow*);
133  virtual int RenderOverlay(vtkViewport*);
134  virtual int RenderOpaqueGeometry(vtkViewport*);
136  virtual int HasTranslucentPolygonalGeometry();
138 
139 protected:
142 
143  // the camera and the interpolator
147  double CurrentTime;
148 
149  // representation of the camera
156 
157 private:
158  vtkCameraRepresentation(const vtkCameraRepresentation&) VTK_DELETE_FUNCTION;
159  void operator=(const vtkCameraRepresentation&) VTK_DELETE_FUNCTION;
160 };
161 
162 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:153
vtkBorderRepresentation::HasTranslucentPolygonalGeometry
virtual int HasTranslucentPolygonalGeometry()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
vtkPolyDataMapper2D
draw vtkPolyData onto the image plane
Definition: vtkPolyDataMapper2D.h:51
vtkBorderRepresentation
represent a vtkBorderWidget
Definition: vtkBorderRepresentation.h:58
vtkBorderRepresentation::GetActors2D
virtual void GetActors2D(vtkPropCollection *)
These methods are necessary to make this representation behave as a vtkProp.
vtkBorderRepresentation::New
static vtkBorderRepresentation * New()
Instantiate this class.
vtkCameraRepresentation::Camera
vtkCamera * Camera
Definition: vtkCameraRepresentation.h:144
vtkBorderRepresentation::RenderTranslucentPolygonalGeometry
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
vtkCameraInterpolator
interpolate a series of cameras to update a new camera
Definition: vtkCameraInterpolator.h:67
vtkBorderRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkCameraRepresentation::GetSize
virtual void GetSize(double size[2])
Definition: vtkCameraRepresentation.h:123
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkCameraRepresentation
represent the vtkCameraWidget
Definition: vtkCameraRepresentation.h:53
vtkCameraRepresentation::Interpolator
vtkCameraInterpolator * Interpolator
Definition: vtkCameraRepresentation.h:145
vtkBorderRepresentation::RenderOpaqueGeometry
virtual int RenderOpaqueGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
vtkBorderRepresentation.h
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkCameraRepresentation::Actor
vtkActor2D * Actor
Definition: vtkCameraRepresentation.h:155
vtkCamera
a virtual camera for 3D rendering
Definition: vtkCamera.h:50
vtkBorderRepresentation::BuildRepresentation
virtual void BuildRepresentation()
Subclasses should implement these methods.
vtkX3D::size
Definition: vtkX3D.h:253
vtkTransformPolyDataFilter
transform points and associated normals and vectors for polygonal dataset
Definition: vtkTransformPolyDataFilter.h:51
vtkRenderWindowInteractor
platform-independent render window interaction including picking and frame rate control.
Definition: vtkRenderWindowInteractor.h:78
vtkCameraRepresentation::NumberOfFrames
int NumberOfFrames
Definition: vtkCameraRepresentation.h:146
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:47
vtkCameraRepresentation::CurrentTime
double CurrentTime
Definition: vtkCameraRepresentation.h:147
vtkBorderRepresentation::RenderOverlay
virtual int RenderOverlay(vtkViewport *)
vtkProperty2D
represent surface properties of a 2D image
Definition: vtkProperty2D.h:40
vtkActor2D
a actor that draws 2D data
Definition: vtkActor2D.h:45
vtkBorderRepresentation::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
vtkCameraRepresentation::Points
vtkPoints * Points
Definition: vtkCameraRepresentation.h:150
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:63
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
vtkCameraRepresentation::PolyData
vtkPolyData * PolyData
Definition: vtkCameraRepresentation.h:151
vtkCameraRepresentation::Property
vtkProperty2D * Property
Definition: vtkCameraRepresentation.h:154
vtkPropCollection
a list of Props
Definition: vtkPropCollection.h:38
vtkCameraRepresentation::Mapper
vtkPolyDataMapper2D * Mapper
Definition: vtkCameraRepresentation.h:153
vtkCameraRepresentation::TransformFilter
vtkTransformPolyDataFilter * TransformFilter
Definition: vtkCameraRepresentation.h:152