1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
--
-- File: Graphic3d_Vertex.cdl
-- Created: Jeudi 22 Aout 1991
-- Author: NW,JPB,CAL
--
---Copyright: MatraDatavision 1991,1992,1993
--
class Vertex from Graphic3d
---Purpose: This class allows the creation and update of a
-- 3D point.
is
Create
returns Vertex from Graphic3d;
---Level: Public
---Purpose: Creates a point with 0.0, 0.0, 0.0 coordinates.
Create ( APoint : Vertex from Graphic3d )
returns Vertex from Graphic3d;
---Level: Public
---Purpose: Creates a point with coordinates identical to <APoint>.
--
-- It's just a copy, but this simplifies the management
-- of the constructors of VertexC, VertexN and VertexNC.
Create ( AX, AY ,AZ : Real from Standard )
returns Vertex from Graphic3d;
---Level: Public
---Purpose: Creates a point with <AX>, <AY> and <AZ> coordinates.
---------------------------------------------------
-- Category: Methods to modify the class definition
---------------------------------------------------
SetCoord ( me : in out;
Xnew, Ynew, Znew : Real from Standard )
is static;
---Level: Public
---Purpose: Modifies the coordinates of the point <me>.
---Category: Methods to modify the class definition
SetXCoord ( me : in out;
Xnew : Real from Standard )
is static;
---Level: Public
---Purpose: Modifies the X coordinate of the point <me>.
---Category: Methods to modify the class definition
SetYCoord ( me : in out;
Ynew : Real from Standard )
is static;
---Level: Public
---Purpose: Modifies the Y coordinate of the point <me>.
---Category: Methods to modify the class definition
SetZCoord ( me : in out;
Znew : Real from Standard )
is static;
---Level: Public
---Purpose: Modifies the Z coordinate of the point <me>.
---Category: Methods to modify the class definition
----------------------------
-- Category: Inquire methods
----------------------------
Coord ( me;
AX, AY, AZ : out Real from Standard )
is static;
---Level: Public
---Purpose: Returns the coordinates of the point <me>.
---Category: Inquire methods
X ( me )
returns Real from Standard
is static;
---Level: Public
---Purpose: Returns the X coordinates of the point <me>.
---Category: Inquire methods
Y ( me )
returns Real from Standard
is static;
---Level: Public
---Purpose: Returns the Y coordinate of the point <me>.
---Category: Inquire methods
Z ( me )
returns Real from Standard
is static;
---Level: Public
---Purpose: Returns the Z coordinate of the point <me>.
---Category: Inquire methods
--------------------------
-- Category: Class methods
--------------------------
Distance ( myclass;
AV1 : Vertex from Graphic3d;
AV2 : Vertex from Graphic3d )
returns Real from Standard;
---Level: Public
---Purpose: Returns the distance between <AV1> and <AV2>.
---Category: Class methods
--
fields
--
-- Class : Graphic3d_Vertex
--
-- Purpose : Declaration of variables specific to points
--
-- Reminder : A point is defined by its coordinates
--
--
-- the coordinates of a point
MyX : ShortReal from Standard;
MyY : ShortReal from Standard;
MyZ : ShortReal from Standard;
end Vertex;
|