C# 클래스 SharpNeat.DomainsExtra.Box2D.Box2dDomainView

파일 보기 프로젝트 열기: colgreen/sharpneat

보호된 프로퍼티들

프로퍼티 타입 설명
_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