Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix demo window sizes #131

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
## unreleased
- Fix DVector3.cross() returning always 0. [#128](https://github.com/tzaeschke/ode4j/issues/128)
- Fix JUnit test lint. [#130](https://github.com/tzaeschke/ode4j/pull/130)
- Fix Demo window size to minimum 640x480. [#131](https://github.com/tzaeschke/ode4j/pull/131)

## 0.5.1 - 2023-09-17
- Support for HiDPI screens / Apple Silicon/Retina. Contribution by valb3r,
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/java/org/ode4j/ode/old/BugsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void testBodyDampening() {
}

/* run simulation */
// dsSimulationLoop (args,352,288,this);
// dsSimulationLoop (args,640,480,this);

contactgroup.destroy();
space.destroy();
Expand Down
2 changes: 1 addition & 1 deletion demo-cpp/src/main/java/org/ode4j/democpp/DemoBuggy.java
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ private void demo(String[] args) {
dGeomSetRotation (ground_box,R);

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

dGeomDestroy (box[0]);
dGeomDestroy (sphere[0]);
Expand Down
2 changes: 1 addition & 1 deletion demo-cpp/src/main/java/org/ode4j/democpp/DemoChain1.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ private void demo(String[] args) {
}

/* run simulation */
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

dJointGroupDestroy (contactgroup);
dSpaceDestroy (space);
Expand Down
2 changes: 1 addition & 1 deletion demo-cpp/src/main/java/org/ode4j/democpp/DemoChain2.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ private void demo(String[] args) {
}

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

dCloseODE();
}
Expand Down
2 changes: 1 addition & 1 deletion demo-cpp/src/main/java/org/ode4j/democpp/DemoCrash.java
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ private void demo(String[] args) {
resetSimulation();

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

dJointGroupDestroy (contactgroup);
dSpaceDestroy (space);
Expand Down
2 changes: 1 addition & 1 deletion demo-cpp/src/main/java/org/ode4j/democpp/DemoCyl.java
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ private void demo(String [] args) {
reset_state();

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

dJointGroupEmpty (contactgroup);
dJointGroupDestroy (contactgroup);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ private void demo(String[] args) {
dSpaceAdd (space, sphgeom);

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

dJointGroupEmpty (contactgroup);
dJointGroupDestroy (contactgroup);
Expand Down
2 changes: 1 addition & 1 deletion demo-cpp/src/main/java/org/ode4j/democpp/DemoFeedback.java
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ private void demo(String[] args) {
colours[i]=0.0;

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

dJointGroupEmpty (contactgroup);
dJointGroupDestroy (contactgroup);
Expand Down
2 changes: 1 addition & 1 deletion demo-cpp/src/main/java/org/ode4j/democpp/DemoFriction.java
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ private void demo(String[] args) {
}

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

dJointGroupDestroy (contactgroup);
dSpaceDestroy (space);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ private void demo(String[] args) {
dGeomSetPosition( gheight, pos.get0(), pos.get1(), pos.get2() );

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

dJointGroupDestroy (contactgroup);
dSpaceDestroy (space);
Expand Down
2 changes: 1 addition & 1 deletion demo-cpp/src/main/java/org/ode4j/democpp/DemoHinge.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ private void demo(String[] args) {
// run simulation
// dsSimulationLoop (argc,argv,352,288,&fn);
// dsSimulationLoop (args,352,288,fn);
dsSimulationLoop (args,400,400,this);
dsSimulationLoop (args,640,480,this);

dWorldDestroy (world);
dCloseODE();
Expand Down
2 changes: 1 addition & 1 deletion demo-cpp/src/main/java/org/ode4j/democpp/DemoI.java
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ private void demo(String[] args) {
reset_test();

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

dWorldDestroy (world);
dCloseODE();
Expand Down
2 changes: 1 addition & 1 deletion demo-cpp/src/main/java/org/ode4j/democpp/DemoJoints.java
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@ private void doTest (String[] args, int n, int fatal_if_bad_n)

// run simulation
if (cmd_graphics) {
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);
//dsSimulationLoop (args,288,288,fn);
//dsSimulationLoop (args,400,400,fn);
}
Expand Down
2 changes: 1 addition & 1 deletion demo-cpp/src/main/java/org/ode4j/democpp/DemoMotion.java
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ private void demo(String[] args) {
dGeomSetCollideBits(platform, ~1l);

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

dJointGroupDestroy (contactgroup);
dSpaceDestroy (space);
Expand Down
2 changes: 1 addition & 1 deletion demo-cpp/src/main/java/org/ode4j/democpp/DemoMotor.java
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ private void demo(String[] args) {
}

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

dJointGroupDestroy(contactgroup);
dSpaceDestroy (space);
Expand Down
2 changes: 1 addition & 1 deletion demo-cpp/src/main/java/org/ode4j/democpp/DemoPiston.java
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ private void demo(String[] args) {


// run simulation
dsSimulationLoop (args,400,300,this);
dsSimulationLoop (args,640,480,this);

//delete joint;
dJointGroupDestroy (contactgroup);
Expand Down
2 changes: 1 addition & 1 deletion demo-cpp/src/main/java/org/ode4j/democpp/DemoSlider.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ private void demo(String[] args) {
dJointSetSliderAxis (slider,1,1,1);

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

dWorldDestroy (world);
dCloseODE();
Expand Down
2 changes: 1 addition & 1 deletion demo-cpp/src/main/java/org/ode4j/democpp/DemoSpace.java
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ private void demo(String[] args) {
init_test();

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

dSpaceDestroy (space);
dCloseODE();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ private void demo(String[] args) {
}

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

dJointGroupDestroy (contactgroup);
dSpaceDestroy (space);
Expand Down
2 changes: 1 addition & 1 deletion demo-cpp/src/main/java/org/ode4j/democpp/DemoStep.java
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ private void demo(String[] args) {
createTest();

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

dWorldDestroy (world);
dCloseODE();
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/org/ode4j/demo/DemoBasket.java
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ private void demo(String[] args)
space.add (sphgeom);

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

// Causes segm violation? Why?
// (because dWorldDestroy() destroys body connected to geom; must call first!)
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/org/ode4j/demo/DemoBasketConvex.java
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ private void demo(String[] args)
space.add (sphgeom);

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

// Causes segm violation? Why?
// (because dWorldDestroy() destroys body connected to geom; must call first!)
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/org/ode4j/demo/DemoBuggy.java
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ private void demo(String[] args) {
ground_box.setRotation(R);

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

box[0].destroy();
sphere[0].destroy();
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/org/ode4j/demo/DemoBuoyancy.java
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ private void demo (String[] args) {
for (int i = 0; i < obj.length; i++) obj[i] = new MyObject();
OdeHelper.createPlane( space, 0, 0, 1, 0 );

dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);
contactgroup.destroy ();
space.destroy ();
world.destroy ();
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/org/ode4j/demo/DemoChain1.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ private void demo(String[] args) {
}

/* run simulation */
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

contactgroup.destroy();
space.destroy();
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/org/ode4j/demo/DemoChain2.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ private void demo(String[] args) {
}

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

OdeHelper.closeODE();
}
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/org/ode4j/demo/DemoCrash.java
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ private void demo(String[] args) {
setupSimulation();

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

shutdownSimulation();
OdeHelper.closeODE();
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/org/ode4j/demo/DemoCyl.java
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ private void demo(String [] args) {
reset_state();

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

contactgroup.empty();
contactgroup.destroy();
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/org/ode4j/demo/DemoCylVsSphere.java
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ private void demo(String[] args) {
space.add (sphgeom);

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

contactgroup.empty();
contactgroup.destroy();
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/org/ode4j/demo/DemoFriction.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ private void demo(String[] args) {
}

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

contactgroup.destroy();
space.destroy();
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/org/ode4j/demo/DemoGyro2.java
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ private void demo(String[] args) {
reset();

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

clear();
OdeHelper.closeODE();
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/org/ode4j/demo/DemoGyroscopic.java
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ private void demo(String[] args) {
reset();

// run simulation
dsSimulationLoop (args,512,384,this);
dsSimulationLoop (args,640,480,this);

g1.DESTRUCTOR();//delete g1;
g2.DESTRUCTOR();//delete g2;
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/org/ode4j/demo/DemoHeightfield.java
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ private void demo(String[] args) {
// world.setStepThreadingImplementation(threading.dThreadingImplementationGetFunctions(), threading);

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

// threading.shutdownProcessing();//dThreadingImplementationShutdownProcessing(threading);
// pool.freeThreadPool();
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/org/ode4j/demo/DemoHinge.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ private void demo(String[] args) {
// run simulation
// dsSimulationLoop (argc,argv,352,288,&fn);
// dsSimulationLoop (args,352,288,fn);
dsSimulationLoop (args,400,400,this);
dsSimulationLoop (args,640,480,this);

world.destroy ();
OdeHelper.closeODE();
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/org/ode4j/demo/DemoI.java
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ private void demo(String[] args) {
reset_test();

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

world.destroy ();
OdeHelper.closeODE();
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/org/ode4j/demo/DemoJointPR.java
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ private void demo(String[] args) {
box1_space.add(box1);

// run simulation
dsSimulationLoop (args,400,300,this);
dsSimulationLoop (args,640,480,this);
contactgroup.destroy ();
space.destroy ();
world.destroy ();
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/org/ode4j/demo/DemoJointPU.java
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ private void demo(String[] args) {


// run simulation
dsSimulationLoop (args,400,300,this);
dsSimulationLoop (args,640,480,this);

//delete joint;
//joint.DESTRUCTOR(); //TZ, not necessary, is deleted from dWorldDestroy()
Expand Down
4 changes: 1 addition & 3 deletions demo/src/main/java/org/ode4j/demo/DemoJoints.java
Original file line number Diff line number Diff line change
Expand Up @@ -1077,9 +1077,7 @@ private void doTest (String[] args, int n, int fatal_if_bad_n) {

// run simulation
if (cmd_graphics) {
dsSimulationLoop (args,352,288,this);
//dsSimulationLoop (args,288,288,fn);
//dsSimulationLoop (args,400,400,fn);
dsSimulationLoop (args,640,480,this);
}
else {
for (int i=0; i < max_iterations; i++) step (false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ private void demo(String[] args) {
// world.setStepThreadingImplementation(threading.dThreadingImplementationGetFunctions(), threading);

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

// threading.shutdownProcessing();//dThreadingImplementationShutdownProcessing(threading);
// pool.freeThreadPool();
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/org/ode4j/demo/DemoMotion.java
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ private void demo(String[] args) {
platform.setCollideBits(~1l);

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

contactgroup.destroy ();
space.destroy ();
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/org/ode4j/demo/DemoMotor.java
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ private void demo(String[] args) {
}

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

contactgroup.destroy();
space.destroy ();
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/org/ode4j/demo/DemoRFriction.java
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ private void demo(String[] args) {
reset();

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

clear();
OdeHelper.closeODE();
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/java/org/ode4j/demo/DemoSlider.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ private void demo(String[] args) {
slider.setAxis (1,1,1);

// run simulation
dsSimulationLoop (args,352,288,this);
dsSimulationLoop (args,640,480,this);

world.destroy ();
OdeHelper.closeODE();
Expand Down
Loading