/** * Get the prismatic axis (This is also the rotoide axis). * @param j j * @param result r */ //ODE_API public static void dJointGetPistonAxis (DPistonJoint j, DVector3 result) { j.getAxis(result); }
/** * Get the Piston linear position (i.e. the piston's extension). * * 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 dJointGetPistonPosition (DPistonJoint j) { return j.getPosition(); }
/** * Applies the given force in the slider's direction. * * That is, it applies a force with specified magnitude, in the direction of * prismatic's axis, to body1, and with the same magnitude but opposite * direction to body2. This function is just a wrapper for dBodyAddForce(). * @param joint j * @param force f */ //ODE_API public static void dJointAddPistonForce (DPistonJoint joint, double force) { joint.addForce(force); }
l = ( (DSliderJoint ) joint).getPosition(); } else { ( (DPistonJoint ) joint).getAxis (ax); l = ( (DPistonJoint ) joint).getPosition(); ((DPistonJoint) joint).getAnchor (anchor);
l = ( (DSliderJoint ) joint).getPosition(); } else { ( (DPistonJoint ) joint).getAxis (ax); l = ( (DPistonJoint ) joint).getPosition();
((DPistonJoint) joint).addForce(1); else ((DSliderJoint) joint).addForce(1); case 'y': case 'Y': if (joint instanceof DPistonJoint) ((DPistonJoint) joint).addForce(-1); else ((DSliderJoint) joint).addForce(-1); } else { DPistonJoint rj = (DPistonJoint ) (joint); System.out.println("Position =" + rj.getPosition());
/** * Set the joint axis. * @param j j * @param x x * @param y y * @param z z */ //ODE_API public static void dJointSetPistonAxis (DPistonJoint j, double x, double y, double z) { j.setAxis(new DVector3(x, y, z)); }
/** * Set the joint anchor. * @param j j * @param x x * @param y y * @param z z */ //ODE_API public static void dJointSetPistonAnchor (DPistonJoint j, double x, double y, double z) { j.setAnchor(new DVector3(x, y, z)); }
/** * Get the joint anchor. * * This returns the point on body 1. If the joint is perfectly satisfied, * this will be the same as the point on body 2 in direction perpendicular * to the prismatic axis. * @param j j * @param result r */ //ODE_API public static void dJointGetPistonAnchor (DPistonJoint j, DVector3 result) { j.getAnchor(result); }
/** * Get the Piston 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 dJointGetPistonAngle (DPistonJoint j) { return j.getAngle(); }
/** * Get the joint anchor w.r.t. body 2. * * This returns the point on body 2. You can think of a Piston * joint as trying to keep the result of dJointGetPistonAnchor() and * dJointGetPistonAnchor2() the same in the direction perpendicular to the * pirsmatic axis. If the joint is perfectly satisfied, * this function will return the same value as dJointGetPistonAnchor() to * within roundoff errors. dJointGetPistonAnchor2() can be used, along with * dJointGetPistonAnchor(), to see how far the joint has come apart. * @param j j * @param result r */ //ODE_API public static void dJointGetPistonAnchor2 (DPistonJoint j, DVector3 result) { j.getAnchor2(result); }
/** * Set the joint axis. * @param j j * @param x x * @param y y * @param z z */ //ODE_API public static void dJointSetPistonAxis (DPistonJoint j, double x, double y, double z) { j.setAxis(new DVector3(x, y, z)); }
/** * Set the joint anchor. * @param j j * @param x x * @param y y * @param z z */ //ODE_API public static void dJointSetPistonAnchor (DPistonJoint j, double x, double y, double z) { j.setAnchor(new DVector3(x, y, z)); }
/** * Get the joint anchor. * * This returns the point on body 1. If the joint is perfectly satisfied, * this will be the same as the point on body 2 in direction perpendicular * to the prismatic axis. * @param j j * @param result r */ //ODE_API public static void dJointGetPistonAnchor (DPistonJoint j, DVector3 result) { j.getAnchor(result); }
/** * Get the Piston 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 dJointGetPistonAngle (DPistonJoint j) { return j.getAngle(); }
/** * Get the joint anchor w.r.t. body 2. * * This returns the point on body 2. You can think of a Piston * joint as trying to keep the result of dJointGetPistonAnchor() and * dJointGetPistonAnchor2() the same in the direction perpendicular to the * pirsmatic axis. If the joint is perfectly satisfied, * this function will return the same value as dJointGetPistonAnchor() to * within roundoff errors. dJointGetPistonAnchor2() can be used, along with * dJointGetPistonAnchor(), to see how far the joint has come apart. * @param j j * @param result r */ //ODE_API public static void dJointGetPistonAnchor2 (DPistonJoint j, DVector3 result) { j.getAnchor2(result); }
/** * Get the Piston linear position (i.e. the piston's extension). * * 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 dJointGetPistonPosition (DPistonJoint j) { return j.getPosition(); }
/** * Get the prismatic axis (This is also the rotoide axis). * @param j j * @param result r */ //ODE_API public static void dJointGetPistonAxis (DPistonJoint j, DVector3 result) { j.getAxis(result); }