|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DPistonJoint
****************************************************************************
Piston
****************************************************************************
Component of a Piston joint
|- Anchor point Body_1 | Body_2 +---------------+ V +------------------+ / /| / /| / / + |-- ______ / / + / x /./........x.......(_____()..../ x /.......> axis +---------------+ / |-- +------------------+ / | |/ | |/ +---------------+ +------------------+ | | | | |------------------> <----------------------------| anchor1 anchor2When the prismatic joint as been elongated (i.e. dJointGetPistonPosition) return a value > 0
|- Anchor point Body_1 | Body_2 +---------------+ V +------------------+ / /| / /| / / + |-- ______ / / + / x /./........_____x.......(_____()..../ x /.......> axis +---------------+ / |-- +------------------+ / | |/ | |/ +---------------+ +------------------+ | | | | |----------------.> <----------------------------| anchor1 |----| anchor2 ^ |-- This is what dJointGetPistonPosition will return****************************************************************************
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.ode4j.ode.DJoint |
---|
DJoint.DJointFeedback, DJoint.PARAM, DJoint.PARAM_GROUPS, DJoint.PARAM_N |
Field Summary |
---|
Fields inherited from interface org.ode4j.ode.DJoint |
---|
P_OFS_1, P_OFS_2, P_OFS_3 |
Method Summary | |
---|---|
void |
addForce(double force)
Applies the given force in the slider's direction. |
void |
getAnchor(DVector3 result)
Get the joint anchor. |
void |
getAnchor2(DVector3 result)
Get the joint anchor wrt body 2. |
double |
getAngle()
Get the Piston angular position (i.e. |
double |
getAngleRate()
Get the piston angular position's time derivative. |
void |
getAxis(DVector3 result)
Get the prismatic axis (This is also the rotoide axis. |
double |
getParam(DJoint.PARAM_N parameter)
Get joint parameter. |
double |
getParamHiStop2()
|
double |
getParamLoStop2()
|
double |
getPosition()
Get the Piston linear position (i.e. |
double |
getPositionRate()
Get the piston linear position's time derivative. |
void |
setAnchor(double x,
double y,
double z)
Set the joint anchor. |
void |
setAnchor(DVector3C a)
Set the joint anchor. |
void |
setAnchorOffset(DVector3C xyz,
double dx,
double dy,
double dz)
Set the Piston anchor as if the 2 bodies were already at [dx,dy, dz] apart. |
void |
setAxis(double x,
double y,
double z)
Set the joint axis. |
void |
setAxis(DVector3C a)
Set the joint axis. |
void |
setParam(DJoint.PARAM_N parameter,
double value)
Set joint parameter. |
void |
setParamHiStop2(double d)
|
void |
setParamLoStop2(double d)
|
Methods inherited from interface org.ode4j.ode.DJoint |
---|
attach, DESTRUCTOR, disable, enable, getBody, getData, getFeedback, getNumBodies, isEnabled, setData, setFeedback |
Method Detail |
---|
void setAnchor(double x, double y, double z)
void setAnchor(DVector3C a)
void getAnchor(DVector3 result)
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.
void getAnchor2(DVector3 result)
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 prismatic 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.
void setAnchorOffset(DVector3C xyz, double dx, double dy, double dz)
This function initialize the anchor and the relative position of each body
as if the position between body1 and body2 was already the projection of [dx, dy, dz]
along the Piston axis. (i.e as if the body1 was at its current position - [dx,dy,dy] when the
axis is set).
Ex:
double offset = 3;
dVector3 axis;
dJointGetPistonAxis(jId, axis);
dJointSetPistonAnchor(jId, 0, 0, 0);
// If you request the position you will have: dJointGetPistonPosition(jId) == 0
dJointSetPistonAnchorOffset(jId, 0, 0, 0, axis[X]*offset, axis[Y]*offset, axis[Z]*offset);
// If you request the position you will have: dJointGetPistonPosition(jId) == offset
xyz
- The X, Y and Z position of the anchor point in world framedx
- A delta to be substracted to the X position as if the anchor was set
when body1 was at current_position[X] - dxdy
- A delta to be substracted to the Y position as if the anchor was set
when body1 was at current_position[Y] - dydz
- A delta to be substracted to the Z position as if the anchor was set
when body1 was at current_position[Z] - dzvoid setAxis(double x, double y, double z)
void setAxis(DVector3C a)
void getAxis(DVector3 result)
double getPosition()
When the axis is set, the current position of the attached bodies is examined and that position will be the zero position.
double getPositionRate()
void addForce(double force)
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().
double getParamLoStop2()
double getParamHiStop2()
void setParamLoStop2(double d)
void setParamHiStop2(double d)
double getAngle()
When the axis is set, the current position of the attached bodies is examined and that position will be the zero position.
double getAngleRate()
void setParam(DJoint.PARAM_N parameter, double value)
setParam
in interface DJoint
double getParam(DJoint.PARAM_N parameter)
getParam
in interface DJoint
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |