/** * Set the orientation of a body. * * <p>REMARKS: * After setting, the outcome of the simulation is undefined * if the new configuration is inconsistent with the joints/constraints * that are present. * @param b b * @param R R */ //ODE_API public static void dBodySetRotation (DBody b, final DMatrix3 R){ b.setRotation(R); }
/** * Set the orientation of a body. * * <p>REMARKS: * After setting, the outcome of the simulation is undefined * if the new configuration is inconsistent with the joints/constraints * that are present. * @param b b * @param R R */ //ODE_API public static void dBodySetRotation (DBody b, final DMatrix3 R){ b.setRotation(R); }
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); }
); if (i%2 != 0) cards.get(c).body.setRotation(left); else cards.get(c).body.setRotation(right); -(n-1 - (clength-hstep)/2)*hstep + 2*hstep*i, height + vstep/2); cards.get(c).body.setRotation(hrot);
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); }
body1.setRotation(R); body2.setRotation(R); body1.setRotation(R); body2.setRotation(R); body1.setRotation(R); body2.setRotation(R);
R.setIdentity(); box1_body.setPosition (0,0,BOX1_HEIGHT/2.0); box1_body.setRotation (R); 0.0, BOX2_HEIGHT/2.0); box2_body.setRotation (R);
body[BODY1].setRotation(R); body[BODY2].setRotation(R);
body[BODY1].setRotation(R); body[BODY2].setRotation(R);
dRandReal()-0.5,dRandReal()-0.5); body[0].setRotation (R3);
body.setRotation(new DMatrix3(xa.get0(), ya.get0(), za.get0(), xa.get1(), ya.get1(), za.get1(), xa.get2(), ya.get2(), za.get2())); totalMass += m.getMass(); DxRagdollBody bone = new DxRagdollBody(body, cyllen, radius, body.getPosition(), body.getQuaternion());
body.setRotation(new DMatrix3(xa.get0(), ya.get0(), za.get0(), xa.get1(), ya.get1(), za.get1(), xa.get2(), ya.get2(), za.get2())); totalMass += m.getMass(); DxRagdollBody bone = new DxRagdollBody(body, cyllen, radius, body.getPosition(), body.getQuaternion());
dRandReal()-0.5,dRandReal()-0.5); body[0].setRotation(R3);
R.setIdentity(); obj[i].body.setRotation (R);
dRandReal()-0.5,dRandReal()-0.5); body[0].setRotation (R3);
//dRFromAxisAndAngle (R,0,0,1,/*dRandReal()*10.0-5.0*/0); obj[i].body.setRotation(R);
dRFromAxisAndAngle( R,0,0,1,dRandReal()*10.0-5.0 ); obj[i].body.setRotation( R ); obj[i].body.setData( i );
dRFromAxisAndAngle (R,0,0,1,dRandReal()*10.0-5.0); obj[i].body.setRotation (R); obj[i].body.setData (i);
dRFromAxisAndAngle (R,0,0,1,dRandReal()*10.0-5.0); obj[i].body.setRotation (R); obj[i].body.setData (i);