0027961: Visualization - remove unused and no more working OpenGl_AVIWriter
[occt.git] / src / Graphic3d / Graphic3d_ArrayOfPolygons.hxx
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_ArrayOfPolygons_HeaderFile
16 #define _Graphic3d_ArrayOfPolygons_HeaderFile
17
18 #include <Standard.hxx>
19 #include <Standard_Type.hxx>
20
21 #include <Graphic3d_ArrayOfPrimitives.hxx>
22 #include <Standard_Integer.hxx>
23 #include <Standard_Boolean.hxx>
24
25
26 class Graphic3d_ArrayOfPolygons;
27 DEFINE_STANDARD_HANDLE(Graphic3d_ArrayOfPolygons, Graphic3d_ArrayOfPrimitives)
28
29 //! Contains polygons array definition
30 class Graphic3d_ArrayOfPolygons : public Graphic3d_ArrayOfPrimitives
31 {
32
33 public:
34
35   
36   //! Creates an array of polygons,
37   //! a polygon can be filled as:
38   //! 1) creating a single polygon defined with his vertexs.
39   //! i.e:
40   //! myArray = Graphic3d_ArrayOfPolygons(7)
41   //! myArray->AddVertex(x1,y1,z1)
42   //! ....
43   //! myArray->AddVertex(x7,y7,z7)
44   //! 2) creating separate polygons defined with a predefined
45   //! number of bounds and the number of vertex per bound.
46   //! i.e:
47   //! myArray = Graphic3d_ArrayOfPolygons(7,2)
48   //! myArray->AddBound(4)
49   //! myArray->AddVertex(x1,y1,z1)
50   //! ....
51   //! myArray->AddVertex(x4,y4,z4)
52   //! myArray->AddBound(3)
53   //! myArray->AddVertex(x5,y5,z5)
54   //! ....
55   //! myArray->AddVertex(x7,y7,z7)
56   //! 3) creating a single indexed polygon defined with his vertex
57   //! ans edges.
58   //! i.e:
59   //! myArray = Graphic3d_ArrayOfPolygons(4,0,6)
60   //! myArray->AddVertex(x1,y1,z1)
61   //! ....
62   //! myArray->AddVertex(x4,y4,z4)
63   //! myArray->AddEdge(1)
64   //! myArray->AddEdge(2)
65   //! myArray->AddEdge(3)
66   //! myArray->AddEdge(1)
67   //! myArray->AddEdge(2)
68   //! myArray->AddEdge(4)
69   //! 4) creating separate polygons defined with a predefined
70   //! number of bounds and the number of edges per bound.
71   //! i.e:
72   //! myArray = Graphic3d_ArrayOfPolygons(6,4,14)
73   //! myArray->AddBound(3)
74   //! myArray->AddVertex(x1,y1,z1)
75   //! myArray->AddVertex(x2,y2,z2)
76   //! myArray->AddVertex(x3,y3,z3)
77   //! myArray->AddEdge(1)
78   //! myArray->AddEdge(2)
79   //! myArray->AddEdge(3)
80   //! myArray->AddBound(3)
81   //! myArray->AddVertex(x4,y4,z4)
82   //! myArray->AddVertex(x5,y5,z5)
83   //! myArray->AddVertex(x6,y6,z6)
84   //! myArray->AddEdge(4)
85   //! myArray->AddEdge(5)
86   //! myArray->AddEdge(6)
87   //! myArray->AddBound(4)
88   //! myArray->AddEdge(2)
89   //! myArray->AddEdge(3)
90   //! myArray->AddEdge(5)
91   //! myArray->AddEdge(6)
92   //! myArray->AddBound(4)
93   //! myArray->AddEdge(1)
94   //! myArray->AddEdge(3)
95   //! myArray->AddEdge(5)
96   //! myArray->AddEdge(4)
97   //! <maxVertexs> defined the maximun allowed vertex number in the array.
98   //! <maxBounds> defined the maximun allowed bound number in the array.
99   //! <maxEdges> defined the maximun allowed edge number in the array.
100   //! Warning:
101   //! When <hasVNormals> is TRUE , you must use one of
102   //! AddVertex(Point,Normal)
103   //! or  AddVertex(Point,Normal,Color)
104   //! or  AddVertex(Point,Normal,Texel) methods.
105   //! When <hasVColors> is TRUE , you must use one of
106   //! AddVertex(Point,Color)
107   //! or  AddVertex(Point,Normal,Color) methods.
108   //! When <hasTexels> is TRUE , you must use one of
109   //! AddVertex(Point,Texel)
110   //! or  AddVertex(Point,Normal,Texel) methods.
111   //! When <hasBColors> is TRUE , <maxBounds> must be > 0 and
112   //! you must use the
113   //! AddBound(number,Color) method.
114   //! Warning:
115   //! the user is responsible about the orientation of the polygon
116   //! depending of the order of the created vertex or edges and this
117   //! orientation must be coherent with the vertex normal optionnaly
118   //! given at each vertex (See the Orientate() methods).
119   Standard_EXPORT Graphic3d_ArrayOfPolygons(const Standard_Integer maxVertexs, const Standard_Integer maxBounds = 0, const Standard_Integer maxEdges = 0, const Standard_Boolean hasVNormals = Standard_False, const Standard_Boolean hasVColors = Standard_False, const Standard_Boolean hasBColors = Standard_False, const Standard_Boolean hasTexels = Standard_False);
120
121
122
123
124   DEFINE_STANDARD_RTTIEXT(Graphic3d_ArrayOfPolygons,Graphic3d_ArrayOfPrimitives)
125
126 protected:
127
128
129
130
131 private:
132
133
134
135
136 };
137
138
139
140
141
142
143
144 #endif // _Graphic3d_ArrayOfPolygons_HeaderFile