C# 클래스 SharpNeat.Box2dTestHarness.MainForm

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

공개 메소드들

메소드 설명
MainForm ( ) : System

비공개 메소드들

메소드 설명
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).

InitSimWorld ( Type simWorldType ) : void
PopulateSimulationWorldListBox ( ) : void
SetView ( ) : void

Initialises OpenGL graphics library. Here we set what area of the box2d world to draw and the size of the drawing window on screen. We maintain the correct aspect ratio as follows: 1) Vertical extents of the visible box2D world are fixed. That is, if we increase the height of the control then the world gets stretched vertically. 2) Thus to maintain aspect ratio the horizontal extents of the visible Box2D world change. That is, if we widen the control we see more of the Box2d world.

SimStep ( ) : void

Moves the simulation forward by one timestep.

TerminateSimulation ( ) : void
cmbSimulationWorlds_SelectedIndexChanged ( object sender, EventArgs e ) : void
openGlControl_MouseDown ( object sender, MouseEventArgs e ) : void

Mouse interaction with the box2d world.

openGlControl_MouseMove ( object sender, MouseEventArgs e ) : void

Mouse interaction with the box2d world.

openGlControl_MouseUp ( object sender, MouseEventArgs e ) : void

Mouse interaction with the box2d world.

openGlControl_Resize ( object sender, EventArgs e ) : void
simTimer_Tick ( object sender, EventArgs e ) : void

메소드 상세

MainForm() 공개 메소드

public MainForm ( ) : System
리턴 System