0023022: This is desirable to access OpenGl extensions and core API (1.2+) in one...
[occt.git] / src / Poly / Poly_Polygon3D.cdl
1 -- File:        Poly_Polygon3D.cdl
2 -- Created:     Tue Mar  7 11:19:36 1995
3 -- Author:      Laurent PAINNOT
4 --              <lpa@metrox>
5 ---Copyright:    Matra Datavision 1995
6
7
8 class Polygon3D from Poly inherits TShared from MMgt
9
10         ---Purpose: This class Provides a polygon in 3D space. It is generally an approximate representation of a curve.
11         -- A Polygon3D is defined by a table of nodes. Each node is
12         -- a 3D point. If the polygon is closed, the point of closure is
13         -- repeated at the end of the table of nodes.
14         -- If the polygon is an approximate representation of a curve,
15         -- you can associate with each of its nodes the value of the
16         -- parameter of the corresponding point on the curve.
17
18 uses Array1OfPnt   from TColgp,
19      Array1OfReal  from TColStd,
20      HArray1OfReal from TColStd
21
22 raises NullObject from Standard
23
24 is
25
26     Create(Nodes: Array1OfPnt from TColgp) 
27     returns mutable Polygon3D from Poly;
28         ---Purpose: onstructs a 3D polygon defined by the table of points, Nodes.
29     
30     Create(Nodes:      Array1OfPnt  from TColgp;
31            Parameters: Array1OfReal from TColStd) 
32     returns mutable Polygon3D from Poly;
33         ---Purpose: Constructs a 3D polygon defined by
34         -- the table of points, Nodes, and the parallel table of
35         --  parameters, Parameters, where each value of the table
36         --  Parameters is the parameter of the corresponding point
37         --  on the curve approximated by the constructed polygon.
38         -- Warning
39         -- Both the Nodes and Parameters tables must have the
40         -- same bounds. This property is not checked at construction time.
41     
42     Deflection(me) returns Real;
43         ---Purpose: Returns the deflection of this polygon
44     Deflection(me : mutable; D : Real);
45         ---Purpose: Sets the deflection of this polygon to D. See more on deflection in Poly_Polygon2D
46     
47     NbNodes(me) returns Integer;
48         ---Purpose: Returns the number of nodes in this polygon.
49         -- Note: If the polygon is closed, the point of closure is
50         -- repeated at the end of its table of nodes. Thus, on a closed
51         -- triangle the function NbNodes returns 4.
52         ---C++: inline
53     
54     Nodes(me) returns Array1OfPnt from TColgp
55         ---Purpose:  Returns the table of nodes for this polygon.
56         ---C++: return const &
57     raises NullObject from Standard;
58         
59     
60     HasParameters(me) returns Boolean from Standard;
61         ---Purpose: Returns the table of the parameters associated with each node in this polygon.
62         --  HasParameters function checks if   parameters are associated with the nodes of this polygon.
63     
64     Parameters(me) returns Array1OfReal from TColStd
65         ---Purpose: Returns true if parameters are associated with the nodes
66         -- in this polygon.
67         ---C++: return const &
68     raises NullObject from Standard;
69     
70     ChangeParameters(me) returns Array1OfReal from TColStd
71         ---Purpose: Returns the table of the parameters associated with each node in this polygon.
72         --        ChangeParameters function returnes the  array as shared. Therefore if the table is selected by
73         --   reference you can, by simply modifying it, directly modify
74         --   the data structure of this polygon.        
75         ---C++: return &
76     raises NullObject from Standard;
77     
78     
79     
80 fields
81
82     myDeflection: Real          from Standard;
83     myNodes:      Array1OfPnt   from TColgp;
84     myParameters: HArray1OfReal from TColStd;
85     
86 end Polygon3D;