/** * Close ODE after it is not needed any more. * * The function is required to be called when program does not need ODE features any more. * The call to {@code dCloseODE} releases all the resources allocated for library * including all the thread local data that might be allocated for all the threads * that were using ODE. * * {@code dCloseODE} is a paired function for {@code dInitODE2} and must only be called * after successful library initialization. * * <p>NOTE: Important! * Make sure that all the threads that were using ODE have already terminated * before calling {@code dCloseODE}. In particular it is not allowed to call * {@code dCleanupODEAllDataForThread} after {@code dCloseODE}. * * @see #dInitODE2(int) */ //ODE_API public static void dCloseODE() { OdeHelper.closeODE(); } }
/** * Close ODE after it is not needed any more. * * The function is required to be called when program does not need ODE features any more. * The call to {@code dCloseODE} releases all the resources allocated for library * including all the thread local data that might be allocated for all the threads * that were using ODE. * * {@code dCloseODE} is a paired function for {@code dInitODE2} and must only be called * after successful library initialization. * * <p>NOTE: Important! * Make sure that all the threads that were using ODE have already terminated * before calling {@code dCloseODE}. In particular it is not allowed to call * {@code dCleanupODEAllDataForThread} after {@code dCloseODE}. * * @see #dInitODE2(int) */ //ODE_API public static void dCloseODE() { OdeHelper.closeODE(); } }
private void demo(String[] args) { // create world OdeHelper.initODE(); // run demo dsSimulationLoop (args, 800, 600, this); OdeHelper.closeODE(); }
private void demo(String[] args) { // create world OdeHelper.initODE(); // run demo dsSimulationLoop (args, 800, 600, this); OdeHelper.closeODE(); }
private void demo(String[] args) { // create world OdeHelper.initODE(); // run demo dsSimulationLoop (args, 800, 600, this); OdeHelper.closeODE(); }
private void demo(String[] args) { // create world OdeHelper.initODE(); // run demo dsSimulationLoop (args, 800, 600, this); OdeHelper.closeODE(); }
private void demo(String[] args) { OdeHelper.initODE2(0); // run simulation dsSimulationLoop (args,800,600,this); OdeHelper.closeODE(); }
private void demo(String[] args) { // create world OdeHelper.initODE(); // run demo dsSimulationLoop (args, 800, 600, this); OdeHelper.closeODE(); }
private void demo(String[] args) { // create world OdeHelper.initODE2(0); // run demo dsSimulationLoop (args, 800, 600, this); OdeHelper.closeODE(); }
private void demo(String[] args) { OdeHelper.initODE2(0); dRandSetSeed (System.currentTimeMillis()/1000); createTest(); // run simulation dsSimulationLoop (args,352,288,this); world.destroy(); OdeHelper.closeODE(); }
private void demo(String[] args) { OdeHelper.initODE2(0); dRandSetSeed (System.currentTimeMillis()); reset_test(); // run simulation dsSimulationLoop (args,352,288,this); world.destroy (); OdeHelper.closeODE(); }
private void demo(String[] args) { OdeHelper.initODE2(0); reset(); // run simulation dsSimulationLoop (args,352,288,this); clear(); OdeHelper.closeODE(); }
private void demo(String[] args) { OdeHelper.initODE2(0); reset(); // run simulation dsSimulationLoop (args,352,288,this); clear(); OdeHelper.closeODE(); }
private void demo(String[] args) { doFast = true; OdeHelper.initODE2(0); bodies = 0; joints = 0; boxes = 0; spheres = 0; setupSimulation(); // run simulation dsSimulationLoop (args,352,288,this); shutdownSimulation(); OdeHelper.closeODE(); }
private void demo(String[] args) { OdeHelper.initODE2(0); // test the simple space: // space = dSimpleSpaceCreate(); // test the hash space: // space = dHashSpaceCreate (0); // dHashSpaceSetLevels (space,-10,10); // test the quadtree space DVector3 Center = new DVector3(); DVector3 Extents = new DVector3(10, 0, 10); space = OdeHelper.createQuadTreeSpace(null, Center, Extents, 7); //space = OdeHelper.createSapSpace(space, AXES.XYZ);// 36); //space = OdeHelper.createSimpleSpace(null); //space = OdeHelper.createHashSpace(null); for (int i=0; i < NUM; i++) geom[i] = null; init_test(); // run simulation dsSimulationLoop (args,352,288,this); space.destroy (); OdeHelper.closeODE(); }
private void demo(String[] args) { // create world OdeHelper.initODE2( 0 ); world = OdeHelper.createWorld(); space = OdeHelper.createSimpleSpace( null ); contactgroup = OdeHelper.createJointGroup(); world.setGravity( 0,0,-0.5 ); world.setCFM( 1e-5 ); OdeHelper.createPlane( space,0,0,1,0 ); for (int i = 0; i < NUM; i++) obj[i] = new MyObject(); // run simulation dsSimulationLoop( args,352,288,this ); contactgroup.destroy(); space.destroy(); world.destroy(); OdeHelper.closeODE(); }
private void setup(String[] args) { // setup all tests //memset (testslot,0,sizeof(testslot)); for (int i = 0; i < MAX_TESTS; i++) testslot[i] = new TestSlot(); OdeHelper.initODE2(0); MAKE_TEST(1,"test_sphere_point_depth"); MAKE_TEST(2,"test_box_point_depth"); MAKE_TEST(3,"test_ccylinder_point_depth"); MAKE_TEST(4,"test_plane_point_depth"); MAKE_TEST(10,"test_ray_and_sphere"); MAKE_TEST(11,"test_ray_and_box"); MAKE_TEST(12,"test_ray_and_ccylinder"); MAKE_TEST(13,"test_ray_and_plane"); MAKE_TEST(14,"test_ray_and_cylinder"); MAKE_TEST(100,"test_dBoxTouchesBox"); MAKE_TEST(101,"test_dBoxBox"); do_tests (args); OdeHelper.closeODE(); }
private void demo(String[] args) { OdeHelper.initODE2(0); world = OdeHelper.createWorld(); world.setGravity(0, 0, -0.5); world.setQuickStepNumIterations(50); // <-- increase for more stability space = OdeHelper.createSimpleSpace(null); //space = OdeHelper.createSapSpace(AXES.XYZ); //space = OdeHelper.createBHVSpace(0); contactgroup = OdeHelper.createJointGroup(); DGeom ground = OdeHelper.createPlane(space, 0, 0, 1, 0); place_cards(); // run simulation dsSimulationLoop (args, 640, 480, this); levels = 0; place_cards(); contactgroup.destroy(); world.destroy(); ground.destroy(); space.destroy(); OdeHelper.closeODE(); }
private void demo (String[] args) { OdeHelper.initODE2(0); world = OdeHelper.createWorld(); space = OdeHelper.createSimpleSpace(); contactgroup = OdeHelper.createJointGroup(); world.setGravity (0,0,-9.81); world.setContactMaxCorrectingVel(2.5); world.setMaxAngularSpeed(1); world.setAngularDamping(0.6 * STEP_SIZE); world.setAngularDampingThreshold(0); world.setLinearDampingThreshold(0); world.setLinearDamping(0.6 * STEP_SIZE); for (int i = 0; i < obj.length; i++) obj[i] = new MyObject(); OdeHelper.createPlane( space, 0, 0, 1, 0 ); dsSimulationLoop (args,352,288,this); contactgroup.destroy (); space.destroy (); world.destroy (); OdeHelper.closeODE(); }
private void demo(String[] args) { // create world OdeHelper.initODE2(0); world = OdeHelper.createWorld(); DMass m = OdeHelper.createMass(); m.setBox (1,SIDE,SIDE,SIDE); m.adjust (MASS); body[0] = OdeHelper.createBody (world); body[0].setMass (m); body[0].setPosition (0,0,1); body[1] = OdeHelper.createBody (world); body[1].setMass (m); DQuaternion q = new DQuaternion(); dQFromAxisAndAngle (q,-1,1,0,0.25*M_PI); body[1].setPosition (0.2,0.2,1.2); body[1].setQuaternion (q); slider = OdeHelper.createSliderJoint (world,null); slider.attach (body[0], body[1]); slider.setAxis (1,1,1); // run simulation dsSimulationLoop (args,352,288,this); world.destroy (); OdeHelper.closeODE(); }