0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / Graphic3d / Graphic3d_ArrayOfQuadrangles.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_ArrayOfQuadrangles_HeaderFile
16#define _Graphic3d_ArrayOfQuadrangles_HeaderFile
17
42cf5bc1 18#include <Graphic3d_ArrayOfPrimitives.hxx>
42cf5bc1 19
8e0a2b19 20//! Contains quadrangles array definition.
21//! WARNING! Quadrangle primitives might be unsupported by graphics library.
22//! Triangulation should be used instead of quads for better compatibility.
42cf5bc1 23class Graphic3d_ArrayOfQuadrangles : public Graphic3d_ArrayOfPrimitives
24{
8e0a2b19 25 DEFINE_STANDARD_RTTIEXT(Graphic3d_ArrayOfQuadrangles, Graphic3d_ArrayOfPrimitives)
42cf5bc1 26public:
27
34253146 28 //! Creates an array of quadrangles (Graphic3d_TOPA_QUADRANGLES), a quadrangle can be filled as:
8e0a2b19 29 //! 1) Creating a set of quadrangles defined with his vertexes, i.e:
30 //! @code
31 //! myArray = Graphic3d_ArrayOfQuadrangles (8);
32 //! myArray->AddVertex (x1, y1, z1);
33 //! ....
34 //! myArray->AddVertex (x8, y8, z8);
35 //! @endcode
36 //! 2) Creating a set of indexed quadrangles defined with his vertex ans edges, i.e:
37 //! @code
38 //! myArray = Graphic3d_ArrayOfQuadrangles (6, 8);
39 //! myArray->AddVertex (x1, y1, z1);
40 //! ....
41 //! myArray->AddVertex (x6, y6, z6);
34253146 42 //! myArray->AddEdges (1, 2, 3, 4);
43 //! myArray->AddEdges (3, 4, 5, 6);
8e0a2b19 44 //! @endcode
45 //! @param theMaxVertexs defines the maximum allowed vertex number in the array
46 //! @param theMaxEdges defines the maximum allowed edge number in the array (for indexed array)
34253146 47 //! @param theArrayFlags array flags
48 Graphic3d_ArrayOfQuadrangles (Standard_Integer theMaxVertexs,
49 Standard_Integer theMaxEdges,
50 Graphic3d_ArrayFlags theArrayFlags)
51 : Graphic3d_ArrayOfPrimitives (Graphic3d_TOPA_QUADRANGLES, theMaxVertexs, 0, theMaxEdges, theArrayFlags) {}
52
53 //! Creates an array of quadrangles (Graphic3d_TOPA_QUADRANGLES).
54 //! @param theMaxVertexs defines the maximum allowed vertex number in the array
55 //! @param theMaxEdges defines the maximum allowed edge number in the array (for indexed array)
56 Graphic3d_ArrayOfQuadrangles (Standard_Integer theMaxVertexs,
57 Standard_Integer theMaxEdges = 0,
58 Standard_Boolean theHasVNormals = Standard_False,
59 Standard_Boolean theHasVColors = Standard_False,
60 Standard_Boolean theHasVTexels = Standard_False)
61 : Graphic3d_ArrayOfPrimitives (Graphic3d_TOPA_QUADRANGLES, theMaxVertexs, 0, theMaxEdges,
62 (theHasVNormals ? Graphic3d_ArrayFlags_VertexNormal : Graphic3d_ArrayFlags_None)
63 | (theHasVColors ? Graphic3d_ArrayFlags_VertexColor : Graphic3d_ArrayFlags_None)
64 | (theHasVTexels ? Graphic3d_ArrayFlags_VertexTexel : Graphic3d_ArrayFlags_None)) {}
42cf5bc1 65
66};
67
8e0a2b19 68DEFINE_STANDARD_HANDLE(Graphic3d_ArrayOfQuadrangles, Graphic3d_ArrayOfPrimitives)
42cf5bc1 69
70#endif // _Graphic3d_ArrayOfQuadrangles_HeaderFile