VTK  9.4.20241219
vtkOpenGLIndexBufferObject.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3#ifndef vtkOpenGLIndexBufferObject_h
4#define vtkOpenGLIndexBufferObject_h
5
7#include "vtkRenderingOpenGL2Module.h" // for export macro
8
16VTK_ABI_NAMESPACE_BEGIN
17class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLIndexBufferObject : public vtkOpenGLBufferObject
18{
19public:
22 void PrintSelf(ostream& os, vtkIndent indent) override;
23
24 // Sizes/offsets are all in bytes as OpenGL API expects them.
25 size_t IndexCount; // Number of indices in the VBO
26
27 // Description:
28 // used to create an IBO for triangle primitives
30 std::vector<unsigned char>* edgeArray, vtkDataArray* edgeFlags);
31
32 // Description:
33 // used to create an IBO for triangle primitives
34 static void AppendTriangleIndexBuffer(std::vector<unsigned int>& indexArray, vtkCellArray* cells,
35 vtkPoints* points, vtkIdType vertexOffset, std::vector<unsigned char>* edgeArray,
36 vtkDataArray* edgeFlags);
37
38 // Description:
39 // create a IBO for wireframe polys/tris
41
42 // Description:
43 // used to create an IBO for line primitives
45 std::vector<unsigned int>& indexArray, vtkCellArray* cells, vtkIdType vertexOffset);
46
47 // Description:
48 // create a IBO for wireframe polys/tris
50
51 // Description:
52 // create a IBO for wireframe polys/tris
54 std::vector<unsigned int>& indexArray, vtkCellArray* cells, vtkIdType vertexOffset);
55
56 // Description:
57 // used to create an IBO for primitives as points
59
60 // Description:
61 // used to create an IBO for primitives as points
63 std::vector<unsigned int>& indexArray, vtkCellArray* cells, vtkIdType vertexOffset);
64
65 // Description:
66 // used to create an IBO for line strips and triangle strips
67 size_t CreateStripIndexBuffer(vtkCellArray* cells, bool wireframeTriStrips);
68
69 static void AppendStripIndexBuffer(std::vector<unsigned int>& indexArray, vtkCellArray* cells,
70 vtkIdType vertexOffset, bool wireframeTriStrips);
71
72 // Description:
73 // special index buffer for polys wireframe with edge visibilityflags
74 static void AppendEdgeFlagIndexBuffer(std::vector<unsigned int>& indexArray, vtkCellArray* cells,
75 vtkIdType vertexOffset, vtkDataArray* edgeflags);
76
78
79 // Description:
80 // used to create an IBO for cell Vertices as points
82
83 // Description:
84 // used to create an IBO for primitives as points
86 std::vector<unsigned int>& indexArray, vtkCellArray** cells, vtkIdType vertexOffset);
87
88protected:
91
92private:
94 void operator=(const vtkOpenGLIndexBufferObject&) = delete;
95};
96
97VTK_ABI_NAMESPACE_END
98#endif
object to represent cell connectivity
abstract superclass for arrays of numeric data
a simple class to control print indentation
Definition vtkIndent.h:108
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:139
int vtkIdType
Definition vtkType.h:315