7fd59977 |
1 | -- File: Poly_Triangle.cdl |
2 | -- Created: Mon Mar 6 09:50:53 1995 |
3 | -- Author: Laurent PAINNOT |
4 | -- <lpa@metrox> |
5 | ---Copyright: Matra Datavision 1995 |
6 | |
7 | |
8 | class Triangle from Poly |
9 | |
10 | ---Purpose: Describes a component triangle of a triangulation |
11 | -- (Poly_Triangulation object). |
12 | -- A Triangle is defined by a triplet of nodes. Each node is an |
13 | -- index in the table of nodes specific to an existing |
14 | -- triangulation of a shape, and represents a point on the surface. |
15 | |
16 | raises |
17 | OutOfRange from Standard |
18 | |
19 | is |
20 | |
21 | Create returns Triangle from Poly; |
22 | ---Purpose: Constructs a triangle and sets all indices to zero. |
23 | |
24 | Create(N1,N2,N3 : Integer) |
25 | returns Triangle from Poly; |
26 | ---Purpose: Constructs a triangle and sets its three indices |
27 | -- to N1, N2 and N3 respectively, where these node values |
28 | -- are indices in the table of nodes specific to an existing |
29 | -- triangulation of a shape. |
30 | Set(me : in out; N1,N2,N3 : Integer); |
31 | ---Purpose: Sets the value of the three nodes of this triangle to N1, N2 and N3 respectively. |
32 | |
33 | Set(me : in out; Index, Node : Integer) |
34 | ---Purpose: Sets the value of the Indexth node of this triangle to Node. |
35 | -- Raises OutOfRange if Index is not in 1,2,3 |
36 | raises |
37 | OutOfRange from Standard; |
38 | ---C++: inline |
39 | |
40 | Get(me; N1,N2,N3 : in out Integer); |
41 | --- Purpose: Returns the node indices of this triangle in N1, N2 and N3. |
42 | |
43 | Value(me; Index : Integer) returns Integer |
44 | ---Purpose: Get the node of given Index. |
45 | -- Raises OutOfRange from Standard if Index is not in 1,2,3 |
46 | raises |
47 | OutOfRange from Standard; |
48 | ---C++: inline |
49 | ---C++: alias operator() |
50 | |
51 | ChangeValue(me : in out; Index : Integer) returns Integer |
52 | ---Purpose: Get the node of given Index. |
53 | -- Raises OutOfRange if Index is not in 1,2,3 |
54 | raises |
55 | OutOfRange from Standard; |
56 | ---C++: inline |
57 | ---C++: return & |
58 | ---C++: alias operator() |
59 | |
60 | fields |
61 | |
62 | myNodes : Integer [3]; |
63 | |
64 | end Triangle; |