VTK
vtkOpenGLIndexBufferObject.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4
5 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
6 All rights reserved.
7 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13=========================================================================*/
14#ifndef vtkOpenGLIndexBufferObject_h
15#define vtkOpenGLIndexBufferObject_h
16
17#include "vtkRenderingOpenGL2Module.h" // for export macro
19
20
28class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLIndexBufferObject :
30{
31public:
34 void PrintSelf(ostream& os, vtkIndent indent);
35
36 // Sizes/offsets are all in bytes as OpenGL API expects them.
37 size_t IndexCount; // Number of indices in the VBO
38
39 // Description:
40 // used to create an IBO for triangle primatives
43
44 // Description:
45 // used to create an IBO for triangle primatives
47 std::vector<unsigned int> &indexArray,
48 vtkCellArray *cells,
50 vtkIdType vertexOffset);
51
52 // Description:
53 // create a IBO for wireframe polys/tris
55
56 // Description:
57 // used to create an IBO for line primatives
59 std::vector<unsigned int> &indexArray,
60 vtkCellArray *cells,
61 vtkIdType vertexOffset);
62
63 // Description:
64 // create a IBO for wireframe polys/tris
66
67 // Description:
68 // create a IBO for wireframe polys/tris
70 std::vector<unsigned int> &indexArray,
71 vtkCellArray *cells,
72 vtkIdType vertexOffset);
73
74 // Description:
75 // used to create an IBO for primatives as points
77
78 // Description:
79 // used to create an IBO for primatives as points
81 std::vector<unsigned int> &indexArray,
82 vtkCellArray *cells,
83 vtkIdType vertexOffset);
84
85 // Description:
86 // used to create an IBO for line strips and triangle strips
88 vtkCellArray *cells, bool wireframeTriStrips);
89
91 std::vector<unsigned int> &indexArray,
92 vtkCellArray *cells,
93 vtkIdType vertexOffset, bool wireframeTriStrips);
94
95 // Description:
96 // special index buffer for polys wireframe with edge visibilityflags
98 std::vector<unsigned int> &indexArray,
99 vtkCellArray *cells,
100 vtkIdType vertexOffset, vtkDataArray *edgeflags);
101
103 vtkCellArray *cells, vtkDataArray *edgeflags);
104
105 // Create supporting arays that are needed when rendering cell data
106 // Some VTK cells have to be broken into smaller cells for OpenGL
107 // When we have cell data we have to map cell attributes from the VTK
108 // cell number to the actual OpenGL cell
109 // The following code fills in
110 //
111 // cellCellMap which maps a openGL cell id to the VTK cell it came from
112 //
114 vtkCellArray *[4],
115 std::vector<unsigned int> &cellCellMap,
116 int representation,
118
119protected:
122
123private:
124 vtkOpenGLIndexBufferObject(const vtkOpenGLIndexBufferObject&) VTK_DELETE_FUNCTION;
125 void operator=(const vtkOpenGLIndexBufferObject&) VTK_DELETE_FUNCTION;
126};
127
128#endif
object to represent cell connectivity
Definition: vtkCellArray.h:51
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
a simple class to control print indentation
Definition: vtkIndent.h:40
OpenGL buffer object.
OpenGL vertex buffer object.
static void AppendTriangleIndexBuffer(std::vector< unsigned int > &indexArray, vtkCellArray *cells, vtkPoints *points, vtkIdType vertexOffset)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
size_t CreateEdgeFlagIndexBuffer(vtkCellArray *cells, vtkDataArray *edgeflags)
static vtkOpenGLIndexBufferObject * New()
static void AppendEdgeFlagIndexBuffer(std::vector< unsigned int > &indexArray, vtkCellArray *cells, vtkIdType vertexOffset, vtkDataArray *edgeflags)
size_t CreateTriangleIndexBuffer(vtkCellArray *cells, vtkPoints *points)
size_t CreateLineIndexBuffer(vtkCellArray *cells)
static void AppendPointIndexBuffer(std::vector< unsigned int > &indexArray, vtkCellArray *cells, vtkIdType vertexOffset)
size_t CreateStripIndexBuffer(vtkCellArray *cells, bool wireframeTriStrips)
static void AppendStripIndexBuffer(std::vector< unsigned int > &indexArray, vtkCellArray *cells, vtkIdType vertexOffset, bool wireframeTriStrips)
static void CreateCellSupportArrays(vtkCellArray *[4], std::vector< unsigned int > &cellCellMap, int representation, vtkPoints *points)
size_t CreatePointIndexBuffer(vtkCellArray *cells)
size_t CreateTriangleLineIndexBuffer(vtkCellArray *cells)
static void AppendTriangleLineIndexBuffer(std::vector< unsigned int > &indexArray, vtkCellArray *cells, vtkIdType vertexOffset)
static void AppendLineIndexBuffer(std::vector< unsigned int > &indexArray, vtkCellArray *cells, vtkIdType vertexOffset)
represent and manipulate 3D points
Definition: vtkPoints.h:40
@ points
Definition: vtkX3D.h:446
int vtkIdType
Definition: vtkType.h:287