|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DUniversalJoint
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 |
addTorques(double torque1,
double torque2)
Applies torque1 about the universal's axis 1, torque2 about the universal's axis 2. |
void |
getAnchor(DVector3 result)
Get the joint anchor point, in world coordinates. |
void |
getAnchor2(DVector3 result)
Get the joint anchor point, in world coordinates. |
double |
getAngle1()
Get angle between body the 1 and the axis 1. |
double |
getAngle1Rate()
Get time derivative of angle. |
double |
getAngle2()
Get angle between body the 2 and the axis 2. |
double |
getAngle2Rate()
Get time derivative of angle. |
void |
getAxis1(DVector3 result)
Get axis. |
void |
getAxis2(DVector3 result)
Get axis. |
double |
getParam(DJoint.PARAM_N parameter)
Get joint parameter. |
void |
setAnchor(double x,
double y,
double z)
Set anchor. |
void |
setAnchor(DVector3C a)
Set anchor. |
void |
setAxis1(double x,
double y,
double z)
Set axis. |
void |
setAxis1(DVector3C a)
Set axis. |
void |
setAxis1Offset(double x,
double y,
double z,
double offset1,
double offset2)
Set the Universal axis1 as if the 2 bodies were already at offset1 and offset2 appart with respect to axis1 and axis2. |
void |
setAxis2(double x,
double y,
double z)
Set axis. |
void |
setAxis2(DVector3C a)
Set axis. |
void |
setAxis2Offset(double x,
double y,
double z,
double offset1,
double offset2)
Set the Universal axis2 as if the 2 bodies were already at offset1 and offset2 appart with respect to axis1 and axis2. |
void |
setParam(DJoint.PARAM_N parameter,
double value)
Set joint parameter. |
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 setAxis1(double x, double y, double z)
void setAxis1(DVector3C a)
void setAxis2(double x, double y, double z)
void setAxis2(DVector3C a)
void getAnchor(DVector3 result)
void getAnchor2(DVector3 result)
void getAxis1(DVector3 result)
void getAxis2(DVector3 result)
double getAngle1()
double getAngle2()
double getAngle1Rate()
double getAngle2Rate()
void addTorques(double torque1, double torque2)
void setAxis1Offset(double x, double y, double z, double offset1, double offset2)
This function initialize the axis1 and the relative orientation of each body as if body1 was rotated around the new axis1 by the offset1 value and as if body2 was rotated around the axis2 by offset2.
Ex:
dJointSetHuniversalAxis1(jId, 1, 0, 0);
// If you request the position you will have: dJointGetUniversalAngle1(jId) == 0
// If you request the position you will have: dJointGetUniversalAngle2(jId) == 0
dJointSetHuniversalAxis1Offset(jId, 1, 0, 0, 0.2, 0.17);
// If you request the position you will have: dJointGetUniversalAngle1(jId) == 0.2
// If you request the position you will have: dJointGetUniversalAngle2(jId) == 0.17
x
- The X component of the axis in world framey
- The Y component of the axis in world framez
- The Z component of the axis in world frameoffset1
- The angle for the offset of the relative orientation.
As if body1 was rotated by angle when the Axis was set (see below).
The rotation is around the new Hinge axis.offset2
- void setAxis2Offset(double x, double y, double z, double offset1, double offset2)
This function initialize the axis2 and the relative orientation of each body as if body1 was rotated around the axis1 by the offset1 value and as if body2 was rotated around the new axis2 by offset2.
Ex:
dJointSetHuniversalAxis2(jId, 0, 1, 0);
// If you request the position you will have: dJointGetUniversalAngle1(jId) == 0
// If you request the position you will have: dJointGetUniversalAngle2(jId) == 0
dJointSetHuniversalAxis2Offset(jId, 0, 1, 0, 0.2, 0.17);
// If you request the position you will have: dJointGetUniversalAngle1(jId) == 0.2
// If you request the position you will have: dJointGetUniversalAngle2(jId) == 0.17
x
- The X component of the axis in world framey
- The Y component of the axis in world framez
- The Z component of the axis in world frameoffset1
- The angle for the offset of the relative orientation.
As if body1 was rotated by angle when the Axis was set (see below).
The rotation is around the new Hinge axis.offset2
- 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 |