C# Класс SharpNeat.DomainsExtra.Box2D.Box2dDomainView

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
_box IBlackBox
_simWorld SimulationWorld

Открытые методы

Метод Описание
Box2dDomainView ( IBlackBox>.IGenomeDecoder genomeDecoder ) : System

Construct with the provided IGenomeDecoder, this is used to decode genome(s) into IBlackBox controllers.

RefreshView ( object genome ) : void

Refresh/update the view with the provided genome.

Защищенные методы

Метод Описание
CreateSimulationWorld ( ) : SimulationWorld

Create a Box2D simulation world.

InvokeController ( ) : void

Invoke any required control logic in the Box2D world.

OnHandleDestroyed ( EventArgs e ) : void

Event handler to clean-up on window closure.

TestStopCondition ( ) : bool

Test if the Box2D world has arrived at a stop condition.

Приватные методы

Метод Описание
ConvertScreenToWorld ( float x, float y ) : Vec2

Convert screen coordinates to box2d world coords.

InitDebugDraw ( ) : void

Initialise debug drawing object (interface between Box2D world and openGL rendering).

RunTrial ( ) : void

Run one simulation.

SetView ( ) : void

Set the extents of the viewport and the box2D world. The extents of the two coordinate systems are set to preserve the correct aspect ratio when rendering the Box2d world. This is done simply be always rendering the full height of the box2D world and varying the horizontal extents to maintain the aspect ratio as the viewport is resized.

SimulationThread ( ) : void

Run simulations until thread is terminated.

btnReset_Click ( object sender, EventArgs e ) : void
openGlControl_MouseDown ( object sender, MouseEventArgs e ) : void
openGlControl_MouseMove ( object sender, MouseEventArgs e ) : void
openGlControl_MouseUp ( object sender, MouseEventArgs e ) : void
openGlControl_Resize ( object sender, EventArgs e ) : void

Описание методов

Box2dDomainView() публичный Метод

Construct with the provided IGenomeDecoder, this is used to decode genome(s) into IBlackBox controllers.
public Box2dDomainView ( IBlackBox>.IGenomeDecoder genomeDecoder ) : System
genomeDecoder IBlackBox>.IGenomeDecoder
Результат System

CreateSimulationWorld() защищенный абстрактный Метод

Create a Box2D simulation world.
protected abstract CreateSimulationWorld ( ) : SimulationWorld
Результат SimulationWorld

InvokeController() защищенный абстрактный Метод

Invoke any required control logic in the Box2D world.
protected abstract InvokeController ( ) : void
Результат void

OnHandleDestroyed() защищенный Метод

Event handler to clean-up on window closure.
protected OnHandleDestroyed ( EventArgs e ) : void
e EventArgs
Результат void

RefreshView() публичный Метод

Refresh/update the view with the provided genome.
public RefreshView ( object genome ) : void
genome object
Результат void

TestStopCondition() защищенный Метод

Test if the Box2D world has arrived at a stop condition.
protected TestStopCondition ( ) : bool
Результат bool

Описание свойств

_box защищенное свойство

The black box controller used by the simulation thread.
protected IBlackBox _box
Результат IBlackBox

_simWorld защищенное свойство

The Box2D world.
protected SimulationWorld,SharpNeat.DomainsExtra.Box2D _simWorld
Результат SimulationWorld