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) 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() override;
117  void GetSize(double size[2]) override
118  {size[0]=6.0; size[1]=2.0;}
119 
121 
125  void GetActors2D(vtkPropCollection*) override;
126  void ReleaseGraphicsResources(vtkWindow*) override;
127  int RenderOverlay(vtkViewport*) override;
128  int RenderOpaqueGeometry(vtkViewport*) override;
130  int HasTranslucentPolygonalGeometry() override;
132 
133 protected:
135  ~vtkCameraRepresentation() override;
136 
137  // the camera and the interpolator
141  double CurrentTime;
142 
143  // representation of the camera
150 
151 private:
153  void operator=(const vtkCameraRepresentation&) = delete;
154 };
155 
156 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:33
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:159
vtkPolyDataMapper2D
draw vtkPolyData onto the image plane
Definition: vtkPolyDataMapper2D.h:45
vtkBorderRepresentation
represent a vtkBorderWidget
Definition: vtkBorderRepresentation.h:55
vtkCameraRepresentation::GetSize
void GetSize(double size[2]) override
Definition: vtkCameraRepresentation.h:117
vtkBorderRepresentation::RenderOpaqueGeometry
int RenderOpaqueGeometry(vtkViewport *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
vtkBorderRepresentation::New
static vtkBorderRepresentation * New()
Instantiate this class.
vtkCameraRepresentation::Camera
vtkCamera * Camera
Definition: vtkCameraRepresentation.h:138
vtkCameraInterpolator
interpolate a series of cameras to update a new camera
Definition: vtkCameraInterpolator.h:61
vtkBorderRepresentation::BuildRepresentation
void BuildRepresentation() override
Subclasses should implement these methods.
vtkBorderRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkBorderRepresentation::GetActors2D
void GetActors2D(vtkPropCollection *) override
These methods are necessary to make this representation behave as a vtkProp.
vtkCameraRepresentation
represent the vtkCameraWidget
Definition: vtkCameraRepresentation.h:47
vtkCameraRepresentation::Interpolator
vtkCameraInterpolator * Interpolator
Definition: vtkCameraRepresentation.h:139
vtkBorderRepresentation.h
vtkBorderRepresentation::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkCameraRepresentation::Actor
vtkActor2D * Actor
Definition: vtkCameraRepresentation.h:149
vtkCamera
a virtual camera for 3D rendering
Definition: vtkCamera.h:44
vtkBorderRepresentation::RenderTranslucentPolygonalGeometry
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
vtkX3D::size
Definition: vtkX3D.h:253
vtkTransformPolyDataFilter
transform points and associated normals and vectors for polygonal dataset
Definition: vtkTransformPolyDataFilter.h:45
vtkRenderWindowInteractor
platform-independent render window interaction including picking and frame rate control.
Definition: vtkRenderWindowInteractor.h:72
vtkCameraRepresentation::NumberOfFrames
int NumberOfFrames
Definition: vtkCameraRepresentation.h:140
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:44
vtkCameraRepresentation::CurrentTime
double CurrentTime
Definition: vtkCameraRepresentation.h:141
vtkProperty2D
represent surface properties of a 2D image
Definition: vtkProperty2D.h:37
vtkActor2D
a actor that draws 2D data
Definition: vtkActor2D.h:39
vtkCameraRepresentation::Points
vtkPoints * Points
Definition: vtkCameraRepresentation.h:144
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:57
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
vtkCameraRepresentation::PolyData
vtkPolyData * PolyData
Definition: vtkCameraRepresentation.h:145
vtkCameraRepresentation::Property
vtkProperty2D * Property
Definition: vtkCameraRepresentation.h:148
vtkBorderRepresentation::RenderOverlay
int RenderOverlay(vtkViewport *) override
vtkPropCollection
an ordered list of Props
Definition: vtkPropCollection.h:35
vtkCameraRepresentation::Mapper
vtkPolyDataMapper2D * Mapper
Definition: vtkCameraRepresentation.h:147
vtkBorderRepresentation::HasTranslucentPolygonalGeometry
int HasTranslucentPolygonalGeometry() override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
vtkCameraRepresentation::TransformFilter
vtkTransformPolyDataFilter * TransformFilter
Definition: vtkCameraRepresentation.h:146