|
|
|||
File indexing completed on 2026-09-28 09:20:19
0001 // Created on: 2001-01-04 0002 // Copyright (c) 2001-2014 OPEN CASCADE SAS 0003 // 0004 // This file is part of Open CASCADE Technology software library. 0005 // 0006 // This library is free software; you can redistribute it and/or modify it under 0007 // the terms of the GNU Lesser General Public License version 2.1 as published 0008 // by the Free Software Foundation, with special exception defined in the file 0009 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0010 // distribution for complete text of the license and disclaimer of any warranty. 0011 // 0012 // Alternatively, this file may be used under the terms of Open CASCADE 0013 // commercial license or contractual agreement. 0014 0015 #ifndef _Graphic3d_ArrayOfTriangleStrips_HeaderFile 0016 #define _Graphic3d_ArrayOfTriangleStrips_HeaderFile 0017 0018 #include <Graphic3d_ArrayOfPrimitives.hxx> 0019 0020 //! Contains triangles strip array definition. 0021 class Graphic3d_ArrayOfTriangleStrips : public Graphic3d_ArrayOfPrimitives 0022 { 0023 DEFINE_STANDARD_RTTIEXT(Graphic3d_ArrayOfTriangleStrips, Graphic3d_ArrayOfPrimitives) 0024 public: 0025 //! Creates an array of triangle strips (Graphic3d_TOPA_TRIANGLESTRIPS), a polygon can be filled 0026 //! as: 1) Creating a single strip defined with his vertexes, i.e: 0027 //! @code 0028 //! myArray = Graphic3d_ArrayOfTriangleStrips (7); 0029 //! myArray->AddVertex (x1, y1, z1); 0030 //! .... 0031 //! myArray->AddVertex (x7, y7, z7); 0032 //! @endcode 0033 //! 2) Creating separate strips defined with a predefined number of strips and the number of 0034 //! vertex per strip, i.e: 0035 //! @code 0036 //! myArray = Graphic3d_ArrayOfTriangleStrips (8, 2); 0037 //! myArray->AddBound (4); 0038 //! myArray->AddVertex (x1, y1, z1); 0039 //! .... 0040 //! myArray->AddVertex (x4, y4, z4); 0041 //! myArray->AddBound (4); 0042 //! myArray->AddVertex (x5, y5, z5); 0043 //! .... 0044 //! myArray->AddVertex (x8, y8, z8); 0045 //! @endcode 0046 //! @param theMaxVertexs defines the maximum allowed vertex number in the array 0047 //! @param theMaxStrips defines the maximum allowed strip number in the array; 0048 //! the number of triangle really drawn is: VertexNumber() - 2 * std::min(1, 0049 //! BoundNumber()) 0050 //! @param theArrayFlags array flags 0051 Graphic3d_ArrayOfTriangleStrips(int theMaxVertexs, 0052 int theMaxStrips, 0053 Graphic3d_ArrayFlags theArrayFlags) 0054 : Graphic3d_ArrayOfPrimitives(Graphic3d_TOPA_TRIANGLESTRIPS, 0055 theMaxVertexs, 0056 theMaxStrips, 0057 0, 0058 theArrayFlags) 0059 { 0060 } 0061 0062 //! Creates an array of triangle strips (Graphic3d_TOPA_TRIANGLESTRIPS). 0063 //! @param theMaxVertexs defines the maximum allowed vertex number in the array 0064 //! @param theMaxStrips defines the maximum allowed strip number in the array; 0065 //! the number of triangle really drawn is: VertexNumber() - 2 * std::min(1, 0066 //! BoundNumber()) 0067 //! @param theHasVNormals when TRUE, AddVertex(Point,Normal), AddVertex(Point,Normal,Color) or 0068 //! AddVertex(Point,Normal,Texel) should be used to specify vertex normal; 0069 //! vertex normals should be specified coherent to triangle orientation 0070 //! (defined by order of vertexes within triangle) for proper rendering 0071 //! @param theHasVColors when TRUE, AddVertex(Point,Color) or AddVertex(Point,Normal,Color) 0072 //! should be used to specify vertex color 0073 //! @param theHasBColors when TRUE, AddBound(number,Color) should be used to specify sub-group 0074 //! color 0075 //! @param theHasVTexels when TRUE, AddVertex(Point,Texel) or AddVertex(Point,Normal,Texel) 0076 //! should be used to specify vertex UV coordinates 0077 Graphic3d_ArrayOfTriangleStrips(int theMaxVertexs, 0078 int theMaxStrips = 0, 0079 bool theHasVNormals = false, 0080 bool theHasVColors = false, 0081 bool theHasBColors = false, 0082 bool theHasVTexels = false) 0083 : Graphic3d_ArrayOfPrimitives( 0084 Graphic3d_TOPA_TRIANGLESTRIPS, 0085 theMaxVertexs, 0086 theMaxStrips, 0087 0, 0088 (theHasVNormals ? Graphic3d_ArrayFlags_VertexNormal : Graphic3d_ArrayFlags_None) 0089 | (theHasVColors ? Graphic3d_ArrayFlags_VertexColor : Graphic3d_ArrayFlags_None) 0090 | (theHasVTexels ? Graphic3d_ArrayFlags_VertexTexel : Graphic3d_ArrayFlags_None) 0091 | (theHasBColors ? Graphic3d_ArrayFlags_BoundColor : Graphic3d_ArrayFlags_None)) 0092 { 0093 } 0094 }; 0095 0096 #endif // _Graphic3d_ArrayOfTriangleStrips_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|