how big is 1 unit?
gluPerspective(45.0f,(GLfloat)width/(GLfloat)height,0.1f,100.0f);
at that perspective (which seems to be common) what does 1 unit relate to? (when doing translations and such) i cant for the life of me figrue it out!
You can''t figure it out because there''s nothing to figure out. It''s an arbitrary unit. Typically FPS will choose 1 unit = 1 meter, flight simulators might choose 1 unit = 1 km, or you can choose anything else.
Y.
Y.
mostly what i meant was what does it relate to screen wise so i can figure out distances mathematically instead of trial and error, but i guess it doesnt really matter when its 3d...
Well thats the thing about perspective, it's all related to the fov.
So if you have a fov of 90 as you have it, a object one unit wide and one unit away should take up the whole screen.
Thus it dosn't really matter if the object is one meter wide and one meter away, or 100 km wide and 100km away.
When doing this in 3d it dosn't matter how large unit's are, just that you use the same unit for everything.
Using 1 unit=1 meter is definitly a good way of doing things.
[edited by - lc_overlord on July 23, 2003 4:07:16 PM]
So if you have a fov of 90 as you have it, a object one unit wide and one unit away should take up the whole screen.
Thus it dosn't really matter if the object is one meter wide and one meter away, or 100 km wide and 100km away.
When doing this in 3d it dosn't matter how large unit's are, just that you use the same unit for everything.
Using 1 unit=1 meter is definitly a good way of doing things.
[edited by - lc_overlord on July 23, 2003 4:07:16 PM]
www.flashbang.se | www.thegeekstate.com | nehe.gamedev.net | glAux fix for lesson 6 | [twitter]thegeekstate[/twitter]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement