10f5934faac6a1a8ed0ad7952fb90625d2b2dec4
[occt.git] / src / Graphic3d / Graphic3d_ArrayOfPolylines.cdl
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 class ArrayOfPolylines from Graphic3d inherits ArrayOfPrimitives from Graphic3d
16
17 is
18
19         -- constructor
20         Create (
21                 maxVertexs: Integer from Standard;
22                 maxBounds: Integer from Standard = 0;
23                 maxEdges: Integer from Standard = 0;
24                 hasVColors: Boolean from Standard = Standard_False;
25                 hasBColors: Boolean from Standard = Standard_False;
26                 hasEdgeInfos: Boolean from Standard = Standard_False)
27         returns mutable ArrayOfPolylines from Graphic3d;
28         ---Purpose: Creates an array of polylines,
29         -- a polyline can be filled as:
30         -- 1) creating a single polyline defined with his vertexs.
31         --    i.e:
32         --    myArray = Graphic3d_ArrayOfPolylines(7)
33         --    myArray->AddVertex(x1,y1,z1)
34         --      ....
35         --    myArray->AddVertex(x7,y7,z7)
36         -- 2) creating separate polylines defined with a predefined
37         --    number of bounds and the number of vertex per bound.
38         --    i.e:
39         --    myArray = Graphic3d_ArrayOfPolylines(7,2)
40         --    myArray->AddBound(4)
41         --    myArray->AddVertex(x1,y1,z1)
42         --      ....
43         --    myArray->AddVertex(x4,y4,z4)
44         --    myArray->AddBound(3)
45         --    myArray->AddVertex(x5,y5,z5)
46         --      ....
47         --    myArray->AddVertex(x7,y7,z7)
48         -- 3) creating a single indexed polyline defined with his vertex
49         --    ans edges.
50         --    i.e:
51         --    myArray = Graphic3d_ArrayOfPolylines(4,0,6)
52         --    myArray->AddVertex(x1,y1,z1)
53         --      ....
54         --    myArray->AddVertex(x4,y4,z4)
55         --    myArray->AddEdge(1)
56         --    myArray->AddEdge(2)
57         --    myArray->AddEdge(3)
58         --    myArray->AddEdge(1)
59         --    myArray->AddEdge(2)
60         --    myArray->AddEdge(4)
61         -- 4) creating separate polylines defined with a predefined
62         --    number of bounds and the number of edges per bound.
63         --    i.e:
64         --    myArray = Graphic3d_ArrayOfPolylines(6,4,14)
65         --    myArray->AddBound(3)
66         --    myArray->AddVertex(x1,y1,z1)
67         --    myArray->AddVertex(x2,y2,z2)
68         --    myArray->AddVertex(x3,y3,z3)
69         --    myArray->AddEdge(1)
70         --    myArray->AddEdge(2)
71         --    myArray->AddEdge(3)
72         --    myArray->AddBound(3)
73         --    myArray->AddVertex(x4,y4,z4)
74         --    myArray->AddVertex(x5,y5,z5)
75         --    myArray->AddVertex(x6,y6,z6)
76         --    myArray->AddEdge(4)
77         --    myArray->AddEdge(5)
78         --    myArray->AddEdge(6)
79         --    myArray->AddBound(4)
80         --    myArray->AddEdge(2)
81         --    myArray->AddEdge(3)
82         --    myArray->AddEdge(5)
83         --    myArray->AddEdge(6)
84         --    myArray->AddBound(4)
85         --    myArray->AddEdge(1)
86         --    myArray->AddEdge(3)
87         --    myArray->AddEdge(5)
88         --    myArray->AddEdge(4)
89         --
90         -- <maxVertexs> defined the maximun allowed vertex number in the array.
91         -- <maxBounds> defined the maximun allowed bound number in the array.
92         -- <maxEdges> defined the maximun allowed edge number in the array.
93         --  Warning:
94         -- When <hasVColors> is TRUE , you must use one of
95         --      AddVertex(Point,Color)
96         --  or  AddVertex(Point,Normal,Color) methods.
97         -- When <hasBColors> is TRUE , <maxBounds> must be > 0 and
98         --      you must use the
99         --      AddBound(number,Color) method.
100         -- When <hasEdgeInfos> is TRUE , <maxEdges> must be > 0 and
101         --      you must use the
102         --      AddEdge(number,visibillity) method.
103
104 end;