org.ode4j.ode
Interface DPUJoint

All Superinterfaces:
DJoint

public interface DPUJoint
extends DJoint


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 getAnchor(DVector3 result)
          Get the joint anchor point, in world coordinates.
 double getAngle1()
          Get angle between the body1 and the axis 1.
 double getAngle1Rate()
          Get time derivative of angle1.
 double getAngle2()
          Get angle between the body2 and the axis 2.
 double getAngle2Rate()
          Get time derivative of angle2.
 void getAxis1(DVector3 result)
          Get the first axis of the universal component of the joint.
 void getAxis2(DVector3 result)
          Get the second axis of the Universal component of the joint.
 void getAxis3(DVector3 result)
          Get the prismatic axis.
 void getAxisP(DVector3 result)
          Get the prismatic axis.
 double getParam(DJoint.PARAM_N parameter)
          Get joint parameter.
 double getPosition()
          Get the PU linear position (i.e.
 double getPositionRate()
          Get the PR linear position's time derivative.
 void setAnchor(double x, double y, double z)
          Set anchor.
 void setAnchor(DVector3C a)
          Set anchor.
 void setAnchorOffset(double x, double y, double z, double dx, double dy, double dz)
          Set the PU anchor as if the 2 bodies were already at [dx, dy, dz] apart.
 void setAxis1(double x, double y, double z)
          Set the axis for the first axis or the universal articulation.
 void setAxis1(DVector3C a)
          Set the axis for the first axis or the universal articulation.
 void setAxis2(double x, double y, double z)
          Set the axis for the second axis or the universal articulation.
 void setAxis2(DVector3C a)
          Set the axis for the second axis or the universal articulation.
 void setAxis3(double x, double y, double z)
          Set the axis for the prismatic articulation.
 void setAxis3(DVector3C a)
          Set the axis for the prismatic articulation.
 void setAxisP(double x, double y, double z)
          Set the axis for the prismatic articulation.
 void setAxisP(DVector3C a)
          Set the axis for the prismatic articulation.
 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

setAnchor

void setAnchor(double x,
               double y,
               double z)
Set anchor.


setAnchor

void setAnchor(DVector3C a)
Set anchor.


setAxis1

void setAxis1(double x,
              double y,
              double z)
Set the axis for the first axis or the universal articulation.


setAxis1

void setAxis1(DVector3C a)
Set the axis for the first axis or the universal articulation.


setAxis2

void setAxis2(double x,
              double y,
              double z)
Set the axis for the second axis or the universal articulation.


setAxis2

void setAxis2(DVector3C a)
Set the axis for the second axis or the universal articulation.


setAxis3

void setAxis3(double x,
              double y,
              double z)
Set the axis for the prismatic articulation.


setAxis3

void setAxis3(DVector3C a)
Set the axis for the prismatic articulation.


setAxisP

void setAxisP(double x,
              double y,
              double z)
Set the axis for the prismatic articulation.

Note:
This function was added for convenience it is the same as dJointSetPUAxis3

setAxisP

void setAxisP(DVector3C a)
Set the axis for the prismatic articulation.

Note:
This function was added for convenience it is the same as dJointSetPUAxis3

getAnchor

void getAnchor(DVector3 result)
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.


getAxis1

void getAxis1(DVector3 result)
Get the first axis of the universal component of the joint.


getAxis2

void getAxis2(DVector3 result)
Get the second axis of the Universal component of the joint.


getAxis3

void getAxis3(DVector3 result)
Get the prismatic axis.


getAxisP

void getAxisP(DVector3 result)
Get the prismatic axis.

Note:
This function was added for convenience it is the same as dJointGetPUAxis3

getAngle1

double getAngle1()
Get angle between the body1 and the axis 1.


getAngle1Rate

double getAngle1Rate()
Get time derivative of angle1.


getAngle2

double getAngle2()
Get angle between the body2 and the axis 2.


getAngle2Rate

double getAngle2Rate()
Get time derivative of angle2.


getPosition

double getPosition()
Get the PU 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)]


getPositionRate

double getPositionRate()
Get the PR linear position's time derivative.


setAnchorOffset

void setAnchorOffset(double x,
                     double y,
                     double z,
                     double dx,
                     double dy,
                     double dz)
Set the PU anchor as if the 2 bodies were already at [dx, dy, dz] apart.

Parameters:
x - The X position of the anchor point in world frame
y - The Y position of the anchor point in world frame
z - The Z position of the anchor point in world frame
dx - A delta to be subtracted to the X position as if the anchor was set when body1 was at current_position[X] - dx
dy - A delta to be subtracted to the Y position as if the anchor was set when body1 was at current_position[Y] - dy
dz - A delta to be subtracted to the Z position as if the anchor was set when body1 was at current_position[Z] - dz

setParam

void setParam(DJoint.PARAM_N parameter,
              double value)
Set joint parameter.

Specified by:
setParam in interface DJoint
Note:
parameterX where X equal 2 refer to parameter for second axis of the universal articulation, parameterX where X equal 3 refer to parameter for prismatic articulation

getParam

double getParam(DJoint.PARAM_N parameter)
Get joint parameter.

Specified by:
getParam in interface DJoint