blob: 3b24770dca4faf56c2ca46a3d7d6a76f800e8014 (
plain)
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
|
-- File: Graphic2d_Vertex.cdl
-- Created: Mercredi 11 Aout 1993
-- Author: CAL
--
---Copyright: MatraDatavision 1993
--
class Vertex from Graphic2d
---Version:
---Purpose: This class allows the creation and update of a
-- 2D point.
---Keywords: Vertex, Coordinate, Point
---Warning:
---References:
uses
Drawer from Graphic2d,
Length from Quantity
is
-------------------------
-- Category: Constructors
-------------------------
Create
returns Vertex from Graphic2d;
---Level: Public
---Purpose: Creates a point with 0.0, 0.0 coordinates.
Create (AX, AY: Real from Standard)
returns Vertex from Graphic2d;
---Level: Public
---Purpose: Creates a point with <AX>, <AY> coordinates.
Create (AX, AY: ShortReal from Standard)
returns Vertex from Graphic2d;
---Level: Public
---Purpose: Creates a point with <AX>, <AY> coordinates.
---------------------------------------------------
-- Category: Methods to modify the class definition
---------------------------------------------------
SetCoord (me: in out;
Xnew, Ynew: Length from Quantity)
is static;
---Level: Public
---Purpose: Modifies the coordinates of the point <me>.
---Category: Methods to modify the class definition
SetXCoord (me: in out;
Xnew: Length from Quantity)
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: Length from Quantity)
is static;
---Level: Public
---Purpose: Modifies the Y coordinate of the point <me>.
---Category: Methods to modify the class definition
----------------------------
-- Category: Inquire methods
----------------------------
Coord (me;
AX, AY: out Length from Quantity)
is static;
---Level: Public
---Purpose: Returns the coordinates of the point <me>.
---Category: Inquire methods
X (me) returns Length from Quantity
is static;
---Level: Public
---Purpose: Returns the X coordinates of the point <me>.
---Category: Inquire methods
Y (me) returns Length from Quantity
is static;
---Level: Public
---Purpose: Returns the Y coordinate of the point <me>.
---Category: Inquire methods
IsEqual (me ; other : Vertex) returns Boolean
is static;
---Level: Public
---Purpose: Test if <me> and <other> are the the same vertex.
---C++: alias operator ==
--------------------------
-- Category: Class methods
--------------------------
Distance (myclass;
AV1, AV2: Vertex from Graphic2d)
returns Length from Quantity;
---Level: Public
---Purpose: Returns the distance between <AV1> and <AV2>.
---Category: Class methods
fields
myX: ShortReal from Standard;
myY: ShortReal from Standard;
end Vertex from Graphic2d;
|