/** * Get the prismatic axis * @param j j * @param result r */ //ODE_API public static void dJointGetPRAxis1 (DPRJoint j, DVector3 result) { j.getAxis1(result); }
/** * Get the Rotoide axis * @param j j * @param result r */ //ODE_API public static void dJointGetPRAxis2 (DPRJoint j, DVector3 result) { j.getAxis2(result); }
/** * Set the axis for the prismatic articulation. * @param j j * @param x x * @param y y * @param z z */ //ODE_API public static void dJointSetPRAxis1 (DPRJoint j, double x, double y, double z) { j.setAxis1(x, y, z); }
case 'v': case 'V': joint.setParamVel2(2); joint.setParamFMax2(500); break; joint.setParamVel2(0); joint.setParamFMax2(0); break; joint.setParamLoStop2(-0.5); joint.setParamHiStop2( 0.5); break; joint.setParamLoStop2( -dInfinity); joint.setParamHiStop2( dInfinity); break; case 'I': DVector3 anchor = new DVector3(); joint.getAnchor(anchor); double angle = joint.getAngle(); double w = joint.getAngleRate(); double l = joint.getPosition(); double v = joint.getPositionRate();
0, 0); jointPR = OdeHelper.createPRJoint (world, null); jointPR.attach (body[0], body[1]); jointPR.setAnchor (-0.5, 0.0, 1.0); jointPR.setAxis1 (0, 1, 0); jointPR.setAxis2 (1, 0, 0); jointPR.setParamLoStop (-0.5); jointPR.setParamHiStop (0.5); jointPR.setParamLoStop2 (0); jointPR.setParamHiStop2 (0); return 1; case 803: // 2 bodies with spring force and prismatic NOT fixed 0, 0); jointPR = OdeHelper.createPRJoint (world, null); jointPR.attach (body[0], body[1]); jointPR.setAnchor (-0.5, 0.0, 1.0); jointPR.setAxis1 (0, 1, 0); jointPR.setAxis2 (1, 0, 0); jointPR.setParamLoStop (-0.5); jointPR.setParamHiStop (0.5); jointPR.setParamLoStop2 (-0.5); jointPR.setParamHiStop2 (0.5); return 1;
joint.attach (box1_body,box2_body); switch (flag) joint.setAnchor ( 2.1, 0.0, BOX2_HEIGHT/2.0); joint.setParamLoStop (-0.5); joint.setParamHiStop ( 1.5); break; joint.setAnchor ( 0.0, 0.0, BOX2_HEIGHT/2.0); joint.setParamLoStop ( 0.0); joint.setParamHiStop ( 0.0); break; joint.setAnchor ( 1.1, 0.0, BOX2_HEIGHT/2.0); joint.setParamLoStop (-0.5); joint.setParamHiStop ( 1.5); break; joint.setAxis1(1,0,0); joint.setAxis2(0,0,1);
/** * Set joint parameter. * * <p>NOTE: parameterX where X equal 2 refer to parameter for the rotoide articulation * @param j j * @param parameter p * @param value v */ //ODE_API public static void dJointSetPRParam (DPRJoint j, int parameter, double value) { j.setParam(PARAM_N.toEnum(parameter), value); }
/** * Set the axis for the rotoide articulation. * @param j j * @param x x * @param y y * @param z z */ //ODE_API public static void dJointSetPRAxis2 (DPRJoint j, double x, double y, double z) { j.setAxis2(x, y, z); }
/** * Get the joint anchor point, in world coordinates. * Return the point on body 1. If the joint is perfectly satisfied, * this will be the same as the point on body 2. * @param j j * @param result r */ //ODE_API public static void dJointGetPRAnchor (DPRJoint j, DVector3 result) { j.getAnchor(result); }
/** * Get the PR angular position (i.e. the twist between the 2 bodies) * * When the axis is set, the current position of the attached bodies is * examined and that position will be the zero position. * @param j j * @return r */ //ODE_API public static double dJointGetPRAngle (DPRJoint j) { return j.getAngle(); }
/** * Get the PR angular position's time derivative * @param j j * @return r */ //ODE_API public static double dJointGetPRAngleRate (DPRJoint j) { return j.getAngleRate(); }
/** * Get the PR linear position (i.e. the prismatic's extension). * * When the axis is set, the current position of the attached bodies is * examined and that position will be the zero position. * * The position is the "oriented" length between the * position = (Prismatic axis) dot_product [(body1 + offset) - (body2 + anchor2)] * @param j j * @return r */ //ODE_API public static double dJointGetPRPosition (DPRJoint j) { return j.getPosition(); }
/** * Set joint parameter. * * <p>NOTE: parameterX where X equal 2 refer to parameter for the rotoide articulation * @param j j * @param parameter p * @param value v */ //ODE_API public static void dJointSetPRParam (DPRJoint j, int parameter, double value) { j.setParam(PARAM_N.toEnum(parameter), value); }
/** * Set the axis for the rotoide articulation. * @param j j * @param x x * @param y y * @param z z */ //ODE_API public static void dJointSetPRAxis2 (DPRJoint j, double x, double y, double z) { j.setAxis2(x, y, z); }
/** * Get the joint anchor point, in world coordinates. * Return the point on body 1. If the joint is perfectly satisfied, * this will be the same as the point on body 2. * @param j j * @param result r */ //ODE_API public static void dJointGetPRAnchor (DPRJoint j, DVector3 result) { j.getAnchor(result); }
/** * Get the PR angular position (i.e. the twist between the 2 bodies) * * When the axis is set, the current position of the attached bodies is * examined and that position will be the zero position. * @param j j * @return r */ //ODE_API public static double dJointGetPRAngle (DPRJoint j) { return j.getAngle(); }