/** * Get angle. * @param j j * @return r */ //ODE_API public static double dJointGetPUAngle1 (DPUJoint j) { return j.getAngle1(); }
System.out.println("Position =" + pu.getPosition()); System.out.println("Position Rate=" + pu.getPositionRate()); System.out.println("Angle1 =" + pu.getAngle1()); System.out.println("Angle1 Rate=" + pu.getAngle1Rate()); System.out.println("Angle2 =" + pu.getAngle2());
std_cout("Position =",pu.getPosition() ,"\n"); std_cout("Position Rate=",pu.getPositionRate() ,"\n"); std_cout("Angle1 =",pu.getAngle1() ,"\n"); std_cout("Angle1 Rate=",pu.getAngle1Rate() ,"\n"); std_cout("Angle2 =",pu.getAngle2() ,"\n");
/** * Get angle. * @param j j * @return r */ //ODE_API public static double dJointGetPUAngle1 (DPUJoint j) { return j.getAngle1(); }
/** * Get both angles at the same time. * * <p>NOTE: This function combine dJointGetPUAngle1 and dJointGetPUAngle2 together * and try to avoid redundant calculation * * @param joint The Prismatic 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 dJointGetPUAngles (dJoint j, double *angle1, double *angle2); public static void dJointGetPUAngles (DPUJoint 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 dJointGetPUAngle1 and dJointGetPUAngle2 together * and try to avoid redundant calculation * * @param joint The Prismatic 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 dJointGetPUAngles (dJoint j, double *angle1, double *angle2); public static void dJointGetPUAngles (DPUJoint joint, RefDouble angle1, RefDouble angle2) { angle1.d = joint.getAngle1(); angle2.d = joint.getAngle2(); }
ang1 = pu.getAngle1(); ang2 = pu.getAngle2(); pu.getAxis1 (axisR1);
ang1 = pu.getAngle1(); ang2 = pu.getAngle2(); pu.getAxis1 (axisR1);