/** * Get angle * @param j j * @return r */ //ODE_API public static double dJointGetUniversalAngle2 (DUniversalJoint j) { return j.getAngle2(); }
double a = jointUniversal.getAngle2(); double r = jointUniversal.getAngle2Rate(); double diff = a - last_angle_702; double a = jointUniversal.getAngle2(); double r = jointUniversal.getAngle2Rate(); double diff = a - last_angle_722; addOscillatingTorqueAbout (0.1, ax1); dampRotationalMotion (0.1); double a = jointUniversal.getAngle2(); double r = jointUniversal.getAngle2Rate(); double diff = a - last_angle_732; addOscillatingTorqueAbout (0.1, ax2); dampRotationalMotion (0.1); double a = jointUniversal.getAngle2(); double r = jointUniversal.getAngle2Rate(); double diff = a - last_angle_742;
/** * Get angle * @param j j * @return r */ //ODE_API public static double dJointGetUniversalAngle2 (DUniversalJoint j) { return j.getAngle2(); }
/** * Get both angles at the same time. * * <p>NOTE: This function combine getUniversalAngle1 and getUniversalAngle2 together * and try to avoid redundant calculation * * @param joint The universal joint for which we want to calculate the angles * @param angle1 The angle between the body1 and the axis 1 * @param angle2 The angle between the body2 and the axis 2 */ //ODE_API // void dJointGetUniversalAngles (dJoint j, double *angle1, double *angle2); public static void dJointGetUniversalAngles (DUniversalJoint joint, RefDouble angle1, RefDouble angle2) { angle1.d = joint.getAngle1(); angle2.d = joint.getAngle2(); }
/** * Get both angles at the same time. * * <p>NOTE: This function combine getUniversalAngle1 and getUniversalAngle2 together * and try to avoid redundant calculation * * @param joint The universal joint for which we want to calculate the angles * @param angle1 The angle between the body1 and the axis 1 * @param angle2 The angle between the body2 and the axis 2 */ //ODE_API // void dJointGetUniversalAngles (dJoint j, double *angle1, double *angle2); public static void dJointGetUniversalAngles (DUniversalJoint joint, RefDouble angle1, RefDouble angle2) { angle1.d = joint.getAngle1(); angle2.d = joint.getAngle2(); }