VTK  9.0.1
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 "vtkOpenGLBufferObject.h"
18 #include "vtkRenderingOpenGL2Module.h" // for export macro
19 
27 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLIndexBufferObject : public vtkOpenGLBufferObject
28 {
29 public:
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 
41  // Description:
42  // used to create an IBO for triangle primitives
43  static void AppendTriangleIndexBuffer(std::vector<unsigned int>& indexArray, vtkCellArray* cells,
44  vtkPoints* points, vtkIdType vertexOffset);
45 
46  // Description:
47  // create a IBO for wireframe polys/tris
49 
50  // Description:
51  // used to create an IBO for line primitives
52  static void AppendLineIndexBuffer(
53  std::vector<unsigned int>& indexArray, vtkCellArray* cells, vtkIdType vertexOffset);
54 
55  // Description:
56  // create a IBO for wireframe polys/tris
58 
59  // Description:
60  // create a IBO for wireframe polys/tris
62  std::vector<unsigned int>& indexArray, vtkCellArray* cells, vtkIdType vertexOffset);
63 
64  // Description:
65  // used to create an IBO for primitives as points
67 
68  // Description:
69  // used to create an IBO for primitives as points
71  std::vector<unsigned int>& indexArray, vtkCellArray* cells, vtkIdType vertexOffset);
72 
73  // Description:
74  // used to create an IBO for line strips and triangle strips
75  size_t CreateStripIndexBuffer(vtkCellArray* cells, bool wireframeTriStrips);
76 
77  static void AppendStripIndexBuffer(std::vector<unsigned int>& indexArray, vtkCellArray* cells,
78  vtkIdType vertexOffset, bool wireframeTriStrips);
79 
80  // Description:
81  // special index buffer for polys wireframe with edge visibilityflags
82  static void AppendEdgeFlagIndexBuffer(std::vector<unsigned int>& indexArray, vtkCellArray* cells,
83  vtkIdType vertexOffset, vtkDataArray* edgeflags);
84 
86 
87  // Description:
88  // used to create an IBO for cell Vertices as points
90 
91  // Description:
92  // used to create an IBO for primitives as points
94  std::vector<unsigned int>& indexArray, vtkCellArray** cells, vtkIdType vertexOffset);
95 
96 protected:
99 
100 private:
102  void operator=(const vtkOpenGLIndexBufferObject&) = delete;
103 };
104 
105 #endif
object to represent cell connectivity
Definition: vtkCellArray.h:180
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:50
a simple class to control print indentation
Definition: vtkIndent.h:34
OpenGL buffer object.
OpenGL vertex buffer object.
static void AppendTriangleIndexBuffer(std::vector< unsigned int > &indexArray, vtkCellArray *cells, vtkPoints *points, vtkIdType vertexOffset)
size_t CreateEdgeFlagIndexBuffer(vtkCellArray *cells, vtkDataArray *edgeflags)
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)
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
static vtkOpenGLIndexBufferObject * New()
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:34
@ points
Definition: vtkX3D.h:452
int vtkIdType
Definition: vtkType.h:338