/** * Set the linear velocity of a body. * @param b b * @param x x * @param y y * @param z z * */ //ODE_API public static void dBodySetLinearVel (DBody b, double x, double y, double z){ b.setLinearVel(x, y, z); }
/** * Set the linear velocity of a body. * @param b b * @param x x * @param y y * @param z z * */ //ODE_API public static void dBodySetLinearVel (DBody b, double x, double y, double z){ b.setLinearVel(x, y, z); }
@Override public void command(char cmd) { cmd = Character.toLowerCase(cmd); if (cmd == ' ') { ragdoll.getBones().get(DxDefaultHumanRagdollConfig.PELVIS).getBody().setLinearVel(0, 0, 80); } }
void resetBall(DBody b, int idx) { b.setPosition( 0.5*track_len*Math.cos(track_incl) // Z - 0.5*track_height*Math.sin(track_incl) - ball_radius, // X balls_sep*idx, // Y track_elevation + ball_radius// Z + 0.5*track_len*Math.sin(track_incl) + 0.5*track_height*Math.cos(track_incl)); // DMatrix3 r = new DMatrix3(1, 0, 0, 0, // 0, 1, 0, 0, // 0, 0, 1, 0); DMatrix3 r = new DMatrix3(1, 0, 0, 0, 1, 0, 0, 0, 1); b.setRotation(r); b.setLinearVel(0, 0, 0); b.setAngularVel(0, 0, 0); }
private void reset() { DMatrix3 R = new DMatrix3(); R.setIdentity(); top1.setRotation(R); top2.setRotation(R); top1.setPosition(0.8f, -2, 2); top2.setPosition(0.8f, 2, 2); top1.setAngularVel(1,0,7); top2.setAngularVel(1,0,7); top1.setLinearVel(0,0.2f,0); top2.setLinearVel(0,0.2f,0); }
private void reset() { DMatrix3 R = new DMatrix3(); R.setIdentity(); top1.setRotation(R); top2.setRotation(R); top1.setPosition(0.8f, -2, 2); top2.setPosition(0.8f, 2, 2); top1.setAngularVel(0,0,5); top2.setAngularVel(0,0,5); top1.setLinearVel(0,0.2f,0); top2.setLinearVel(0,0.2f,0); }
private void reset_state() { float sx=-4, sy=-4, sz=2; DQuaternion q = new DQuaternion(); dQFromAxisAndAngle (q,1,0,0,M_PI*0.5); if (BOX) { boxbody.setPosition (sx, sy+1, sz); boxbody.setLinearVel (0,0,0); boxbody.setAngularVel (0,0,0); boxbody.setQuaternion (q); } if (CYL) { cylbody.setPosition (sx, sy, sz); cylbody.setLinearVel (0,0,0); cylbody.setAngularVel (0,0,0); cylbody.setQuaternion (q); } }
private void reset_ball() { float sx=0.0f, sy=2.973f, sz=7.51f; // //#if defined(_MSC_VER) && defined(dDOUBLE) // //sy -= 0.01; // Cheat, to make it score under win32/double // //#endif sy += 0.033; // Windows 64 //TODO //sy += 0.046; //For 'double' on Linux 64bit. //TODO !!! DQuaternion q = new DQuaternion(); q.setIdentity(); sphbody.setPosition (sx, sy, sz); sphbody.setQuaternion(q); sphbody.setLinearVel (0,0,0); sphbody.setAngularVel (0,0,0); }
private void reset_ball() { float sx=0.0f, sy=3.40f, sz=7.15f; // //#if defined(_MSC_VER) && defined(dDOUBLE) // //sy -= 0.01; // Cheat, to make it score under win32/double // //#endif sy += 0.033; // Windows 64 //TODO //sy += 0.046; //For 'double' on Linux 64bit. //TODO !!! DQuaternion q = new DQuaternion(); q.setIdentity(); sphbody.setPosition (sx, sy, sz); sphbody.setQuaternion(q); sphbody.setLinearVel (0,0,0); sphbody.setAngularVel (0,0,0); }
double t = 0.99; dyn_bodies[b].setLinearVel ( vel.reScale(s) ); dyn_bodies[b].setAngularVel( rot.reScale(t));
hinge1.setParam(PARAM_N.dParamFMax1, 2); body1.setLinearVel(0, 0, 0); body2.setLinearVel(0, 0, 0); body1.setAngularVel(0, 0, 0); body2.setAngularVel(0, 0, 0);
kbody.setLinearVel(vel);
cannon_ball_body.setPosition (cpos[0],cpos[1],cpos[2]); double force = 10; cannon_ball_body.setLinearVel (force*R4.get(0, 2),force*R4.get(1,2),force*R4.get(2,2)); cannon_ball_body.setAngularVel (0,0,0); break;
kbody.setLinearVel(vel);
body[BODY1].setLinearVel(0,0,0); body[BODY1].setAngularVel(0,0,0); body[BODY2].setLinearVel(0,0,0); body[BODY2].setAngularVel(0,0,0);
body[BODY1].setLinearVel(0,0,0); body[BODY1].setAngularVel(0,0,0); body[BODY2].setLinearVel(0,0,0); body[BODY2].setAngularVel(0,0,0);
if (autoDisabled) { bone.body.disable(); bone.body.setLinearVel(0, 0, 0); bone.body.setAngularVel(0, 0, 0); bone.body.setPosition(bone.position);
if (autoDisabled) { bone.body.disable(); bone.body.setLinearVel(0, 0, 0); bone.body.setAngularVel(0, 0, 0); bone.body.setPosition(bone.position);
dyn_bodies[b].setLinearVel ( 3. * (r1 - 0.5), 3. * (r2 - 0.5), 0);
body[i].setLinearVel (dRandReal()*2-1,dRandReal()*2-1, dRandReal()*2-1); body[i].setAngularVel (dRandReal()*2-1,dRandReal()*2-1,