VTK  9.3.1
vtkCameraRepresentation.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
21 #ifndef vtkCameraRepresentation_h
22 #define vtkCameraRepresentation_h
23 
25 #include "vtkInteractionWidgetsModule.h" // For export macro
26 
27 VTK_ABI_NAMESPACE_BEGIN
28 class vtkRenderer;
30 class vtkCamera;
32 class vtkPoints;
33 class vtkPolyData;
36 class vtkProperty2D;
37 class vtkActor2D;
38 
39 class VTKINTERACTIONWIDGETS_EXPORT vtkCameraRepresentation : public vtkBorderRepresentation
40 {
41 public:
45  static vtkCameraRepresentation* New();
46 
48 
52  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
56 
60  void SetCamera(vtkCamera* camera);
61  vtkGetObjectMacro(Camera, vtkCamera);
63 
65 
72  void SetInterpolator(vtkCameraInterpolator* camInt);
73  vtkGetObjectMacro(Interpolator, vtkCameraInterpolator);
75 
77 
80  vtkSetClampMacro(NumberOfFrames, int, 1, VTK_INT_MAX);
81  vtkGetMacro(NumberOfFrames, int);
83 
85 
89  vtkGetObjectMacro(Property, vtkProperty2D);
91 
93 
100  void AddCameraToPath();
101  void AnimatePath(vtkRenderWindowInteractor* rwi);
102  void InitializePath();
104 
108  void BuildRepresentation() override;
109  void GetSize(double size[2]) override
110  {
111  size[0] = 6.0;
112  size[1] = 2.0;
113  }
114 
116 
120  void GetActors2D(vtkPropCollection*) override;
121  void ReleaseGraphicsResources(vtkWindow*) override;
122  int RenderOverlay(vtkViewport*) override;
123  int RenderOpaqueGeometry(vtkViewport*) override;
127 
128 protected:
130  ~vtkCameraRepresentation() override;
131 
132  // the camera and the interpolator
136  double CurrentTime;
137 
138  // representation of the camera
145 
146 private:
148  void operator=(const vtkCameraRepresentation&) = delete;
149 };
150 
151 VTK_ABI_NAMESPACE_END
152 #endif
int RenderOverlay(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
interpolate a series of cameras to update a new camera
vtkTypeBool HasTranslucentPolygonalGeometry() override
These methods are necessary to make this representation behave as a vtkProp.
abstract specification for Viewports
Definition: vtkViewport.h:44
#define VTK_INT_MAX
Definition: vtkType.h:144
a actor that draws 2D data
Definition: vtkActor2D.h:34
int RenderOpaqueGeometry(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
void GetActors2D(vtkPropCollection *) override
These methods are necessary to make this representation behave as a vtkProp.
abstract specification for renderers
Definition: vtkRenderer.h:61
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.
int vtkTypeBool
Definition: vtkABI.h:64
window superclass for vtkRenderWindow
Definition: vtkWindow.h:27
platform-independent render window interaction including picking and frame rate control.
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
void BuildRepresentation() override
Subclasses should implement these methods.
a simple class to control print indentation
Definition: vtkIndent.h:28
vtkCameraInterpolator * Interpolator
a virtual camera for 3D rendering
Definition: vtkCamera.h:40
void ReleaseGraphicsResources(vtkWindow *) override
These methods are necessary to make this representation behave as a vtkProp.
represent a vtkBorderWidget
represent the vtkCameraWidget
represent surface properties of a 2D image
Definition: vtkProperty2D.h:29
vtkTransformPolyDataFilter * TransformFilter
draw vtkPolyData onto the image plane
represent and manipulate 3D points
Definition: vtkPoints.h:28
void GetSize(double size[2]) override
Subclasses should implement these methods.
vtkPolyDataMapper2D * Mapper