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