/** * Get angle. * @param j j * @return r */ //ODE_API public static double dJointGetPUAngle2 (DPUJoint j) { return j.getAngle2(); }
System.out.println("Angle1 =" + pu.getAngle1()); System.out.println("Angle1 Rate=" + pu.getAngle1Rate()); System.out.println("Angle2 =" + pu.getAngle2()); System.out.println("Angle2 Rate=" + pu.getAngle2Rate());
std_cout("Angle1 =",pu.getAngle1() ,"\n"); std_cout("Angle1 Rate=",pu.getAngle1Rate() ,"\n"); std_cout("Angle2 =",pu.getAngle2() ,"\n"); std_cout("Angle2 Rate=",pu.getAngle2Rate() ,"\n");
/** * Get angle. * @param j j * @return r */ //ODE_API public static double dJointGetPUAngle2 (DPUJoint j) { return j.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(); }
/** * 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(); }
DPUJoint pu = (DPUJoint) (joint); ang1 = pu.getAngle1(); ang2 = pu.getAngle2(); pu.getAxis1 (axisR1); pu.getAxis2 (axisR2);
DPUJoint pu = (DPUJoint) (joint); ang1 = pu.getAngle1(); ang2 = pu.getAngle2(); pu.getAxis1 (axisR1); pu.getAxis2 (axisR2);