Warnings on vc14 were eliminated
[occt.git] / src / Graphic3d / Graphic3d_ArrayOfTriangleStrips.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_ArrayOfTriangleStrips_HeaderFile
16#define _Graphic3d_ArrayOfTriangleStrips_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
26class Graphic3d_ArrayOfTriangleStrips;
27DEFINE_STANDARD_HANDLE(Graphic3d_ArrayOfTriangleStrips, Graphic3d_ArrayOfPrimitives)
28
29//! Contains triangles strip array definition
30class Graphic3d_ArrayOfTriangleStrips : public Graphic3d_ArrayOfPrimitives
31{
32
33public:
34
35
36 //! Creates an array of triangle strips,
37 //! a polygon can be filled as:
38 //! 1) creating a single strip defined with his vertexs.
39 //! i.e:
40 //! myArray = Graphic3d_ArrayOfTriangleStrips(7)
41 //! myArray->AddVertex(x1,y1,z1)
42 //! ....
43 //! myArray->AddVertex(x7,y7,z7)
44 //! 2) creating separate strips defined with a predefined
45 //! number of strips and the number of vertex per strip.
46 //! i.e:
47 //! myArray = Graphic3d_ArrayOfTriangleStrips(8,2)
48 //! myArray->AddBound(4)
49 //! myArray->AddVertex(x1,y1,z1)
50 //! ....
51 //! myArray->AddVertex(x4,y4,z4)
52 //! myArray->AddBound(4)
53 //! myArray->AddVertex(x5,y5,z5)
54 //! ....
55 //! myArray->AddVertex(x8,y8,z8)
56 //!
57 //! <maxVertexs> defined the maximun allowed vertex number in the array.
58 //! <maxStrips> defined the maximun allowed strip number in the array.
59 //! The number of triangle really drawn is :
60 //! VertexNumber()-2*Min(1,BoundNumber())
61 //! Warning:
62 //! When <hasVNormals> is TRUE , you must use one of
63 //! AddVertex(Point,Normal)
64 //! or AddVertex(Point,Normal,Color)
65 //! or AddVertex(Point,Normal,Texel) methods.
66 //! When <hasVColors> is TRUE , you must use one of
67 //! AddVertex(Point,Color)
68 //! or AddVertex(Point,Normal,Color) methods.
69 //! When <hasTexels> is TRUE , you must use one of
70 //! AddVertex(Point,Texel)
71 //! or AddVertex(Point,Normal,Texel) methods.
72 //! When <hasBColors> is TRUE , <maxBounds> must be > 0 and
73 //! you must use the
74 //! AddBound(number,Color) method.
75 //! Warning:
76 //! the user is responsible about the orientation of the strip
77 //! depending of the order of the created vertex and this
78 //! orientation must be coherent with the vertex normal optionnaly
79 //! given at each vertex (See the Orientate() methods).
80 Standard_EXPORT Graphic3d_ArrayOfTriangleStrips(const Standard_Integer maxVertexs, const Standard_Integer maxStrips = 0, const Standard_Boolean hasVNormals = Standard_False, const Standard_Boolean hasVColors = Standard_False, const Standard_Boolean hasSColors = Standard_False, const Standard_Boolean hasTexels = Standard_False);
81
82
83
84
92efcf78 85 DEFINE_STANDARD_RTTIEXT(Graphic3d_ArrayOfTriangleStrips,Graphic3d_ArrayOfPrimitives)
42cf5bc1 86
87protected:
88
89
90
91
92private:
93
94
95
96
97};
98
99
100
101
102
103
104
105#endif // _Graphic3d_ArrayOfTriangleStrips_HeaderFile