help with camera

taribo

26-07-2006 14:00:52

I need a toolbar with the values of the position of the camera the point of view, farplane and nearplane value when i'm browsing my world with a free camera moved by keyboards keys. can anyone help me? how can i do it?
thank you

Istari

26-07-2006 14:11:06

Try using an Overlay and a FrameListener. Have a look at the Ogre manual and SampleFramework.py to see how it's done.

taribo

27-07-2006 00:43:30

hi again, new problem:
i've to get some float from a textual file ( it's a textual file exported from maya for a proprietary 3d engine) the values of the first 3 lines are about the cameras. can someone look at this lines and tell me what means?
position of the camera, lookat, near plane, far plane etc etc...

CAMERA camera_1 -1.0 6.725780372e-017 1.023376522e-016 0.0 1.224606354e-016 0.5492197841 0.8356779456 0.0 -1.232595164e-032 0.8356779456 -0.5492197841 0.0 0.08516539685 0.8938062806 -12.77812866 1.0 37.85
CAMERA camera_2 -1.0 2.71917234e-032 1.224606354e-016 0.0 1.224606354e-016 2.220446049e-016 1.0 0.0 -2.539820114e-033 1.0 -2.220446049e-016 0.0 0.08516539685 2.738573204e-015 -14.84778873 1.0 37.85
CAMERA camera_3 -0.7071067812 0.5267443369 -0.4717418824 0.0 1.665334537e-016 0.667143768 0.7449289851 0.0 0.7071067812 0.5267443369 -0.4717418824 0.0 -8.681944053e-014 0.7996193057 -12.66216741 1.0 37.85


thank you very much for help

taribo

27-07-2006 19:10:03

this is the D3DXMATRIX matrix, i'd found that the matrix is this:

right up look
x -1.0 6.725780372e-017 1.023376522e-016 0.0
y 1.224606354e-016 0.549219784 10.8356779456 0.0
z -1.232595164e-032 0.8356779456 -0.5492197841 0.0
-pos 0.08516539685 0.8938062806 -12.77812866 1.0
fov 37.85

the camera1 position would be: x -0.08516539685, y 12.77812866, z -0.8938062806
the look at: x 1.023376522e-016, y 0.8356779456, z -0.5492197841

the up vector: x= 6.725780372e-017, y=0.549219784, z=0.8356779456
how can i calculate the roll to rotate the camera in the correct way?