b311480e |
1 | -- Created on: 2001-01-04 |
973c2be1 |
2 | -- Copyright (c) 2001-2014 OPEN CASCADE SAS |
7fd59977 |
3 | -- |
973c2be1 |
4 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
5 | -- |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
11 | -- |
973c2be1 |
12 | -- Alternatively, this file may be used under the terms of Open CASCADE |
13 | -- commercial license or contractual agreement. |
7fd59977 |
14 | |
15 | class ArrayOfTriangles from Graphic3d inherits ArrayOfPrimitives from Graphic3d |
ff8178ef |
16 | ---Purpose: Contains triangles array definition |
7fd59977 |
17 | |
18 | is |
19 | |
20 | -- constructor |
21 | Create ( |
22 | maxVertexs: Integer from Standard; |
23 | maxEdges: Integer from Standard = 0; |
24 | hasVNormals: Boolean from Standard = Standard_False; |
25 | hasVColors: Boolean from Standard = Standard_False; |
871fa103 |
26 | hasTexels: Boolean from Standard = Standard_False) |
6e33d3ce |
27 | returns ArrayOfTriangles from Graphic3d; |
7fd59977 |
28 | ---Purpose: Creates an array of triangles, |
29 | -- a triangle can be filled as: |
30 | -- 1) creating a set of triangles defined with his vertexs. |
31 | -- i.e: |
32 | -- myArray = Graphic3d_ArrayOfTriangles(6) |
33 | -- myArray->AddVertex(x1,y1,z1) |
34 | -- .... |
35 | -- myArray->AddVertex(x6,y6,z6) |
36 | -- 3) creating a set of indexed triangles defined with his vertex |
37 | -- ans edges. |
38 | -- i.e: |
39 | -- myArray = Graphic3d_ArrayOfTriangles(4,6) |
40 | -- myArray->AddVertex(x1,y1,z1) |
41 | -- .... |
42 | -- myArray->AddVertex(x4,y4,z4) |
43 | -- myArray->AddEdge(1) |
44 | -- myArray->AddEdge(2) |
45 | -- myArray->AddEdge(3) |
46 | -- myArray->AddEdge(2) |
47 | -- myArray->AddEdge(3) |
48 | -- myArray->AddEdge(4) |
49 | -- |
50 | -- <maxVertexs> defined the maximun allowed vertex number in the array. |
51 | -- <maxEdges> defined the maximun allowed edge number in the array. |
52 | -- Warning: |
53 | -- When <hasVNormals> is TRUE , you must use one of |
54 | -- AddVertex(Point,Normal) |
55 | -- or AddVertex(Point,Normal,Color) |
56 | -- or AddVertex(Point,Normal,Texel) methods. |
57 | -- When <hasVColors> is TRUE , you must use one of |
58 | -- AddVertex(Point,Color) |
59 | -- or AddVertex(Point,Normal,Color) methods. |
60 | -- When <hasTexels> is TRUE , you must use one of |
61 | -- AddVertex(Point,Texel) |
62 | -- or AddVertex(Point,Normal,Texel) methods. |
7fd59977 |
63 | -- Warning: |
64 | -- the user is responsible about the orientation of the triangle |
65 | -- depending of the order of the created vertex or edges and this |
66 | -- orientation must be coherent with the vertex normal optionnaly |
67 | -- given at each vertex (See the Orientate() methods). |
68 | |
69 | end; |