0029337: Visualization, TKOpenGl - visual artifacts on Intel Broadwell GPU
[occt.git] / src / Graphic3d / Graphic3d_ArrayOfPolylines.hxx
CommitLineData
42cf5bc1 1// Created on: 2001-01-04
2// Copyright (c) 2001-2014 OPEN CASCADE SAS
3//
4// This file is part of Open CASCADE Technology software library.
5//
6// This library is free software; you can redistribute it and/or modify it under
7// the terms of the GNU Lesser General Public License version 2.1 as published
8// by the Free Software Foundation, with special exception defined in the file
9// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10// distribution for complete text of the license and disclaimer of any warranty.
11//
12// Alternatively, this file may be used under the terms of Open CASCADE
13// commercial license or contractual agreement.
14
15#ifndef _Graphic3d_ArrayOfPolylines_HeaderFile
16#define _Graphic3d_ArrayOfPolylines_HeaderFile
17
42cf5bc1 18#include <Graphic3d_ArrayOfPrimitives.hxx>
42cf5bc1 19
8e0a2b19 20//! Contains polylines array definition.
42cf5bc1 21class Graphic3d_ArrayOfPolylines : public Graphic3d_ArrayOfPrimitives
22{
8e0a2b19 23 DEFINE_STANDARD_RTTIEXT(Graphic3d_ArrayOfPolylines, Graphic3d_ArrayOfPrimitives)
42cf5bc1 24public:
25
8e0a2b19 26 //! Creates an array of polylines, a polyline can be filled as:
27 //! 1) Creating a single polyline defined with his vertexes, i.e:
28 //! @code
29 //! myArray = Graphic3d_ArrayOfPolylines (7);
30 //! myArray->AddVertex (x1, y1, z1);
31 //! ....
32 //! myArray->AddVertex (x7, y7, z7);
33 //! @endcode
34 //! 2) Creating separate polylines defined with a predefined number of bounds and the number of vertex per bound, i.e:
35 //! @code
36 //! myArray = Graphic3d_ArrayOfPolylines (7, 2);
37 //! myArray->AddBound (4);
38 //! myArray->AddVertex (x1, y1, z1);
39 //! ....
40 //! myArray->AddVertex (x4, y4, z4);
41 //! myArray->AddBound (3);
42 //! myArray->AddVertex (x5, y5, z5);
43 //! ....
44 //! myArray->AddVertex (x7, y7, z7);
45 //! @endcode
46 //! 3) Creating a single indexed polyline defined with his vertex and edges, i.e:
47 //! @code
48 //! myArray = Graphic3d_ArrayOfPolylines (4, 0, 6);
49 //! myArray->AddVertex (x1, y1, z1);
50 //! ....
51 //! myArray->AddVertex (x4, y4, z4);
52 //! myArray->AddEdge (1);
53 //! myArray->AddEdge (2);
54 //! myArray->AddEdge (3);
55 //! myArray->AddEdge (1);
56 //! myArray->AddEdge (2);
57 //! myArray->AddEdge (4);
58 //! @endcode
59 //! 4) creating separate polylines defined with a predefined number of bounds and the number of edges per bound, i.e:
60 //! @code
61 //! myArray = Graphic3d_ArrayOfPolylines (6, 4, 14);
62 //! myArray->AddBound (3);
63 //! myArray->AddVertex (x1, y1, z1);
64 //! myArray->AddVertex (x2, y2, z2);
65 //! myArray->AddVertex (x3, y3, z3);
66 //! myArray->AddEdge (1);
67 //! myArray->AddEdge (2);
68 //! myArray->AddEdge (3);
69 //! myArray->AddBound (3);
70 //! myArray->AddVertex (x4, y4, z4);
71 //! myArray->AddVertex (x5, y5, z5);
72 //! myArray->AddVertex (x6, y6, z6);
73 //! myArray->AddEdge (4);
74 //! myArray->AddEdge (5);
75 //! myArray->AddEdge (6);
76 //! myArray->AddBound (4);
77 //! myArray->AddEdge (2);
78 //! myArray->AddEdge (3);
79 //! myArray->AddEdge (5);
80 //! myArray->AddEdge (6);
81 //! myArray->AddBound (4);
82 //! myArray->AddEdge (1);
83 //! myArray->AddEdge (3);
84 //! myArray->AddEdge (5);
85 //! myArray->AddEdge (4);
86 //! @endcode
87 //! @param theMaxVertexs defines the maximum allowed vertex number in the array
88 //! @param theMaxBounds defines the maximum allowed bound number in the array
89 //! @param theMaxEdges defines the maximum allowed edge number in the array
90 //! @param theHasVColors when TRUE AddVertex(Point,Color) or AddVertex(Point,Normal,Color) should be used to specify per-vertex color values
91 //! @param theHasBColors when TRUE AddBound(number,Color) should be used to specify sub-group color
92 Graphic3d_ArrayOfPolylines (const Standard_Integer theMaxVertexs,
93 const Standard_Integer theMaxBounds = 0,
94 const Standard_Integer theMaxEdges = 0,
95 const Standard_Boolean theHasVColors = Standard_False,
96 const Standard_Boolean theHasBColors = Standard_False)
97 : Graphic3d_ArrayOfPrimitives (Graphic3d_TOPA_POLYLINES, theMaxVertexs, theMaxBounds, theMaxEdges, Standard_False, theHasVColors, theHasBColors, Standard_False) {}
42cf5bc1 98
99};
100
8e0a2b19 101DEFINE_STANDARD_HANDLE(Graphic3d_ArrayOfPolylines, Graphic3d_ArrayOfPrimitives)
42cf5bc1 102
103#endif // _Graphic3d_ArrayOfPolylines_HeaderFile