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 =========================================================================*/
25 #ifndef vtkOpenGLPolyDataMapper_h
26 #define vtkOpenGLPolyDataMapper_h
27 
28 #include "vtkRenderingOpenGLModule.h" // For export macro
29 #include "vtkPolyDataMapper.h"
30 
31 #include "vtkOpenGL.h" // Needed for GLenum
32 
33 class vtkCellArray;
34 class vtkPoints;
35 class vtkProperty;
36 class vtkRenderWindow;
37 class vtkOpenGLRenderer;
38 class vtkOpenGLTexture;
39 #if !defined(VTK_LEGACY_REMOVE)
40 class VTKRENDERINGOPENGL_EXPORT vtkOpenGLPolyDataMapper : public vtkPolyDataMapper
41 {
42 public:
43  static vtkOpenGLPolyDataMapper *New();
45  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
46 
50  virtual void RenderPiece(vtkRenderer *ren, vtkActor *a);
51 
58 
62  virtual int Draw(vtkRenderer *ren, vtkActor *a);
63 
64 protected:
67 
68  void DrawPoints(int idx,
69  vtkPoints *p,
70  vtkDataArray *n,
72  vtkDataArray *t,
73  vtkIdType &cellNum,
74  int &noAbort,
75  vtkCellArray *ca,
76  vtkRenderer *ren);
77 
78  void DrawLines(int idx,
79  vtkPoints *p,
80  vtkDataArray *n,
82  vtkDataArray *t,
83  vtkIdType &cellNum,
84  int &noAbort,
85  vtkCellArray *ca,
86  vtkRenderer *ren);
87 
88  void DrawPolygons(int idx,
89  vtkPoints *p,
90  vtkDataArray *n,
92  vtkDataArray *t,
93  vtkIdType &cellNum,
94  int &noAbort,
95  GLenum rep,
96  vtkCellArray *ca,
97  vtkRenderer *ren);
98 
99  void DrawTStrips(int idx,
100  vtkPoints *p,
101  vtkDataArray *n,
103  vtkDataArray *t,
104  vtkIdType &cellNum,
105  int &noAbort,
106  GLenum rep,
107  vtkCellArray *ca,
108  vtkRenderer *ren);
109 
111  int ListId;
113 
114 private:
115  vtkOpenGLPolyDataMapper(const vtkOpenGLPolyDataMapper&) VTK_DELETE_FUNCTION;
116  void operator=(const vtkOpenGLPolyDataMapper&) VTK_DELETE_FUNCTION;
117 };
118 #endif // VTK_LEGACY_REMOVE
119 #endif
a PolyDataMapper for the OpenGL library
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
virtual void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this mapper.
Definition: vtkMapper.h:119
represent surface properties of a geometric object
Definition: vtkProperty.h:64
abstract specification for renderers
Definition: vtkRenderer.h:63
int vtkIdType
Definition: vtkType.h:287
virtual void RenderPiece(vtkRenderer *ren, vtkActor *act)=0
Implemented by sub classes.
vtkOpenGLTexture * InternalColorTexture
OpenGL texture map.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
a simple class to control print indentation
Definition: vtkIndent.h:39
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:50
create a window for renderers to draw into
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
static vtkPolyDataMapper * New()
OpenGL renderer.
represent and manipulate 3D points
Definition: vtkPoints.h:39