Method | Description | |
---|---|---|
MainForm ( ) : System |
Method | Description | |
---|---|---|
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 |