glLookAt vs. glTranslatef
i have been using glTranslatef to do all my object transformations, rotations etc etc. is there anyone that exclusively uses the camera to move about the scene? i would think it would be easier to manipulate the camera instead of translating , rotating. can anyone give me your thoughts? thanks!
heh
I have my quaternion camera that you can have if you want it. It uses my math library though, so it might be a little bit tricky to set up in your program. Though if you *really* wanted me to, I could put it in a library file...
Basically you can set the position of the camera, yaw, and pitch. I'm still working on the LookAt, Track (follow an object while remaining stationary or moving) and Follow (think 3rd person camera) portions of it.
If you'd like it, let me know. I don't claim it's efficient or even very well coded, but it works and can easily be optimized if neceessary.
Basically you can set the position of the camera, yaw, and pitch. I'm still working on the LookAt, Track (follow an object while remaining stationary or moving) and Follow (think 3rd person camera) portions of it.
If you'd like it, let me know. I don't claim it's efficient or even very well coded, but it works and can easily be optimized if neceessary.
I do real things with imaginary numbers
I use gluLookAt with my camera class.
______________________________________________________________________________________With the flesh of a cow.
why did you choose gluLookat over translate wannabe? thats what i was wanting to know -- why choose one over the other. i realize that it might just be personal preference but if for antoher reason i just was wondering.
heh
With gluLookAt you can define the upvector. You might be able to do that some other way but I am a n00b who doesnt know how to do that.
______________________________________________________________________________________With the flesh of a cow.
gluLookAt maybe a little faster because it does it in one function call, but in the end it has the same result as by using the translate/rotate functions. I personally find gluLookAt easier to use, but it is a matter of preference.
oops I just realized how to define the up vector. So I guess its just personal preference.
______________________________________________________________________________________With the flesh of a cow.
I find making a camera class with gluLookAt is simpler and mroe effective.
ive been wondering about this as well. I can see how the 1 function call might be faster then 2...
can anyone spare an example of their gluLookAt camera class so that I might get an idea? Thx
can anyone spare an example of their gluLookAt camera class so that I might get an idea? Thx
C_C(Enter witty/insightful/profound remark here...)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement