[ODE] using ODE with OpenGL

Husain Sheikh howbizarre79 at hotmail.com
Fri Feb 6 11:04:16 MST 2004


Here is how I use that Matrix in OpenGL

void SetBodyOrientation(dBodyID Body){
    const dReal* Position1 = dBodyGetPosition(Body);
    const dReal * Rotation1 = dBodyGetRotation(Body);

    GLfloat matrix[16];
    matrix[0]=Rotation1[0];
    matrix[1]=Rotation1[4];
    matrix[2]=Rotation1[8];
    matrix[3]=0;
    matrix[4]=Rotation1[1];
    matrix[5]=Rotation1[5];
    matrix[6]=Rotation1[9];
    matrix[7]=0;
    matrix[8]=Rotation1[2];
    matrix[9]=Rotation1[6];
    matrix[10]=Rotation1[10];
    matrix[11]=0;
    matrix[12]=Position1[0];
    matrix[13]=Position1[1];
    matrix[14]=Position1[2];
    matrix[15]=1;
    glMultMatrixf (matrix);
}

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus



More information about the ODE mailing list