X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FGraphic3d%2FGraphic3d_ArrayOfQuadrangles.hxx;h=e99be7239f3d9e15e01354675a9845ae96b626c9;hb=34253146da74767b53970591f5aada9e187aeb13;hpb=751d055356c3ca4684b6e3f5ca3f2a0b8a865540 diff --git a/src/Graphic3d/Graphic3d_ArrayOfQuadrangles.hxx b/src/Graphic3d/Graphic3d_ArrayOfQuadrangles.hxx index eb6671b454..e99be7239f 100644 --- a/src/Graphic3d/Graphic3d_ArrayOfQuadrangles.hxx +++ b/src/Graphic3d/Graphic3d_ArrayOfQuadrangles.hxx @@ -25,7 +25,7 @@ class Graphic3d_ArrayOfQuadrangles : public Graphic3d_ArrayOfPrimitives DEFINE_STANDARD_RTTIEXT(Graphic3d_ArrayOfQuadrangles, Graphic3d_ArrayOfPrimitives) public: - //! Creates an array of quadrangles, a quadrangle can be filled as: + //! Creates an array of quadrangles (Graphic3d_TOPA_QUADRANGLES), a quadrangle can be filled as: //! 1) Creating a set of quadrangles defined with his vertexes, i.e: //! @code //! myArray = Graphic3d_ArrayOfQuadrangles (8); @@ -39,23 +39,29 @@ public: //! myArray->AddVertex (x1, y1, z1); //! .... //! myArray->AddVertex (x6, y6, z6); - //! myArray->AddEdge (1); - //! myArray->AddEdge (2); - //! myArray->AddEdge (3); - //! myArray->AddEdge (4); - //! myArray->AddEdge (3); - //! myArray->AddEdge (4); - //! myArray->AddEdge (5); - //! myArray->AddEdge (6); + //! myArray->AddEdges (1, 2, 3, 4); + //! myArray->AddEdges (3, 4, 5, 6); //! @endcode //! @param theMaxVertexs defines the maximum allowed vertex number in the array //! @param theMaxEdges defines the maximum allowed edge number in the array (for indexed array) - Graphic3d_ArrayOfQuadrangles (const Standard_Integer theMaxVertexs, - const Standard_Integer theMaxEdges = 0, - const Standard_Boolean theHasVNormals = Standard_False, - const Standard_Boolean theHasVColors = Standard_False, - const Standard_Boolean theHasVTexels = Standard_False) - : Graphic3d_ArrayOfPrimitives (Graphic3d_TOPA_QUADRANGLES, theMaxVertexs, 0, theMaxEdges, theHasVNormals, theHasVColors, Standard_False, theHasVTexels) {} + //! @param theArrayFlags array flags + Graphic3d_ArrayOfQuadrangles (Standard_Integer theMaxVertexs, + Standard_Integer theMaxEdges, + Graphic3d_ArrayFlags theArrayFlags) + : Graphic3d_ArrayOfPrimitives (Graphic3d_TOPA_QUADRANGLES, theMaxVertexs, 0, theMaxEdges, theArrayFlags) {} + + //! Creates an array of quadrangles (Graphic3d_TOPA_QUADRANGLES). + //! @param theMaxVertexs defines the maximum allowed vertex number in the array + //! @param theMaxEdges defines the maximum allowed edge number in the array (for indexed array) + Graphic3d_ArrayOfQuadrangles (Standard_Integer theMaxVertexs, + Standard_Integer theMaxEdges = 0, + Standard_Boolean theHasVNormals = Standard_False, + Standard_Boolean theHasVColors = Standard_False, + Standard_Boolean theHasVTexels = Standard_False) + : Graphic3d_ArrayOfPrimitives (Graphic3d_TOPA_QUADRANGLES, theMaxVertexs, 0, theMaxEdges, + (theHasVNormals ? Graphic3d_ArrayFlags_VertexNormal : Graphic3d_ArrayFlags_None) + | (theHasVColors ? Graphic3d_ArrayFlags_VertexColor : Graphic3d_ArrayFlags_None) + | (theHasVTexels ? Graphic3d_ArrayFlags_VertexTexel : Graphic3d_ArrayFlags_None)) {} };