00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkOpenGLImageActor.h,v $ 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 =========================================================================*/ 00035 #ifndef __vtkOpenGLImageActor_h 00036 #define __vtkOpenGLImageActor_h 00037 00038 #include "vtkImageActor.h" 00039 00040 class vtkWindow; 00041 class vtkOpenGLRenderer; 00042 class vtkRenderWindow; 00043 00044 class VTK_RENDERING_EXPORT vtkOpenGLImageActor : public vtkImageActor 00045 { 00046 public: 00047 static vtkOpenGLImageActor *New(); 00048 vtkTypeRevisionMacro(vtkOpenGLImageActor,vtkImageActor); 00049 virtual void PrintSelf(ostream& os, vtkIndent indent); 00050 00052 void Load(vtkRenderer *ren); 00053 00055 void Render(vtkRenderer *ren); 00056 00061 void ReleaseGraphicsResources(vtkWindow *); 00062 00063 protected: 00064 vtkOpenGLImageActor(); 00065 ~vtkOpenGLImageActor(); 00066 00067 unsigned char *MakeDataSuitable(int &xsize, int &ysize, 00068 int &release, int &reuseTexture); 00069 00070 vtkTimeStamp LoadTime; 00071 long Index; 00072 vtkRenderWindow *RenderWindow; // RenderWindow used for previous render 00073 double Coords[12]; 00074 double TCoords[8]; 00075 int TextureSize[2]; 00076 private: 00077 vtkOpenGLImageActor(const vtkOpenGLImageActor&); // Not implemented. 00078 void operator=(const vtkOpenGLImageActor&); // Not implemented. 00079 }; 00080 00081 #endif