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 "vtkActor.h" 00041 00042 class vtkCamera; 00043 00044 class VTK_RENDERING_EXPORT vtkFollower : public vtkActor 00045 { 00046 public: 00047 vtkTypeMacro(vtkFollower,vtkActor); 00048 void PrintSelf(ostream& os, vtkIndent indent); 00049 00051 static vtkFollower *New(); 00052 00054 00056 virtual void SetCamera(vtkCamera*); 00057 vtkGetObjectMacro(Camera,vtkCamera); 00059 00061 00064 virtual int RenderOpaqueGeometry(vtkViewport *viewport); 00065 virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport); 00066 virtual void Render(vtkRenderer *ren); 00068 00070 virtual int HasTranslucentPolygonalGeometry(); 00071 00074 virtual void ReleaseGraphicsResources(vtkWindow*); 00075 00079 virtual void ComputeMatrix(); 00080 00082 void ShallowCopy(vtkProp *prop); 00083 00084 protected: 00085 vtkFollower(); 00086 ~vtkFollower(); 00087 00088 vtkCamera *Camera; 00089 vtkActor *Device; 00090 00091 private: 00092 vtkFollower(const vtkFollower&); // Not implemented. 00093 void operator=(const vtkFollower&); // Not implemented. 00094 00095 // hide the two parameter Render() method from the user and the compiler. 00096 virtual void Render(vtkRenderer *, vtkMapper *) {}; 00097 00098 //Internal matrices to avoid New/Delete for performance reasons 00099 vtkMatrix4x4 *InternalMatrix; 00100 00101 }; 00102 00103 #endif 00104 00105 00106