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