Class TBoid (unit uBoids)

Inherits from

TMovable

Constructors



Functions

function AvoidBoid(ClosestBoid : TBoid; Canvas : TCanvas) : boolean;


procedure AvoidObstacle(Canvas : TCanvas;ClosestObstacle : TObstacle);

******************************************************************************

procedure DecreaseSpeed(delta : single);

******************************************************************************

procedure IncreaseSpeed(delta : single);

******************************************************************************

function PrepareToMove(ClosestBoids : TList; ClosestObstacle : TMovable; Canvas : TCanvas) : boolean ;

******************************************************************************

procedure StayCentered(Canvas : TCanvas);


procedure TurnLeft(delta : single);

******************************************************************************

procedure TurnRight(delta : single);

******************************************************************************

Properties

Events

Variables

AbsDirToAvg : single;


AbsDirToClosest : single;


AvgDir : single;


AvgSpeed : single;


bBoidAvoidance : boolean;


bExecuteAlignment : boolean;


bExecuteCohesion : boolean;


bExecuteObstacles : boolean;


bExecuteSeparation : boolean;


bObstacleAvoidance : boolean;


bShowAlignment : boolean;


bShowCohesion : boolean;


bSmashed : boolean;


DeltaDirToClosest : single;


iTeamNumber : integer;


MaxSpeedChange : single;

Unique to every boid if they are to be extended, but usually the same.

MaxTurnSpeed : single;


OptimalDistance : single;


ReallyClose : single;


sDx : single;


sDy : single;


SensorDistance : single;


SQRDist : single;


StayInCenter : single;


TooClose : single;


TurnFraction : single;



Constructors


Functions


function AvoidBoid(ClosestBoid : TBoid; Canvas : TCanvas) : boolean;


procedure AvoidObstacle(Canvas : TCanvas;ClosestObstacle : TObstacle);

******************************************************************************


procedure DecreaseSpeed(delta : single);

******************************************************************************


procedure IncreaseSpeed(delta : single);

******************************************************************************


function PrepareToMove(ClosestBoids : TList; ClosestObstacle : TMovable; Canvas : TCanvas) : boolean ;

******************************************************************************


procedure StayCentered(Canvas : TCanvas);


procedure TurnLeft(delta : single);

******************************************************************************


procedure TurnRight(delta : single);

******************************************************************************


Properties


Events


Variables


AbsDirToAvg : single;


AbsDirToClosest : single;


AvgDir : single;


AvgSpeed : single;


bBoidAvoidance : boolean;


bExecuteAlignment : boolean;


bExecuteCohesion : boolean;


bExecuteObstacles : boolean;


bExecuteSeparation : boolean;


bObstacleAvoidance : boolean;


bShowAlignment : boolean;


bShowCohesion : boolean;


bSmashed : boolean;


DeltaDirToClosest : single;


iTeamNumber : integer;


MaxSpeedChange : single;

Unique to every boid if they are to be extended, but usually the same.


MaxTurnSpeed : single;


OptimalDistance : single;


ReallyClose : single;


sDx : single;


sDy : single;


SensorDistance : single;


SQRDist : single;


StayInCenter : single;


TooClose : single;


TurnFraction : single;