An overview of the demo applications
Demo applications are provided to showcase certain features of Libbulletjme. The following demos are found in the com.github.stephengold.sport.demo package of the SPORT "apps" sub-project:
-
ConveyorDemo
demonstrates contact-point modifications
-
NewtonsCradle
demonstrates dynamic restitution and point-to-point joints
-
Pachinko
demonstrates compound collision shapes and 2-D physics
-
SplitDemo
demonstrates dynamic splitting of rigid bodies
-
TestGearJoint
demonstrates a gear joint
-
ThousandCubes
demonstrates stacking cubes and launching projectiles
-
Windlass
demonstrates rope simulation using rigid bodies
User interface
The demos are controlled primarily by keyboard input.
The descriptions below assume a keyboard with the "US" (QWERTY) layout. On keyboards with other layouts, the keys may be labeled differently. |
For convenience, the mapping of keys to actions is partly standardized. In most demos:
-
. and Pause toggle the simulation between running and paused,
-
C dumps the camera’s position to the console, and
-
Esc ends the application.
For camera control,
all demos except ThousandCubes
use DragLMB
rotation mode.
This means you can rotate the camera
by dragging the mouse with the left button depressed.
Furthermore:
-
W and S dolly the camera forward and back, respectively,
-
A and D dolly the camera left and right, respectively,
-
Q raises the camera, and
-
Z lowers the camera.
Additional mappings are specific to each application:
-
In
ConveyorDemo
:-
Enter, I, Ins, Numpad0, and Spacebar drop a box onto the conveyor belt
-
-
In
NewtonsCradle
:-
F1, 1, and Numpad1 restart with a single ball
-
F2, 2, and Numpad2 restart with 2 balls
-
F3, 3, and Numpad3 restart with 3 balls
-
F4, 4, and Numpad4 restart with 4 balls
-
F5, 5, and Numpad5 restart with 5 balls
-
-
In
Pachinko
:-
F4, 4, and Numpad4 restart with 4 rows of pins
-
F5, 5, and Numpad5 restart with 5 rows of pins
-
F6, 6, and Numpad6 restart with 6 rows of pins
-
F7, 7, and Numpad7 restart with 7 rows of pins
-
F8, 8, and Numpad8 restart with 8 rows of pins
-
F9, 9, and Numpad9 restart with 9 rows of pins
-
-
In
SplitDemo
:-
Tab convert all bodies to splittable shapes
-
Home and Numpad5 restart with a random shape
-
Enter, Numpad0, and Spacebar split all shapes
-
L bracket and R bracket rotate the splitting plane
-
-
In
TestGearJoint
:-
R and Down arrow apply +Y torque to the drive shaft
-
F and Up arrow apply -Y torque to the drive shaft
-
-
In
ThousandCubes
:-
E launch a red ball
-
-
In
Windlass
:-
Down arrow turn the barrel counter-clockwise
-
Up arrow turn the barrel clockwise
-