VTK
vtkDistanceToCamera.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDistanceToCamera.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 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
35 #ifndef vtkDistanceToCamera_h
36 #define vtkDistanceToCamera_h
37 
38 #include "vtkRenderingCoreModule.h" // For export macro
39 #include "vtkPointSetAlgorithm.h"
40 
41 class vtkRenderer;
42 
43 class VTKRENDERINGCORE_EXPORT vtkDistanceToCamera : public vtkPointSetAlgorithm
44 {
45 public:
46  static vtkDistanceToCamera *New();
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
51 
54  void SetRenderer(vtkRenderer* ren);
55  vtkGetObjectMacro(Renderer, vtkRenderer);
57 
59 
63  vtkSetMacro(ScreenSize, double);
64  vtkGetMacro(ScreenSize, double);
66 
68 
71  vtkSetMacro(Scaling, bool);
72  vtkGetMacro(Scaling, bool);
73  vtkBooleanMacro(Scaling, bool);
75 
77 
81  vtkSetStringMacro(DistanceArrayName);
82  vtkGetStringMacro(DistanceArrayName);
84 
88  vtkMTimeType GetMTime() override;
89 
90 protected:
92  ~vtkDistanceToCamera() override;
93 
94  int RequestData(
97  vtkInformationVector *) override;
98 
100  double ScreenSize;
101  bool Scaling;
102  int LastRendererSize[2];
103  double LastCameraPosition[3];
104  double LastCameraFocalPoint[3];
105  double LastCameraViewUp[3];
108 
109 private:
110  vtkDistanceToCamera(const vtkDistanceToCamera&) = delete;
111  void operator=(const vtkDistanceToCamera&) = delete;
112 };
113 
114 #endif
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstract specification for renderers
Definition: vtkRenderer.h:63
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual vtkMTimeType GetMTime()
Return this object's modified time.
Superclass for algorithms that produce output of the same type as input.
static vtkPointSetAlgorithm * New()
Store zero or more vtkInformation instances.
calculates distance from points to the camera.