org.ode4j.ode
Interface DPRJoint

All Superinterfaces:
DJoint

public interface DPRJoint
extends DJoint

Prismatic and Rotoide. The axisP must be perpendicular to axis2

                                        +-------------+
                                        |      x      |
                                        +------------\+
 Prismatic articulation                   ..     ..
                       |                ..     ..
                      \/              ..      ..
 +--------------+    --|        __..      ..  anchor2
 |      x       | .....|.......(__)     ..
 +--------------+    --|         ^     <
        |----------------------->|
            Offset               |--- Rotoide articulation
 


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 addTorque(double torque)
          Applies the torque about the rotoide axis of the PR joint.
 void getAnchor(DVector3 result)
          Get the joint anchor point, in world coordinates.
 double getAngle()
          Get the PR angular position (i.e.
 double getAngleRate()
          Get the PR angular position's time derivative.
 void getAxis1(DVector3 result)
          Get the prismatic axis.
 void getAxis2(DVector3 result)
          Get the Rotoide axis.
 double getParam(DJoint.PARAM_N parameter)
          Get joint parameter.
 double getPosition()
          Get the PR 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 setAxis1(double x, double y, double z)
          Set the axis for the prismatic articulation.
 void setAxis1(DVector3C a)
          Set the axis for the prismatic articulation.
 void setAxis2(double x, double y, double z)
          Set the axis for the rotoide articulation.
 void setAxis2(DVector3C a)
          Set the axis for the rotoide articulation.
 void setParam(DJoint.PARAM_N parameter, double value)
          Set joint parameter.
 void setParamFMax2(double d)
           
 void setParamHiStop(double d)
           
 void setParamHiStop2(double d)
           
 void setParamLoStop(double d)
           
 void setParamLoStop2(double d)
           
 void setParamVel2(double d)
           
 
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 prismatic articulation.


setAxis1

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


setAxis2

void setAxis2(double x,
              double y,
              double z)
Set the axis for the rotoide articulation.


setAxis2

void setAxis2(DVector3C a)
Set the axis for the rotoide articulation.


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 prismatic axis.


getAxis2

void getAxis2(DVector3 result)
Get the Rotoide axis.


getPosition

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


getPositionRate

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


setParamLoStop

void setParamLoStop(double d)

setParamHiStop

void setParamHiStop(double d)

setParamLoStop2

void setParamLoStop2(double d)

setParamHiStop2

void setParamHiStop2(double d)

setParamVel2

void setParamVel2(double d)

setParamFMax2

void setParamFMax2(double d)

getAngle

double getAngle()
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.


getAngleRate

double getAngleRate()
Get the PR angular position's time derivative.


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 the rotoide articulation

getParam

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

Specified by:
getParam in interface DJoint

addTorque

void addTorque(double torque)
Applies the torque about the rotoide axis of the PR joint.

That is, it applies a torque with specified magnitude in the direction of the rotoide axis, to body 1, and with the same magnitude but in opposite direction to body 2. This function is just a wrapper for dBodyAddTorque()}