VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkOpenGLPolyDataMapper.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 =========================================================================*/ 00027 #ifndef vtkOpenGLPolyDataMapper_h 00028 #define vtkOpenGLPolyDataMapper_h 00029 00030 #include "vtkRenderingOpenGLModule.h" // For export macro 00031 #include "vtkPolyDataMapper.h" 00032 00033 #include "vtkOpenGL.h" // Needed for GLenum 00034 00035 class vtkCellArray; 00036 class vtkPoints; 00037 class vtkProperty; 00038 class vtkRenderWindow; 00039 class vtkOpenGLRenderer; 00040 class vtkOpenGLTexture; 00041 #if !defined(VTK_LEGACY_REMOVE) 00042 class VTKRENDERINGOPENGL_EXPORT vtkOpenGLPolyDataMapper : public vtkPolyDataMapper 00043 { 00044 public: 00045 static vtkOpenGLPolyDataMapper *New(); 00046 vtkTypeMacro(vtkOpenGLPolyDataMapper,vtkPolyDataMapper); 00047 virtual void PrintSelf(ostream& os, vtkIndent indent); 00048 00050 virtual void RenderPiece(vtkRenderer *ren, vtkActor *a); 00051 00055 void ReleaseGraphicsResources(vtkWindow *); 00056 00058 virtual int Draw(vtkRenderer *ren, vtkActor *a); 00059 00060 protected: 00061 vtkOpenGLPolyDataMapper(); 00062 ~vtkOpenGLPolyDataMapper(); 00063 00064 void DrawPoints(int idx, 00065 vtkPoints *p, 00066 vtkDataArray *n, 00067 vtkUnsignedCharArray *c, 00068 vtkDataArray *t, 00069 vtkIdType &cellNum, 00070 int &noAbort, 00071 vtkCellArray *ca, 00072 vtkRenderer *ren); 00073 00074 void DrawLines(int idx, 00075 vtkPoints *p, 00076 vtkDataArray *n, 00077 vtkUnsignedCharArray *c, 00078 vtkDataArray *t, 00079 vtkIdType &cellNum, 00080 int &noAbort, 00081 vtkCellArray *ca, 00082 vtkRenderer *ren); 00083 00084 void DrawPolygons(int idx, 00085 vtkPoints *p, 00086 vtkDataArray *n, 00087 vtkUnsignedCharArray *c, 00088 vtkDataArray *t, 00089 vtkIdType &cellNum, 00090 int &noAbort, 00091 GLenum rep, 00092 vtkCellArray *ca, 00093 vtkRenderer *ren); 00094 00095 void DrawTStrips(int idx, 00096 vtkPoints *p, 00097 vtkDataArray *n, 00098 vtkUnsignedCharArray *c, 00099 vtkDataArray *t, 00100 vtkIdType &cellNum, 00101 int &noAbort, 00102 GLenum rep, 00103 vtkCellArray *ca, 00104 vtkRenderer *ren); 00105 00106 vtkIdType TotalCells; 00107 int ListId; 00108 vtkOpenGLTexture* InternalColorTexture; 00109 00110 private: 00111 vtkOpenGLPolyDataMapper(const vtkOpenGLPolyDataMapper&); // Not implemented. 00112 void operator=(const vtkOpenGLPolyDataMapper&); // Not implemented. 00113 }; 00114 #endif // VTK_LEGACY_REMOVE 00115 #endif