Update of header of files in context of License text
[occt.git] / src / Graphic3d / Graphic3d_ArrayOfTriangleFans.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 ArrayOfTriangleFans from Graphic3d inherits ArrayOfPrimitives from Graphic3d 
16     ---Purpose: Contains triangles fan array definition
17
18 is
19
20         -- constructor
21         Create (
22                 maxVertexs: Integer from Standard;
23                 maxFans: Integer from Standard = 0;
24                 hasVNormals: Boolean from Standard = Standard_False;
25                 hasVColors: Boolean from Standard = Standard_False;
26                 hasFColors: Boolean from Standard = Standard_False;
27                 hasTexels: Boolean from Standard = Standard_False)
28         returns ArrayOfTriangleFans from Graphic3d;
29         ---Purpose: Creates an array of triangle fans,
30         -- a polygon can be filled as:
31         -- 1) creating a single fan defined with his vertexs.
32         --    i.e:
33         --    myArray = Graphic3d_ArrayOfTriangleFans(7)
34         --    myArray->AddVertex(x1,y1,z1)
35         --      ....
36         --    myArray->AddVertex(x7,y7,z7)
37         -- 2) creating separate fans defined with a predefined
38         --    number of fans and the number of vertex per fan.
39         --    i.e:
40         --    myArray = Graphic3d_ArrayOfTriangleFans(8,2)
41         --    myArray->AddBound(4)
42         --    myArray->AddVertex(x1,y1,z1)
43         --      ....
44         --    myArray->AddVertex(x4,y4,z4)
45         --    myArray->AddBound(4)
46         --    myArray->AddVertex(x5,y5,z5)
47         --      ....
48         --    myArray->AddVertex(x8,y8,z8)
49         --
50         -- <maxVertexs> defined the maximun allowed vertex number in the array.
51         -- <maxFans> defined the maximun allowed fan number in the array.
52         -- The number of triangle really drawn is :
53         -- VertexNumber()-2*Min(1,BoundNumber())
54         ---Warning:
55         -- When <hasVNormals> is TRUE , you must use one of
56         --      AddVertex(Point,Normal)
57         --  or  AddVertex(Point,Normal,Color)
58         --  or  AddVertex(Point,Normal,Texel) methods.
59         -- When <hasVColors> is TRUE , you must use one of
60         --      AddVertex(Point,Color)
61         --  or  AddVertex(Point,Normal,Color) methods.
62         -- When <hasTexels> is TRUE , you must use one of
63         --      AddVertex(Point,Texel)
64         --  or  AddVertex(Point,Normal,Texel) methods.
65         -- When <hasBColors> is TRUE , <maxBounds> must be > 0 and
66         --      you must use the
67         --      AddBound(number,Color) method.
68         --  Warning:
69         -- the user is responsible about the orientation of the fan
70         -- depending of the order of the created vertex and this
71         -- orientation must be coherent with the vertex normal optionnaly
72         -- given at each vertex (See the Orientate() methods).
73
74
75 end;