[ODE] dBodySetRotation problems
adastra@inorbit.com
adastra at inorbit.com
Fri Mar 31 08:47:19 MST 2006
Hi,
I am so confused on this I'm not sure if my question will make much
sense, my apologies if not.
I am trying to set my body/geom rotation. I am using trimesh geoms and I
have already set the geom with the body.
Here is a bit of my code:
void CPhysioView::RotateIndex(double rotation2)
{
aIndexp->RotateY(-rotation2);//rotates the VTK object
//rotatez turns the object along the y axis
//rotatey rotates the object along the x axis
//rotatex rotates the object along the z axis
this->ren->Render();//re-renders the screen, to show rotation
vtkMatrix4x4 *rotatematrix2 = aIndexp->GetMatrix();//getting the
rotation of the VTK actor in question and placing it in a matrix
double matrixEle2[12];//declaring another matrix
for(int v=0;v<4;v++){//4 rows
for(int w=0;w<3;w++){//3 columns
matrixEle2[v*3+w] = rotatematrix2->GetElement(v,w);//placing the
position figures from rotatematrix2 into the correct cell of matrixEle2
}
}
//dBodySetPosition(obj[3].body,-0.125,-0.19,-0.715);
//dBodySetPosition(obj[4].body,-0.125,-0.195,-0.95);
//dBodySetPosition(obj[5].body,-0.125,-0.2,-1.15);
dBodySetRotation(obj[3].body, matrixEle2);
}
Can you see any mistakes that I have made? I can't see where I have made
any mistakes.
Thanks
Jemma
--
___________________________________________________
Play 100s of games for FREE! http://games.mail.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://q12.org/pipermail/ode/attachments/20060331/41273bf2/attachment.htm
More information about the ODE
mailing list