Class TBounceSim (unit BSim)

Inherits from

TObject

Constructors


constructor Create;

****************************************************************** TBounceSim


Functions

destructor Destroy;


procedure Draw(c: TCanvas);

Update Velocity from Gravity

function NearestPoint(x, y: integer): TBPoint;


procedure RunIteration(c: TCanvas);


procedure Dampen(var VelX, VelY: double; vx, vy, Sgn: double);


procedure UpdateObjects;


procedure UpdatePos(var Pos, Vel, Vel2: double; Min, Max: integer);


Properties

Events

Variables

BounceFric : double;


GravX : double;


GravY : double;


Iter : integer;


LinkList : TLinkList;


mx : integer;


my : integer;


PointList : TPointList;

Max X and Max Y boundary


Constructors


constructor Create;

****************************************************************** TBounceSim


Functions


destructor Destroy;


procedure Draw(c: TCanvas);

Update Velocity from Gravity


function NearestPoint(x, y: integer): TBPoint;


procedure RunIteration(c: TCanvas);


procedure Dampen(var VelX, VelY: double; vx, vy, Sgn: double);


procedure UpdateObjects;


procedure UpdatePos(var Pos, Vel, Vel2: double; Min, Max: integer);


Properties


Events


Variables


BounceFric : double;


GravX : double;


GravY : double;


Iter : integer;


LinkList : TLinkList;


mx : integer;


my : integer;


PointList : TPointList;

Max X and Max Y boundary