VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkCameraActor.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 =========================================================================*/ 00025 #ifndef __vtkCameraActor_h 00026 #define __vtkCameraActor_h 00027 00028 #include "vtkRenderingCoreModule.h" // For export macro 00029 #include "vtkProp3D.h" 00030 00031 class vtkCamera; 00032 class vtkFrustumSource; 00033 class vtkPolyDataMapper; 00034 class vtkActor; 00035 class vtkProperty; 00036 00037 class VTKRENDERINGCORE_EXPORT vtkCameraActor : public vtkProp3D 00038 { 00039 public: 00040 static vtkCameraActor *New(); 00041 vtkTypeMacro(vtkCameraActor, vtkProp3D); 00042 void PrintSelf(ostream& os, vtkIndent indent); 00043 00045 00046 void SetCamera(vtkCamera *camera); 00047 vtkGetObjectMacro(Camera, vtkCamera); 00049 00051 00053 vtkSetMacro(WidthByHeightRatio, double); 00054 vtkGetMacro(WidthByHeightRatio, double); 00056 00058 virtual int RenderOpaqueGeometry(vtkViewport *viewport); 00059 00061 virtual int HasTranslucentPolygonalGeometry(); 00062 00066 void ReleaseGraphicsResources(vtkWindow *); 00067 00069 double *GetBounds(); 00070 00072 unsigned long int GetMTime(); 00073 00075 vtkProperty *GetProperty(); 00076 00078 void SetProperty(vtkProperty *p); 00079 00080 protected: 00081 vtkCameraActor(); 00082 ~vtkCameraActor(); 00083 00084 void UpdateViewProps(); 00085 00086 vtkCamera *Camera; 00087 double WidthByHeightRatio; 00088 00089 vtkFrustumSource *FrustumSource; 00090 vtkPolyDataMapper *FrustumMapper; 00091 vtkActor *FrustumActor; 00092 00093 private: 00094 vtkCameraActor(const vtkCameraActor&); // Not implemented. 00095 void operator=(const vtkCameraActor&); // Not implemented. 00096 }; 00097 00098 #endif