0d2be5c51f68ecde430958c9e5a3d3469ee5914d
[occt.git] / src / Graphic3d / Graphic3d_ArrayOfQuadrangles.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 ArrayOfQuadrangles from Graphic3d inherits ArrayOfPrimitives from Graphic3d 
16
17 uses
18         Color                   from Quantity,
19         Pnt                     from gp,
20         Pnt2d                   from gp,
21         Dir                     from gp
22
23 raises
24     OutOfRange from Standard
25
26 is
27
28         -- constructor
29         Create (
30                 maxVertexs: Integer from Standard;
31                 maxEdges: Integer from Standard = 0;
32                 hasVNormals: Boolean from Standard = Standard_False;
33                 hasVColors: Boolean from Standard = Standard_False;
34                 hasTexels: Boolean from Standard = Standard_False;
35                 hasEdgeInfos: Boolean from Standard = Standard_False)
36         returns mutable ArrayOfQuadrangles from Graphic3d;
37         ---Purpose: Creates an array of quadrangles,
38         -- a quadrangle can be filled as:
39         -- 1) creating a set of quadrangles defined with his vertexs.
40         --    i.e:
41         --    myArray = Graphic3d_ArrayOfQuadrangles(8)
42         --    myArray->AddVertex(x1,y1,z1) 
43         --      ....
44         --    myArray->AddVertex(x8,y8,z8) 
45         -- 3) creating a set of indexed quadrangles defined with his vertex
46         --    ans edges. 
47         --    i.e:
48         --    myArray = Graphic3d_ArrayOfQuadrangles(6,8)
49         --    myArray->AddVertex(x1,y1,z1) 
50         --      ....
51         --    myArray->AddVertex(x6,y6,z6) 
52         --    myArray->AddEdge(1)
53         --    myArray->AddEdge(2)
54         --    myArray->AddEdge(3)
55         --    myArray->AddEdge(4)
56         --    myArray->AddEdge(3)
57         --    myArray->AddEdge(4)
58         --    myArray->AddEdge(5)
59         --    myArray->AddEdge(6)
60         -- 
61         -- <maxVertexs> defined the maximun allowed vertex number in the array.
62         -- <maxEdges> defined the maximun allowed edge number in the array.
63         --  Warning:
64         -- When <hasVNormals> is TRUE , you must use one of
65         --      AddVertex(Point,Normal) 
66         --  or  AddVertex(Point,Normal,Color)
67         --  or  AddVertex(Point,Normal,Texel) methods.
68         -- When <hasVColors> is TRUE , you must use one of
69         --      AddVertex(Point,Color)
70         --  or  AddVertex(Point,Normal,Color) methods.
71         -- When <hasTexels> is TRUE , you must use one of
72         --      AddVertex(Point,Texel) 
73         --  or  AddVertex(Point,Normal,Texel) methods.
74         -- When <hasEdgeInfos> is TRUE , <maxEdges> must be > 0 and
75         --      you must use the
76         --      AddEdge(number,visibillity) method.
77         --  Warning:
78         -- the user is responsible about the orientation of the quadrangle
79         -- depending of the order of the created vertex or edges and this
80         -- orientation must be coherent with the vertex normal optionnaly
81         -- given at each vertex (See the Orientate() methods).
82
83 end;