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 class ArrayOfTriangleFans from Graphic3d inherits ArrayOfPrimitives from Graphic3d
16 ---Purpose: Contains triangles fan array definition
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.
33 -- myArray = Graphic3d_ArrayOfTriangleFans(7)
34 -- myArray->AddVertex(x1,y1,z1)
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.
40 -- myArray = Graphic3d_ArrayOfTriangleFans(8,2)
41 -- myArray->AddBound(4)
42 -- myArray->AddVertex(x1,y1,z1)
44 -- myArray->AddVertex(x4,y4,z4)
45 -- myArray->AddBound(4)
46 -- myArray->AddVertex(x5,y5,z5)
48 -- myArray->AddVertex(x8,y8,z8)
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())
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
67 -- AddBound(number,Color) method.
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).