0024192: Adding support for shaders to OCCT visualization toolkit
[occt.git] / src / Graphic3d / Graphic3d_ArrayOfTriangleStrips.cdl
CommitLineData
b311480e 1-- Created on: 2001-01-04
2-- Copyright (c) 2001-2012 OPEN CASCADE SAS
7fd59977 3--
b311480e 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.
8--
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.
11--
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.
18
7fd59977 19
20class ArrayOfTriangleStrips from Graphic3d inherits ArrayOfPrimitives from Graphic3d
21
22is
23
24 -- constructor
25 Create (
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 ArrayOfTriangleStrips from Graphic3d;
33 ---Purpose: Creates an array of triangle strips,
34 -- a polygon can be filled as:
35 -- 1) creating a single strip defined with his vertexs.
36 -- i.e:
37 -- myArray = Graphic3d_ArrayOfTriangleStrips(7)
38 -- myArray->AddVertex(x1,y1,z1)
39 -- ....
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.
43 -- i.e:
44 -- myArray = Graphic3d_ArrayOfTriangleStrips(8,2)
45 -- myArray->AddBound(4)
46 -- myArray->AddVertex(x1,y1,z1)
47 -- ....
48 -- myArray->AddVertex(x4,y4,z4)
49 -- myArray->AddBound(4)
50 -- myArray->AddVertex(x5,y5,z5)
51 -- ....
52 -- myArray->AddVertex(x8,y8,z8)
53 --
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 triangle really drawn is :
57 -- VertexNumber()-2*Min(1,BoundNumber())
58 -- Warning:
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
70 -- you must use the
71 -- AddBound(number,Color) method.
72 -- Warning:
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).
77
78end;