| Description | Hierarchy | Fields | Methods | Properties |
type TMotorBehavior = class(TBehavior)
Class extending TBehavior to include motor output. Motor output (zero by default) can be changed by accessing the property OutputVariables.
| Name | Description | |
|---|---|---|
![]() |
fOutputVariables |
Vector containing the motor output values. The size of this vector should match the number of motors present in TBody (see TBody.Motors.NumberOfMotors). See also TransferMotorSignals for transferring the motor output value(s) to the actual motor(s). |
![]() |
constructor Create; override; |
![]() |
constructor CreateAndSet(B: TBehavior); override; |
![]() |
destructor Destroy; override; |
![]() |
function Copy: TBehavior; override; |
![]() |
procedure LoadFromDefinition(ObjDef: TObjectDefinition); override; |
![]() |
procedure TransferMotorSignals(Motors: TMotors); virtual; |
![]() |
constructor Create; override; |
Default constructor.
![]() |
constructor CreateAndSet(B: TBehavior); override; |
Copy constructor. Note that this constructor sets the length of the fOutputVariables vector but does not copy the values in that vector.
![]() |
destructor Destroy; override; |
Destructor
![]() |
function Copy: TBehavior; override; |
Creates a copy of the motor behavior by calling the copy constructor CreateAndSet.
A copy of the motor behavior.
![]() |
procedure LoadFromDefinition(ObjDef: TObjectDefinition); override; |
Procedure for processing the definition of a motor behavior (as parsed from the definition text file). This procedure only calls the inherited procedure LoadFromDefinition (as required by all descendants).
![]() |
procedure TransferMotorSignals(Motors: TMotors); virtual; |
Transfers the values in OutputVariables to the actual motors. To transfer the motor output values, the procedure TMotor.SetSignal is called for each motor. It is assumed that the number of motors and the size of the vector OutputVariables are equal. This procedure is called in the procedure TBrain.Step and does not need to be called explicitly.
![]() |
property OutputVariables: TVector; |
![]() |
property OutputVariables: TVector; |
Provides read access to the variable fOutputVariables.