/** * Create a box geom with the provided side lengths. * * <p>REMARKS: * The point of reference for a box is its center. * * @param space a space to contain the new geom. May be null. * @param lx the length of the box along the X axis * @param ly the length of the box along the Y axis * @param lz the length of the box along the Z axis * * @return A new box geom. * * @see #dGeomDestroy(DGeom) * @see #dGeomBoxSetLengths(DBox, double, double, double) */ //ODE_API public static DBox dCreateBox (DSpace space, double lx, double ly, double lz) { return OdeHelper.createBox(space, lx, ly, lz); }
/** * Create a box geom with the provided side lengths. * * <p>REMARKS: * The point of reference for a box is its center. * * @param space a space to contain the new geom. May be null. * @param lx the length of the box along the X axis * @param ly the length of the box along the Y axis * @param lz the length of the box along the Z axis * * @return A new box geom. * * @see #dGeomDestroy(DGeom) * @see #dGeomBoxSetLengths(DBox, double, double, double) */ //ODE_API public static DBox dCreateBox (DSpace space, double lx, double ly, double lz) { return OdeHelper.createBox(space, lx, ly, lz); }
Box()// : // body(world), // geom(space, 0.2, 0.2, 0.2) { body = OdeHelper.createBody(world); geom = OdeHelper.createBox(space, 0.2, 0.2, 0.2); DMass mass = OdeHelper.createMass(); mass.setBox(10, 0.2, 0.2, 0.2); body.setMass(mass); geom.setData(this); geom.setBody(body); } void draw() //const
Box()// : // body(world), // geom(space, 0.2, 0.2, 0.2) { body = OdeHelper.createBody(world); geom = OdeHelper.createBox(space, 0.2, 0.2, 0.2); DMass mass = OdeHelper.createMass(); mass.setBox(10, 0.2, 0.2, 0.2); body.setMass(mass); geom.setData(this); geom.setBody(body); } void draw() //const
Card() { body = OdeHelper.createBody(world); geom = OdeHelper.createBox(space, sides.get0(), sides.get1(), sides.get2()); geom.setBody(body); geom.setData(this); DMass mass = OdeHelper.createMass(); mass.setBox(1, sides.get0(), sides.get1(), sides.get2()); body.setMass(mass); }
final double kx = 1, ky = 0, kz = .5; kbody.setPosition(kx, ky, kz); kbox = OdeHelper.createBox(space, 3, 3, .5); kbox.setBody(kbody); kpole = OdeHelper.createCylinder(space, .125, 1.5); matraca_geom = OdeHelper.createBox(space, 0.5, 2, 0.75); matraca_geom.setBody(matraca); DMass mass = OdeHelper.createMass();
rampGeom[ii] = OdeHelper.createBox(space,rampW,rampY,rampZ); OdeMath.dQFromAxisAndAngle(q,0,1,0,angle); rampGeom[ii].setQuaternion(q);
final double kx = 1, ky = 0, kz = .5; kbody.setPosition(kx, ky, kz); kbox = OdeHelper.createBox(space, 3, 3, .5); kbox.setBody(kbody); kpole = OdeHelper.createCylinder(space, .125, 1.5); matraca_geom = OdeHelper.createBox(space, 0.5, 2, 0.75); matraca_geom.setBody(matraca); DMass mass = OdeHelper.createMass();
private void demo(String[] args) { int i,j; DMass m = OdeHelper.createMass(); // create world OdeHelper.initODE2(0); world = OdeHelper.createWorld(); space = OdeHelper.createHashSpace (null); contactgroup = OdeHelper.createJointGroup (); world.setGravity (0,0,-GRAVITY); ground = OdeHelper.createPlane (space,0,0,1,0); // bodies for (i=0; i<N1; i++) { for (j=0; j<N2; j++) { body[i][j] = OdeHelper.createBody (world); m.setBox (1,LENGTH,LENGTH,HEIGHT); m.adjust (MASS*(j+1)); body[i][j].setMass (m); body[i][j].setPosition (i*2*LENGTH,j*2*LENGTH,HEIGHT*0.5); box[i][j] = OdeHelper.createBox (space,LENGTH,LENGTH,HEIGHT); box[i][j].setBody (body[i][j]); } } // run simulation dsSimulationLoop (args,352,288,this); contactgroup.destroy(); space.destroy(); world.destroy(); OdeHelper.closeODE(); }
body[i].setData (i); box[i]= OdeHelper.createBox(space, SIDE,SIDE,SIDE); box[i].setBody (body[i]);
body[i].setData (i); box[i]= OdeHelper.createBox(space, SIDE,SIDE,SIDE); box[i].setBody (body[i]);
platform = OdeHelper.createBox(space, 4, 4, 1);
geom[i] = OdeHelper.createBox (space, bounds[i].len0(), bounds[i].len1(),
DBox box = OdeHelper.createBox (null,1,1,1); space.add (box);