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 "vtkRenderingCoreModule.h" // For export macro 00035 #include "vtkPolyDataAlgorithm.h" 00036 00037 class vtkRenderer; 00038 00039 class VTKRENDERINGCORE_EXPORT vtkDistanceToCamera : public vtkPolyDataAlgorithm 00040 { 00041 public: 00042 static vtkDistanceToCamera *New(); 00043 vtkTypeMacro(vtkDistanceToCamera,vtkPolyDataAlgorithm); 00044 void PrintSelf(ostream& os, vtkIndent indent); 00045 00047 00048 void SetRenderer(vtkRenderer* ren); 00049 vtkGetObjectMacro(Renderer, vtkRenderer); 00051 00053 00055 vtkSetMacro(ScreenSize, double); 00056 vtkGetMacro(ScreenSize, double); 00058 00060 00061 vtkSetMacro(Scaling, bool); 00062 vtkGetMacro(Scaling, bool); 00063 vtkBooleanMacro(Scaling, bool); 00065 00067 virtual unsigned long GetMTime(); 00068 00069 protected: 00070 vtkDistanceToCamera(); 00071 ~vtkDistanceToCamera(); 00072 00073 int RequestData( 00074 vtkInformation *, 00075 vtkInformationVector **, 00076 vtkInformationVector *); 00077 00078 vtkRenderer* Renderer; 00079 double ScreenSize; 00080 bool Scaling; 00081 int LastRendererSize[2]; 00082 double LastCameraPosition[3]; 00083 double LastCameraFocalPoint[3]; 00084 double LastCameraViewUp[3]; 00085 double LastCameraParallelScale; 00086 00087 private: 00088 vtkDistanceToCamera(const vtkDistanceToCamera&); // Not implemented. 00089 void operator=(const vtkDistanceToCamera&); // Not implemented. 00090 }; 00091 00092 #endif