type TParticle class TObject что делать зато так удобнее private x_ y_

 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
type
TParticle = class(TObject) //а что делать? зато так удобнее!
private
x_, y_, dx_, dy_, vx_, vy_: Single;
public
property x: single read x_ write x_;
property y: single read y_ write y_;
property dx: single read dx_ write dx_;
property dy: single read dy_ write dy_;
property vx: single read vx_ write vx_;
property vy: single read vy_ write vy_;
constructor Create(_x, _y, _dx, _dy, _vx, _vy: single);
end;
TJoint = class(TObject)
private
a_, b_: integer;
Length_: Single;
public
property A: Integer read a_ write a_;
property B: Integer read b_ write b_;
property Length: Single read Length_ write Length_;
constructor Create(FirstNode, SecondNode: integer; len: single);
end;
TParticleList = class(TObjectList)
private
function GetItem(Index: Integer): TParticle;
public
function Add(AObject: TParticle): Integer;
property Items[Index: Integer]: TParticle read GetItem; default;
end;
TJointList = class(TObjectList)
private
function GetItem(Index: Integer): TJoint;
public
function Add(AObject: TJoint): Integer;
property Items[Index: Integer]: TJoint read GetItem; default;
end;