[ODE] rotation matrix
pia dalusong
ps_yumemi at yahoo.com
Mon Nov 4 00:31:02 2002
hello,
first of all thanks for replying. i tried to pass the
values to the dMatrix3 the same way in the
setTransform function in the drawstuff.cpp file.
unfortunately, my mobot is heading towards the
opposite direction now. what i did was this :
const dReal *mobot_pos;
const dReal *mobot_rot;
mobot_rot = dBodyGetRotation (mobot.chassis.body);
mobot_pos = dBodyGetPosition (mobot.chassis.body);
mobotdata.rota[0]=mobot_rot[0];
mobotdata.rota[1]=mobot_rot[4];
mobotdata.rota[2]=mobot_rot[8];
mobotdata.rota[3]=0;
mobotdata.rota[4]=mobot_rot[1];
mobotdata.rota[5]=mobot_rot[5];
mobotdata.rota[6]=mobot_rot[9];
mobotdata.rota[7]=0;
mobotdata.rota[8]=mobot_rot[2];
mobotdata.rota[9]=mobot_rot[6];
mobotdata.rota[10]=mobot_rot[10];
mobotdata.rota[11]=0;
i also tried this
mobotdata.rota[0]=mobot_rot[0];
mobotdata.rota[1]=mobot_rot[1];
mobotdata.rota[2]=mobot_rot[2];
mobotdata.rota[3]=mobot_rot[3];
mobotdata.rota[4]=mobot_rot[4];
mobotdata.rota[5]=mobot_rot[5];
mobotdata.rota[6]=mobot_rot[6];
mobotdata.rota[7]=mobot_rot[7];
mobotdata.rota[8]=mobot_rot[8];
mobotdata.rota[9]=mobot_rot[9];
mobotdata.rota[10]=mobot_rot[10];
mobotdata.rota[11]=mobot_rot[11];
__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/