0024784: Move documentation in CDL files to proper location
[occt.git] / src / PPoly / PPoly_Triangulation.cdl
1 -- Created on: 1995-10-24
2 -- Created by: Mister rmi
3 -- Copyright (c) 1995-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class Triangulation from PPoly inherits Persistent from Standard
18
19         ---Purpose: This class represents a 3d polyhedral triangulation.
20         --          
21         --          It is defined by :
22         --          
23         --          * A Deflection : This  is the distance between the
24         --          triangulation and the "ideal" surface.
25         --          
26         --          *  An  Array1 of 3d   nodes  values : Contains the
27         --          Points for the 3d  nodes. Two different  nodes may
28         --          have the same  3d point if  they are differents in
29         --          UV space.
30         --          
31         --          * An  Array1 of 2d nodes  values : Contains the UV
32         --          coordinates  for   the   nodes   in the    surface
33         --          parametric  space. This is optionnal.
34         --          
35         --          * The  Array of  triangles,   each triangle  is  a
36         --          triplet of  node indices.  A  triangle is oriented
37         --          and the  whole triangulation  must have a coherent
38         --          orientation.
39         --
40         --          This is a Transient class.
41 uses
42    HArray1OfPnt2d    from PColgp,
43    HArray1OfPnt      from PColgp,
44    HArray1OfTriangle from PPoly
45
46 is
47
48     Create(Defl:       Real              from Standard;
49            Nodes:      HArray1OfPnt      from PColgp;
50            Triangles:  HArray1OfTriangle from PPoly)
51     returns Triangulation from PPoly;
52         ---Purpose: Defaults with allocation of Nodes and Triangles.
53
54     Create(Defl:       Real              from Standard;
55            Nodes:      HArray1OfPnt      from PColgp;
56            UVNodes:    HArray1OfPnt2d    from PColgp;
57            Triangles:  HArray1OfTriangle from PPoly)
58     returns Triangulation from PPoly;
59         ---Purpose: Defaults with allocation of Nodes and Triangles.
60
61     Deflection(me) returns Real;
62     
63     Deflection(me : mutable; D : Real);
64
65     NbNodes(me) returns Integer;
66         ---Purpose: Null if the nodes are not yet defined.
67
68     NbTriangles(me) returns Integer;
69         ---Purpose: Null if the Triangles are not yet defined.
70
71     HasUVNodes(me) returns Boolean;
72
73     Nodes(me) returns HArray1OfPnt from PColgp;
74         ---Purpose: Const reference on the 3d nodes values.
75         
76     UVNodes(me) returns HArray1OfPnt2d from PColgp;
77         ---Purpose: Const reference on the 2d nodes values.
78
79     Triangles(me) returns HArray1OfTriangle from PPoly;
80         ---Purpose: Const reference on the triangles.
81
82 fields
83
84     myDeflection  : Real;
85     myNodes       : HArray1OfPnt      from PColgp;
86     myUVNodes     : HArray1OfPnt2d    from PColgp;
87     myTriangles   : HArray1OfTriangle from PPoly;
88
89 end Triangulation;