[sldev] How does the camera mechanism work
Tobias Lang
tlang303 at gmail.com
Thu Mar 22 14:01:17 PDT 2007
Hi,
I like to control the viewer camera (in mouse look mode) from an
external source, lets say an intertial tracker. I studied the code, but
I am still not sure how the whole camera system works.
In my understanding, the LLAgent (thats me) has a LLViewerCamera which
in the end has a LLCoordFrame. In the LLCoordFrame, the orientation and
translation is stored. So any change to the camera must finally change
this coordinateframe (?)
But the difficult part is to find out where the transformations are set...
Looking at the code, I see methods like updateCamera() in LLAgent,
updateCameraLocation(..) in LLViewerCamera, setOriginAndLookAt() etc.
There are also many calls like setLookAt() or setLookDir(). (What is the
difference between these two?)
Can someone describe briefly, how all the camera mechanism works, please?
Thanks,
Tobias
More information about the SLDev
mailing list