0028107: Visualization - provide a flexible interface to set custom hatch styles
[occt.git] / src / Graphic3d / Graphic3d_ArrayOfQuadrangles.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_ArrayOfQuadrangles_HeaderFile
16 #define _Graphic3d_ArrayOfQuadrangles_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 class Standard_OutOfRange;
25
26
27 class Graphic3d_ArrayOfQuadrangles;
28 DEFINE_STANDARD_HANDLE(Graphic3d_ArrayOfQuadrangles, Graphic3d_ArrayOfPrimitives)
29
30 //! Contains quatrangles array definition
31 class Graphic3d_ArrayOfQuadrangles : public Graphic3d_ArrayOfPrimitives
32 {
33
34 public:
35
36   
37   //! Creates an array of quadrangles,
38   //! a quadrangle can be filled as:
39   //! 1) creating a set of quadrangles defined with his vertexs.
40   //! i.e:
41   //! myArray = Graphic3d_ArrayOfQuadrangles(8)
42   //! myArray->AddVertex(x1,y1,z1)
43   //! ....
44   //! myArray->AddVertex(x8,y8,z8)
45   //! 3) creating a set of indexed quadrangles defined with his vertex
46   //! ans edges.
47   //! i.e:
48   //! myArray = Graphic3d_ArrayOfQuadrangles(6,8)
49   //! myArray->AddVertex(x1,y1,z1)
50   //! ....
51   //! myArray->AddVertex(x6,y6,z6)
52   //! myArray->AddEdge(1)
53   //! myArray->AddEdge(2)
54   //! myArray->AddEdge(3)
55   //! myArray->AddEdge(4)
56   //! myArray->AddEdge(3)
57   //! myArray->AddEdge(4)
58   //! myArray->AddEdge(5)
59   //! myArray->AddEdge(6)
60   //!
61   //! <maxVertexs> defined the maximun allowed vertex number in the array.
62   //! <maxEdges> defined the maximun allowed edge number in the array.
63   //! Warning:
64   //! When <hasVNormals> is TRUE , you must use one of
65   //! AddVertex(Point,Normal)
66   //! or  AddVertex(Point,Normal,Color)
67   //! or  AddVertex(Point,Normal,Texel) methods.
68   //! When <hasVColors> is TRUE , you must use one of
69   //! AddVertex(Point,Color)
70   //! or  AddVertex(Point,Normal,Color) methods.
71   //! When <hasTexels> is TRUE , you must use one of
72   //! AddVertex(Point,Texel)
73   //! or  AddVertex(Point,Normal,Texel) methods.
74   //! Warning:
75   //! the user is responsible about the orientation of the quadrangle
76   //! depending of the order of the created vertex or edges and this
77   //! orientation must be coherent with the vertex normal optionnaly
78   //! given at each vertex (See the Orientate() methods).
79   Standard_EXPORT Graphic3d_ArrayOfQuadrangles(const Standard_Integer maxVertexs, const Standard_Integer maxEdges = 0, const Standard_Boolean hasVNormals = Standard_False, const Standard_Boolean hasVColors = Standard_False, const Standard_Boolean hasTexels = Standard_False);
80
81
82
83
84   DEFINE_STANDARD_RTTIEXT(Graphic3d_ArrayOfQuadrangles,Graphic3d_ArrayOfPrimitives)
85
86 protected:
87
88
89
90
91 private:
92
93
94
95
96 };
97
98
99
100
101
102
103
104 #endif // _Graphic3d_ArrayOfQuadrangles_HeaderFile