VTK  9.1.0
vtkCameraHandleSource.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkCameraHandleSource.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=========================================================================*/
28#ifndef vtkCameraHandleSource_h
29#define vtkCameraHandleSource_h
30
31#include "vtkCamera.h" // for vtkCamera
32#include "vtkHandleSource.h"
33#include "vtkInteractionWidgetsModule.h" // For export macro
34
35class vtkArrowSource;
36class vtkActor;
38class vtkSphereSource;
39class vtkTransform;
41
42class VTKINTERACTIONWIDGETS_EXPORT vtkCameraHandleSource : public vtkHandleSource
43{
44public:
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
53 void SetCamera(vtkCamera* cam);
54
56
60 void SetPosition(double xPos, double yPos, double zPos) override;
62 double* GetPosition() override;
64
66
72 void SetDirection(double xTarget, double yTarget, double zTarget) override;
74 double* GetDirection() override;
76
78 void operator=(const vtkCameraHandleSource&) = delete;
79
80protected:
84
86
88
89private:
92 vtkNew<vtkArrowSource> FrontArrow;
93 vtkNew<vtkTransform> UpTransform;
94 vtkNew<vtkTransformFilter> UpTransformFilter;
95 vtkNew<vtkTransform> FrontTransform;
96 vtkNew<vtkTransformFilter> FrontTransformFilter;
97 vtkNew<vtkAppendPolyData> ArrowsAppend;
98 vtkNew<vtkSphereSource> PositionSphere;
99};
100
101#endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:155
appends one or more polygonal datasets together
Appends a cylinder to a cone to form an arrow.
handle source used to represent one camera.
~vtkCameraHandleSource() override
double * GetDirection() override
Set/Get the direction of the camera handle.
void SetCamera(vtkCamera *cam)
Set the camera represented by this handle.
static vtkCameraHandleSource * New()
double * GetPosition() override
Set/Get the position of the camera handle.
void SetPosition(double xPos, double yPos, double zPos) override
Set/Get the position of the camera handle.
void operator=(const vtkCameraHandleSource &)=delete
void SetDirection(double xTarget, double yTarget, double zTarget) override
Set/Get the direction of the camera handle.
vtkCameraHandleSource(const vtkCameraHandleSource &)=delete
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
a virtual camera for 3D rendering
Definition: vtkCamera.h:155
interface that can be inherited to define handler sources for any kind of interaction.
void SetPosition(const double pos[3])
Set the position of the handle.
void SetDirection(const double dir[3])
Set the direction of the handle.
virtual double * GetPosition()=0
Get the position of the handle.
virtual double * GetDirection()=0
Get the direction of the handle.
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
static vtkSmartPointer< T > New()
Create an instance of a VTK object.
create a polygonal sphere centered at the origin
transform points and associated normals and vectors
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:164