VTK  9.1.0
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
18#include "vtkRenderingOpenGL2Module.h" // for export macro
19
27class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLIndexBufferObject : public vtkOpenGLBufferObject
28{
29public:
32 void PrintSelf(ostream& os, vtkIndent indent) override;
33
34 // Sizes/offsets are all in bytes as OpenGL API expects them.
35 size_t IndexCount; // Number of indices in the VBO
36
37 // Description:
38 // used to create an IBO for triangle primitives
40 std::vector<unsigned char>* edgeArray, vtkDataArray* edgeFlags);
41
42 // Description:
43 // used to create an IBO for triangle primitives
44 static void AppendTriangleIndexBuffer(std::vector<unsigned int>& indexArray, vtkCellArray* cells,
45 vtkPoints* points, vtkIdType vertexOffset, std::vector<unsigned char>* edgeArray,
46 vtkDataArray* edgeFlags);
47
48 // Description:
49 // create a IBO for wireframe polys/tris
51
52 // Description:
53 // used to create an IBO for line primitives
55 std::vector<unsigned int>& indexArray, vtkCellArray* cells, vtkIdType vertexOffset);
56
57 // Description:
58 // create a IBO for wireframe polys/tris
60
61 // Description:
62 // create a IBO for wireframe polys/tris
64 std::vector<unsigned int>& indexArray, vtkCellArray* cells, vtkIdType vertexOffset);
65
66 // Description:
67 // used to create an IBO for primitives as points
69
70 // Description:
71 // used to create an IBO for primitives as points
73 std::vector<unsigned int>& indexArray, vtkCellArray* cells, vtkIdType vertexOffset);
74
75 // Description:
76 // used to create an IBO for line strips and triangle strips
77 size_t CreateStripIndexBuffer(vtkCellArray* cells, bool wireframeTriStrips);
78
79 static void AppendStripIndexBuffer(std::vector<unsigned int>& indexArray, vtkCellArray* cells,
80 vtkIdType vertexOffset, bool wireframeTriStrips);
81
82 // Description:
83 // special index buffer for polys wireframe with edge visibilityflags
84 static void AppendEdgeFlagIndexBuffer(std::vector<unsigned int>& indexArray, vtkCellArray* cells,
85 vtkIdType vertexOffset, vtkDataArray* edgeflags);
86
88
89 // Description:
90 // used to create an IBO for cell Vertices as points
92
93 // Description:
94 // used to create an IBO for primitives as points
96 std::vector<unsigned int>& indexArray, vtkCellArray** cells, vtkIdType vertexOffset);
97
98protected:
101
102private:
104 void operator=(const vtkOpenGLIndexBufferObject&) = delete;
105};
106
107#endif
object to represent cell connectivity
Definition: vtkCellArray.h:290
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:159
a simple class to control print indentation
Definition: vtkIndent.h:113
OpenGL buffer object.
OpenGL vertex buffer object.
size_t CreateEdgeFlagIndexBuffer(vtkCellArray *cells, vtkDataArray *edgeflags)
static vtkOpenGLIndexBufferObject * New()
static void AppendEdgeFlagIndexBuffer(std::vector< unsigned int > &indexArray, vtkCellArray *cells, vtkIdType vertexOffset, vtkDataArray *edgeflags)
static void AppendTriangleIndexBuffer(std::vector< unsigned int > &indexArray, vtkCellArray *cells, vtkPoints *points, vtkIdType vertexOffset, std::vector< unsigned char > *edgeArray, vtkDataArray *edgeFlags)
size_t CreateLineIndexBuffer(vtkCellArray *cells)
size_t CreateVertexIndexBuffer(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)
size_t CreatePointIndexBuffer(vtkCellArray *cells)
size_t CreateTriangleLineIndexBuffer(vtkCellArray *cells)
static void AppendVertexIndexBuffer(std::vector< unsigned int > &indexArray, vtkCellArray **cells, vtkIdType vertexOffset)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkOpenGLIndexBufferObject() override
size_t CreateTriangleIndexBuffer(vtkCellArray *cells, vtkPoints *points, std::vector< unsigned char > *edgeArray, vtkDataArray *edgeFlags)
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:143
@ points
Definition: vtkX3D.h:452
int vtkIdType
Definition: vtkType.h:332