1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0030239: Visualization, Graphic3d_ArrayOfPrimitives - pass Graphic3d_ArrayFlags bitmask instead of dedicated Boolean flags to constructor

This commit is contained in:
kgv
2018-10-14 14:00:46 +03:00
committed by apn
parent 751d055356
commit 34253146da
20 changed files with 356 additions and 382 deletions

View File

@@ -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)) {}
};