-
Notifications
You must be signed in to change notification settings - Fork 4
/
LUX.D2x4.pas
257 lines (198 loc) · 8.38 KB
/
LUX.D2x4.pas
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
unit LUX.D2x4;
interface //#################################################################### ■
uses LUX,
LUX.D1,
LUX.D2;
type //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【型】
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【レコード】
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TSingle4x2D
TSingle4x2D = record
private
///// アクセス
function Gets( const Y_,X_:Integer ) :Single; overload; inline;
procedure Sets( const Y_,X_:Integer; const V_:Single ); overload; inline;
function Gets( const Y_:Integer ) :TSingle2D; overload; inline;
procedure Sets( const Y_:Integer; const V_:TSingle2D ); overload; inline;
public
///// プロパティ
property _s[ const Y_,X_:Integer ] :Single read Gets write Sets; default;
property _s[ const Y_ :Integer ] :TSingle2D read Gets write Sets; default;
case Byte of
0:( _YXs :array [ 1..4, 1..2 ] of Single; );
1:( _11, _12,
_21, _22,
_31, _32,
_41, _42 :Single; );
3:( _Ys :array [ 1..4 ] of TSingle2D; );
4:( _1,
_2,
_3,
_4 :TSingle2D; );
end;
TSingleM42 = TSingle4x2D;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TDouble4x2D
TDouble4x2D = record
private
///// アクセス
function Gets( const Y_,X_:Integer ) :Double; overload; inline;
procedure Sets( const Y_,X_:Integer; const V_:Double ); overload; inline;
function Gets( const Y_:Integer ) :TDouble2D; overload; inline;
procedure Sets( const Y_:Integer; const V_:TDouble2D ); overload; inline;
public
///// プロパティ
property _s[ const Y_,X_:Integer ] :Double read Gets write Sets; default;
property _s[ const Y_ :Integer ] :TDouble2D read Gets write Sets; default;
case Byte of
0:( _YXs :array [ 1..4, 1..2 ] of Double; );
1:( _11, _12,
_21, _22,
_31, _32,
_41, _42 :Double; );
2:( _Ys :array [ 1..4 ] of TDouble2D; );
3:( _1,
_2,
_3,
_4 :TDouble2D; );
end;
TDoubleM42 = TDouble4x2D;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TdSingle4x2D
TdSingle4x2D = record
private
///// アクセス
function Gets( const Y_,X_:Integer ) :TdSingle; overload; inline;
procedure Sets( const Y_,X_:Integer; const V_:TdSingle ); overload; inline;
function Gets( const Y_:Integer ) :TdSingle2D; overload; inline;
procedure Sets( const Y_:Integer; const V_:TdSingle2D ); overload; inline;
public
///// プロパティ
property _s[ const Y_,X_:Integer ] :TdSingle read Gets write Sets; default;
property _s[ const Y_ :Integer ] :TdSingle2D read Gets write Sets; default;
case Byte of
0:( _YXs :array [ 1..4, 1..2 ] of TdSingle; );
1:( _11, _12,
_21, _22,
_31, _32,
_41, _42 :TdSingle; );
2:( _Ys :array [ 1..4 ] of TdSingle2D; );
3:( _1,
_2,
_3,
_4 :TdSingle2D; );
end;
TdSingleM42 = TdSingle4x2D;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TdDouble4x2D
TdDouble4x2D = record
private
///// アクセス
function Gets( const Y_,X_:Integer ) :TdDouble; overload; inline;
procedure Sets( const Y_,X_:Integer; const V_:TdDouble ); overload; inline;
function Gets( const Y_:Integer ) :TdDouble2D; overload; inline;
procedure Sets( const Y_:Integer; const V_:TdDouble2D ); overload; inline;
public
///// プロパティ
property _s[ const Y_,X_:Integer ] :TdDouble read Gets write Sets; default;
property _s[ const Y_ :Integer ] :TdDouble2D read Gets write Sets; default;
case Byte of
0:( _YXs :array [ 1..4, 1..2 ] of TdDouble; );
1:( _11, _12,
_21, _22,
_31, _32,
_41, _42 :TdDouble; );
2:( _Ys :array [ 1..4 ] of TdDouble2D; );
3:( _1,
_2,
_3,
_4 :TdDouble2D; );
end;
TdDoubleM42 = TdDouble4x2D;
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【クラス】
//const //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【定数】
//var //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【変数】
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【ルーチン】
implementation //############################################################### ■
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【レコード】
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TSingle4x2D
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& private
/////////////////////////////////////////////////////////////////////// アクセス
function TSingle4x2D.Gets( const Y_,X_:Integer ) :Single;
begin
Result := _YXs[ Y_, X_ ];
end;
procedure TSingle4x2D.Sets( const Y_,X_:Integer; const V_:Single );
begin
_YXs[ Y_, X_ ] := V_;
end;
function TSingle4x2D.Gets( const Y_:Integer ) :TSingle2D;
begin
Result := _Ys[ Y_ ];
end;
procedure TSingle4x2D.Sets( const Y_:Integer; const V_:TSingle2D );
begin
_Ys[ Y_ ] := V_;
end;
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& public
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TDouble4x2D
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& private
/////////////////////////////////////////////////////////////////////// アクセス
function TDouble4x2D.Gets( const Y_,X_:Integer ) :Double;
begin
Result := _YXs[ Y_, X_ ];
end;
procedure TDouble4x2D.Sets( const Y_,X_:Integer; const V_:Double );
begin
_YXs[ Y_, X_ ] := V_;
end;
function TDouble4x2D.Gets( const Y_:Integer ) :TDouble2D;
begin
Result := _Ys[ Y_ ];
end;
procedure TDouble4x2D.Sets( const Y_:Integer; const V_:TDouble2D );
begin
_Ys[ Y_ ] := V_;
end;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TdSingle4x2D
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& private
/////////////////////////////////////////////////////////////////////// アクセス
function TdSingle4x2D.Gets( const Y_,X_:Integer ) :TdSingle;
begin
Result := _YXs[ Y_, X_ ];
end;
procedure TdSingle4x2D.Sets( const Y_,X_:Integer; const V_:TdSingle );
begin
_YXs[ Y_, X_ ] := V_;
end;
function TdSingle4x2D.Gets( const Y_:Integer ) :TdSingle2D;
begin
Result := _Ys[ Y_ ];
end;
procedure TdSingle4x2D.Sets( const Y_:Integer; const V_:TdSingle2D );
begin
_Ys[ Y_ ] := V_;
end;
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& public
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TdDouble4x2D
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& private
/////////////////////////////////////////////////////////////////////// アクセス
function TdDouble4x2D.Gets( const Y_,X_:Integer ) :TdDouble;
begin
Result := _YXs[ Y_, X_ ];
end;
procedure TdDouble4x2D.Sets( const Y_,X_:Integer; const V_:TdDouble );
begin
_YXs[ Y_, X_ ] := V_;
end;
function TdDouble4x2D.Gets( const Y_:Integer ) :TdDouble2D;
begin
Result := _Ys[ Y_ ];
end;
procedure TdDouble4x2D.Sets( const Y_:Integer; const V_:TdDouble2D );
begin
_Ys[ Y_ ] := V_;
end;
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& public
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【クラス】
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【ルーチン】
//############################################################################## □
initialization //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 初期化
finalization //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 最終化
end. //######################################################################### ■