[ODE] Question about ODE joint class design.

Remi Ricard remi.ricard at simlog.com
Tue Sep 4 05:32:39 MST 2007


Hi Jeremy,
> Hello fellow ODE users,
>  
>      I have a question about ODE joint class design.  I am needing to 
> implement 3 ODE classes, one for the Ball/Socket joint, one for the 
> Slider joint, and one for the AMotorJoint.  These classes need 
> to contain all applicable information that pertains to instances of 
> the joints, i.e, a data member for any and ALL possible aspects or 
> traits of the joint.
>      My problem is is that in the documentation it says:
> " If a particular parameter is not implemented by a given joint, 
> setting it will have no effect. ".  I need to know what params are 
> applicable to which joints EXACTLY. 
>      For example, my priliminary version of the Ball/Socket joint 
> contains:
> {
>      Vector  vAnchor;
>      INT       iParamLoStop;
>      INT       iParamHiStop;
>      FLOAT fBounce;
>      FLOAT CFM;
>      FLOAT ERP;
> }
> My priliminary version of the Slider joint contains:
> {
>      Vector  vAxis;
>      INT       iParamLoStop;
>      INT       iParamHiStop;
>      FLOAT fBounce;
>      FLOAT CFM;
>      FLOAT ERP;
> }   
>  
> My priliminary version of the AMotor joint contains:
> {
>      INT iMode;
>      INT iNumAxes;
>      FLOAT fVel;
>      FLOAT fFMax;
>      FLOAT fFudgeFactor;
>      FLOAT fCFM;   
>      FLOAT fStopCFM;     
>  
>      //For axis 1
>      INT iRel1;
>      Vector vRelVec1;
>      INT       iParamLoStop1;
>      INT       iParamHiStop1;
>      FLOAT fBounce1;    
>      FLOAT fERP1;
>  
>      //For axis 2
>      INT iRel2;
>      Vector vRelVec2;
>      INT       iParamLoStop2;
>      INT       iParamHiStop2;
>      FLOAT fBounce2;    
>      FLOAT fERP2;
>  
>      //For axis 3
>      INT iRel3;
>      Vector vRelVec3;
>      INT       iParamLoStop3;
>      INT       iParamHiStop3;
>      FLOAT fBounce3;
>      FLOAT fERP3;
> }
>  
>      I need to know if there are any data members listed above that do 
> not pertain to the joint as well as if any data members are missing.

For the slider joint you are missing the offset.
You can look in joint.h to find all the "member variables".

Remi


More information about the ODE mailing list