VTK
vtkOpenGLPolyDataMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGLPolyDataMapper.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
30 #ifndef vtkOpenGLPolyDataMapper_h
31 #define vtkOpenGLPolyDataMapper_h
32 
33 #include "vtkRenderingOpenGLModule.h" // For export macro
34 #include "vtkPolyDataMapper.h"
35 
36 #include "vtkOpenGL.h" // Needed for GLenum
37 
38 class vtkCellArray;
39 class vtkPoints;
40 class vtkProperty;
41 class vtkRenderWindow;
42 class vtkOpenGLRenderer;
43 class vtkOpenGLTexture;
44 #if !defined(VTK_LEGACY_REMOVE)
45 class VTKRENDERINGOPENGL_EXPORT vtkOpenGLPolyDataMapper : public vtkPolyDataMapper
46 {
47 public:
48  static vtkOpenGLPolyDataMapper *New();
50  virtual void PrintSelf(ostream& os, vtkIndent indent);
51 
53  virtual void RenderPiece(vtkRenderer *ren, vtkActor *a);
54 
59 
61  virtual int Draw(vtkRenderer *ren, vtkActor *a);
62 
63 protected:
66 
67  void DrawPoints(int idx,
68  vtkPoints *p,
69  vtkDataArray *n,
71  vtkDataArray *t,
72  vtkIdType &cellNum,
73  int &noAbort,
74  vtkCellArray *ca,
75  vtkRenderer *ren);
76 
77  void DrawLines(int idx,
78  vtkPoints *p,
79  vtkDataArray *n,
81  vtkDataArray *t,
82  vtkIdType &cellNum,
83  int &noAbort,
84  vtkCellArray *ca,
85  vtkRenderer *ren);
86 
87  void DrawPolygons(int idx,
88  vtkPoints *p,
89  vtkDataArray *n,
91  vtkDataArray *t,
92  vtkIdType &cellNum,
93  int &noAbort,
94  GLenum rep,
95  vtkCellArray *ca,
96  vtkRenderer *ren);
97 
98  void DrawTStrips(int idx,
99  vtkPoints *p,
100  vtkDataArray *n,
102  vtkDataArray *t,
103  vtkIdType &cellNum,
104  int &noAbort,
105  GLenum rep,
106  vtkCellArray *ca,
107  vtkRenderer *ren);
108 
110  int ListId;
112 
113 private:
114  vtkOpenGLPolyDataMapper(const vtkOpenGLPolyDataMapper&); // Not implemented.
115  void operator=(const vtkOpenGLPolyDataMapper&); // Not implemented.
116 };
117 #endif // VTK_LEGACY_REMOVE
118 #endif
a PolyDataMapper for the OpenGL library
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:50
virtual void ReleaseGraphicsResources(vtkWindow *)
Definition: vtkMapper.h:109
represent surface properties of a geometric object
Definition: vtkProperty.h:63
abstract specification for renderers
Definition: vtkRenderer.h:62
int vtkIdType
Definition: vtkType.h:247
virtual void RenderPiece(vtkRenderer *ren, vtkActor *act)=0
vtkOpenGLTexture * InternalColorTexture
OpenGL texture map.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
a simple class to control print indentation
Definition: vtkIndent.h:38
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
dynamic, self-adjusting array of unsigned char
map vtkPolyData to graphics primitives
object to represent cell connectivity
Definition: vtkCellArray.h:49
create a window for renderers to draw into
void PrintSelf(ostream &os, vtkIndent indent)
static vtkPolyDataMapper * New()
OpenGL renderer.
represent and manipulate 3D points
Definition: vtkPoints.h:38