1 -- Created on: 2001-01-04
2 -- Copyright (c) 2001-2012 OPEN CASCADE SAS
4 -- The content of this file is subject to the Open CASCADE Technology Public
5 -- License Version 6.5 (the "License"). You may not use the content of this file
6 -- except in compliance with the License. Please obtain a copy of the License
7 -- at http://www.opencascade.org and read it completely before using this file.
9 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 -- The Original Code and all software distributed under the License is
13 -- distributed on an "AS IS" basis, without warranty of any kind, and the
14 -- Initial Developer hereby disclaims all such warranties, including without
15 -- limitation, any warranties of merchantability, fitness for a particular
16 -- purpose or non-infringement. Please see the License for the specific terms
17 -- and conditions governing the rights and limitations under the License.
20 class ArrayOfQuadrangleStrips from Graphic3d inherits ArrayOfPrimitives from Graphic3d
26 maxVertexs: Integer from Standard;
27 maxStrips: Integer from Standard = 0;
28 hasVNormals: Boolean from Standard = Standard_False;
29 hasVColors: Boolean from Standard = Standard_False;
30 hasSColors: Boolean from Standard = Standard_False;
31 hasTexels: Boolean from Standard = Standard_False)
32 returns mutable ArrayOfQuadrangleStrips from Graphic3d;
33 ---Purpose: Creates an array of quadrangle strips,
34 -- a polygon can be filled as:
35 -- 1) creating a single strip defined with his vertexs.
37 -- myArray = Graphic3d_ArrayOfQuadrangleStrips(7)
38 -- myArray->AddVertex(x1,y1,z1)
40 -- myArray->AddVertex(x7,y7,z7)
41 -- 2) creating separate strips defined with a predefined
42 -- number of strips and the number of vertex per strip.
44 -- myArray = Graphic3d_ArrayOfQuadrangleStrips(8,2)
45 -- myArray->AddBound(4)
46 -- myArray->AddVertex(x1,y1,z1)
48 -- myArray->AddVertex(x4,y4,z4)
49 -- myArray->AddBound(4)
50 -- myArray->AddVertex(x5,y5,z5)
52 -- myArray->AddVertex(x8,y8,z8)
54 -- <maxVertexs> defined the maximun allowed vertex number in the array.
55 -- <maxStrips> defined the maximun allowed strip number in the array.
56 -- The number of quadrangle really drawn is :
57 -- VertexNumber()/2-Min(1,BoundNumber())
59 -- When <hasVNormals> is TRUE , you must use one of
60 -- AddVertex(Point,Normal)
61 -- or AddVertex(Point,Normal,Color)
62 -- or AddVertex(Point,Normal,Texel) methods.
63 -- When <hasVColors> is TRUE , you must use one of
64 -- AddVertex(Point,Color)
65 -- or AddVertex(Point,Normal,Color) methods.
66 -- When <hasTexels> is TRUE , you must use one of
67 -- AddVertex(Point,Texel)
68 -- or AddVertex(Point,Normal,Texel) methods.
69 -- When <hasBColors> is TRUE , <maxBounds> must be > 0 and
71 -- AddBound(number,Color) method.
73 -- the user is responsible about the orientation of the strip
74 -- depending of the order of the created vertex and this
75 -- orientation must be coherent with the vertex normal optionnaly
76 -- given at each vertex (See the Orientate() methods).