VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkDistanceToCamera.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright 2008 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 00019 -------------------------------------------------------------------------*/ 00031 #ifndef __vtkDistanceToCamera_h 00032 #define __vtkDistanceToCamera_h 00033 00034 #include "vtkPolyDataAlgorithm.h" 00035 00036 class vtkRenderer; 00037 00038 class VTK_RENDERING_EXPORT vtkDistanceToCamera : public vtkPolyDataAlgorithm 00039 { 00040 public: 00041 static vtkDistanceToCamera *New(); 00042 vtkTypeMacro(vtkDistanceToCamera,vtkPolyDataAlgorithm); 00043 void PrintSelf(ostream& os, vtkIndent indent); 00044 00046 00047 void SetRenderer(vtkRenderer* ren); 00048 vtkGetObjectMacro(Renderer, vtkRenderer); 00050 00052 00054 vtkSetMacro(ScreenSize, double); 00055 vtkGetMacro(ScreenSize, double); 00057 00059 00060 vtkSetMacro(Scaling, bool); 00061 vtkGetMacro(Scaling, bool); 00062 vtkBooleanMacro(Scaling, bool); 00064 00066 virtual unsigned long GetMTime(); 00067 00068 protected: 00069 vtkDistanceToCamera(); 00070 ~vtkDistanceToCamera(); 00071 00072 int RequestData( 00073 vtkInformation *, 00074 vtkInformationVector **, 00075 vtkInformationVector *); 00076 00077 vtkRenderer* Renderer; 00078 double ScreenSize; 00079 bool Scaling; 00080 int LastRendererSize[2]; 00081 double LastCameraPosition[3]; 00082 double LastCameraFocalPoint[3]; 00083 double LastCameraViewUp[3]; 00084 double LastCameraParallelScale; 00085 00086 private: 00087 vtkDistanceToCamera(const vtkDistanceToCamera&); // Not implemented. 00088 void operator=(const vtkDistanceToCamera&); // Not implemented. 00089 }; 00090 00091 #endif