Hi everybody…
Here is my problem…
I have a cone in my 3d space pointing to Z positive axix.
I want to rotate it like that:
first i want to rotate 270 degrees around X axe.
Second I want to rotate 90 degrees around Y axe but using the original Y axe not the new axe resulting from the first rotation.
Ive tried next:
GlRotatef( figura->alfa() , 1.0 , 0.0 , 0.0 );
glRotatef( figura->beta() , 0.0 , 1.0 , 0.0 );
glRotatef( figura->gamma() , 0.0 , 0.0 , 1.0 );
but i get the problem with the Y axe rotated so I tried with basic Matrix:
GLfloat maux[] = { cycz , sxsycz-cxsz , cxsycz+sxsz , 0 ,
cysz , sxsysz+cxcz , cxsysz-sxcz , 0 ,
-sy , sxcy , cxcy , 0 ,
0 , 0 , 0 , 1 };
where cx,cy,cz are the cos() of x,y,z respectively and sx,sy,sz are the sin(). And Again I get the same problem…
What can I do to fix that?
Thkx
gluCylinder( obj , figura->_radio() , 0 , altura , 20 , 20 );
gluDisk( obj , 0 , figura->_radio() , 20 , 5 );