Sign in to follow this  
As-12

Little confusing in Transformation and Cull Face.

Recommended Posts

As-12    142
In the red book it says that when we translate and rotate but I dont know how to describe result in english because Im not good in english very much. So if U got The red book look at Charpter 3 Figure 3-4 "think about transformation". The picture shows that if we rotate and translate the result will be like the picture on the left. And if we translate and rotate the result will be like right hand side picture . But when I tried do it the result comes opposite. Like I did translate abd rotate and the result is the same as left hand side picture but rotate and translate the result is the same as right. So it makes me confuse. Another Question. What GL Cullface does. 1st Time I think that if we look at the front surface and system will automatic hide back surface if we set GL_BACK but if we look in back of surface the front surface will automatic hide or not rendered.But I tried create a plane and make it rotate in y axis with glCullface(GL_BACK); when it rotating the 1st face is appear but another isn't. So what's the difference about glPolygonMode() & glCullface. ? Last one . Is there any more simple way to calculate the surface that its front or back surface I saw the formula .And it very confuse because Im in Grade 8. And If I cant compute it. It will be a big problem when calculate Normal because we need cross product right. And cross product A X B =/= B X A. So it should be another problem.

Share this post


Link to post
Share on other sites
jyk    2094
Quote:
Original post by As-12
In the red book it says that when we translate and rotate but I dont know how to describe result in english because Im not good in english very much. So if U got The red book look at Charpter 3 Figure 3-4 "think about transformation". The picture shows that if we rotate and translate the result will be like the picture on the left. And if we translate and rotate the result will be like right hand side picture . But when I tried do it the result comes opposite. Like I did translate abd rotate and the result is the same as left hand side picture but rotate and translate the result is the same as right. So it makes me confuse.
I'm going to guess that you're issuing the commands in the wrong order. In OpenGL, the sequence:
glTranslatef(...);
glRotatef(...);
Actually rotates first and translates second, and vice versa. So make sure you're issuing the commands in the right order, and then compare the behavior to the Red Book examples; I'll bet it will match up.

Share this post


Link to post
Share on other sites
As-12    142
Thats weird I translate and rotate but the result works properly but when I tried rotate and translate the result pretty dizzy. Im using Dev-Cpp by the way.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this