VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkFollower.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 =========================================================================*/ 00037 #ifndef __vtkFollower_h 00038 #define __vtkFollower_h 00039 00040 #include "vtkRenderingCoreModule.h" // For export macro 00041 #include "vtkActor.h" 00042 00043 class vtkCamera; 00044 00045 class VTKRENDERINGCORE_EXPORT vtkFollower : public vtkActor 00046 { 00047 public: 00048 vtkTypeMacro(vtkFollower,vtkActor); 00049 void PrintSelf(ostream& os, vtkIndent indent); 00050 00052 static vtkFollower *New(); 00053 00055 00057 virtual void SetCamera(vtkCamera*); 00058 vtkGetObjectMacro(Camera, vtkCamera); 00060 00062 00065 virtual int RenderOpaqueGeometry(vtkViewport *viewport); 00066 virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport); 00067 virtual void Render(vtkRenderer *ren); 00069 00071 virtual int HasTranslucentPolygonalGeometry(); 00072 00075 virtual void ReleaseGraphicsResources(vtkWindow*); 00076 00080 virtual void ComputeMatrix(); 00081 00083 void ShallowCopy(vtkProp *prop); 00084 00085 protected: 00086 vtkFollower(); 00087 ~vtkFollower(); 00088 00089 vtkCamera *Camera; 00090 vtkActor *Device; 00091 00092 private: 00093 vtkFollower(const vtkFollower&); // Not implemented. 00094 void operator=(const vtkFollower&); // Not implemented. 00095 00096 // hide the two parameter Render() method from the user and the compiler. 00097 virtual void Render(vtkRenderer *, vtkMapper *) {} 00098 00099 //Internal matrices to avoid New/Delete for performance reasons 00100 vtkMatrix4x4 *InternalMatrix; 00101 }; 00102 00103 #endif