1 // Created on: 2001-01-04
2 // Copyright (c) 2001-2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
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.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
15 #ifndef _Graphic3d_ArrayOfSegments_HeaderFile
16 #define _Graphic3d_ArrayOfSegments_HeaderFile
18 #include <Standard.hxx>
19 #include <Standard_Type.hxx>
21 #include <Graphic3d_ArrayOfPrimitives.hxx>
22 #include <Standard_Integer.hxx>
23 #include <Standard_Boolean.hxx>
26 class Graphic3d_ArrayOfSegments;
27 DEFINE_STANDARD_HANDLE(Graphic3d_ArrayOfSegments, Graphic3d_ArrayOfPrimitives)
29 //! Contains segments array definition
30 class Graphic3d_ArrayOfSegments : public Graphic3d_ArrayOfPrimitives
36 //! Creates an array of segments,
37 //! a segment can be filled as:
38 //! 1) creating a set of segments defined with his vertexs.
40 //! myArray = Graphic3d_ArrayOfSegments(4)
41 //! myArray->AddVertex(x1,y1,z1)
43 //! myArray->AddVertex(x4,y4,z4)
44 //! 2) creating a set of indexed segments defined with his vertex
47 //! myArray = Graphic3d_ArrayOfSegments(4,0,8)
48 //! myArray->AddVertex(x1,y1,z1)
50 //! myArray->AddVertex(x4,y4,z4)
51 //! myArray->AddEdge(1)
52 //! myArray->AddEdge(2)
53 //! myArray->AddEdge(3)
54 //! myArray->AddEdge(4)
55 //! myArray->AddEdge(2)
56 //! myArray->AddEdge(4)
57 //! myArray->AddEdge(1)
58 //! myArray->AddEdge(3)
60 //! <maxVertexs> defined the maximun allowed vertex number in the array.
61 //! <maxEdges> defined the maximun allowed edge number in the array.
63 //! When <hasVColors> is TRUE , you must use only
64 //! AddVertex(Point,Color) method
65 Standard_EXPORT Graphic3d_ArrayOfSegments(const Standard_Integer maxVertexs, const Standard_Integer maxEdges = 0, const Standard_Boolean hasVColors = Standard_False);
70 DEFINE_STANDARD_RTTIEXT(Graphic3d_ArrayOfSegments,Graphic3d_ArrayOfPrimitives)
90 #endif // _Graphic3d_ArrayOfSegments_HeaderFile