Re: Rotations
Re: Rotations
- Subject: Re: Rotations
- From: Lorenzo <email@hidden>
- Date: Sun, 19 Sep 2004 12:09:42 +0200
No sorry,
this didn't solve the problem. The object still rotates on the original "X"
axis. Instead since I firstly rotated the "Y" axis, now rotating by an "X"
angle, should rotate the object on its own current local "X" axis. And this
doesn't happen. How to fix this? Any other idea?
Best Regards
--
Lorenzo
email: email@hidden
> From: email@hidden
> Date: Sat, 18 Sep 2004 13:55:32 -0400 (EDT)
> To: email@hidden, email@hidden
> Subject: Re: Rotations
>
> Hmmmmm.........
>
>
> glRotatef(45, 0,1,0);
> glTranslatef(-1,0,0);
> glTranslatef(1,0,0);
> glBegin(/*******/);
> .
> .
> glEnd();
>
> this ***might*** work.
>
> In a message dated 9/18/04 7:22:03 AM, email@hidden writes:
>
>> Hi,
>> I would like to rotate an object on "its own" local axes.
>> If I rotate it on a single axis, it's ok.
>> But if I rotate it on 2 axes, let's say firstly on the "y" then on the
>> "x"
>> axes, the object doesn't rotate properly on the axis "x". The rotation
>> on
>> the "x" axis happens like the "x" axes is still on its original position.
>> Isntead the x axis should be rotated by the y rotation.
>> So the object is not horizontal anymore. And this is wrong.
>> How can I fix this problem?
>>
>> Currently I do:
>> ---------------
>> glLoadIdentity();
>> glRotatef(xrot, 1.0f, 0.0f, 0.0f);
>> glRotatef(yrot, 0.0f, 1.0f, 0.0f);
>> glRotatef(zrot, 0.0f, 0.0f, 1.0f);
>
> Or you can do VERY hard math stuff and get the same result.
>
>
>
>
>
>
> BinarySpike
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden