Basic Concept Questions
Forgive me if this has bee nasked multiple times but I want to check if I''m understanding some stuff right:
Whenever a quad, triangle or other shape is drawn, the vertices (using glVertext3f )are specified in relation to the origin
glTranslatef moves the origin with relation to where it currently is.
glRotatef rotates the axes wherever the origin happens to be.
glLoadIdentity puts the origin on the surface of the screen in the middle, ie the screen itself is z = 0 and the center of screen is the origin.
Thanks.
December 31, 2000 02:02 AM
Pretty much I think.
you''ve gotta be careful about the order you do rotations and translations in, depending on what you want to rotate/move (object or worldspace)
and you also have to be careful about which matrix you''re transforming (modelview or projection)
Hope this helps
Happy New Year!
Khrob
you''ve gotta be careful about the order you do rotations and translations in, depending on what you want to rotate/move (object or worldspace)
and you also have to be careful about which matrix you''re transforming (modelview or projection)
Hope this helps
Happy New Year!
Khrob
no, completely wrong....
just kidding... posting here instead of lionhead now I see....
just kidding... posting here instead of lionhead now I see....
Thanks Khrob.
lucid I still read some of the lionhead threads but I like to spread out my newbieness so people don''t get as annoyed. Do you go by the same name there?
lucid I still read some of the lionhead threads but I like to spread out my newbieness so people don''t get as annoyed. Do you go by the same name there?
lucid - havent posted.. hell, havent even _been_ to lionhead in weeks!
eNo - no worries! I spent ages at least twice getting my camera movement routines to work... (second time I was being very silly in my radians to degrees conversion, but not having the transforms in the right order didn''t help!)
HAPPY NEW YEAR!!!
well, it is here in perth!
eNo - no worries! I spent ages at least twice getting my camera movement routines to work... (second time I was being very silly in my radians to degrees conversion, but not having the transforms in the right order didn''t help!)
HAPPY NEW YEAR!!!
well, it is here in perth!
_________________________________I used to be indecisive. Now I'm not so sure...
I''m with you on the newbieness thing!! I like to give the lionhead, this one, opengl (beginners and advanced) a little of my ignorance each, rather than all of it to one!
_________________________________I used to be indecisive. Now I'm not so sure...
Ok, to try to explain the transform stack without adding to much confusion....
1) The last transform (translation, rotation, scaling) is applyed to the vertex first.
2) the "camera" aka the origin never movies in the GL_MODLEVIEW matrix.
3) "camera" transform are always applied to the modleview matrix inverted. i.e. glTranslated(-camx,-camy,-camz);
anotherwords if you did the following...
glTranslated(0.0,2.0,0.5);
glRotated(0.0,45.0,0);
glVertex(....)
Then the vertex in question would be rotated 45 degrees around the y axis then moved 2 units along the y and 0.5 units along the z axis.
Hope this dosnt confuse you too much! Any questions ask!
1) The last transform (translation, rotation, scaling) is applyed to the vertex first.
2) the "camera" aka the origin never movies in the GL_MODLEVIEW matrix.
3) "camera" transform are always applied to the modleview matrix inverted. i.e. glTranslated(-camx,-camy,-camz);
anotherwords if you did the following...
glTranslated(0.0,2.0,0.5);
glRotated(0.0,45.0,0);
glVertex(....)
Then the vertex in question would be rotated 45 degrees around the y axis then moved 2 units along the y and 0.5 units along the z axis.
Hope this dosnt confuse you too much! Any questions ask!
------------------------------Piggies, I need more piggies![pig][pig][pig][pig][pig][pig]------------------------------Do not invoke the wrath of the Irken elite. [flaming]
Glad someone around here can give a useful answer
Good one avianRR!
Good one avianRR!
_________________________________I used to be indecisive. Now I'm not so sure...
I try!
l8r,
Rob
http://tannara.2y.net/
l8r,
Rob
http://tannara.2y.net/
------------------------------Piggies, I need more piggies![pig][pig][pig][pig][pig][pig]------------------------------Do not invoke the wrath of the Irken elite. [flaming]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement