/** * Get angle. * @param j j * @return r */ //ODE_API public static double dJointGetUniversalAngle1 (DUniversalJoint j) { return j.getAngle1(); }
double a = jointUniversal.getAngle1(); double r = jointUniversal.getAngle1Rate(); double diff = a - last_angle_701; double a = jointUniversal.getAngle1(); double r = jointUniversal.getAngle1Rate(); double diff = a - last_angle_721; addOscillatingTorqueAbout (0.1, ax1); dampRotationalMotion (0.1); double a = jointUniversal.getAngle1(); double r = jointUniversal.getAngle1Rate(); double diff = a - last_angle_731; addOscillatingTorqueAbout (0.1, ax2); dampRotationalMotion (0.1); double a = jointUniversal.getAngle1(); double r = jointUniversal.getAngle1Rate(); double diff = a - last_angle_741;
/** * Get angle. * @param j j * @return r */ //ODE_API public static double dJointGetUniversalAngle1 (DUniversalJoint j) { return j.getAngle1(); }
/** * 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(); }