![]() |
|
#1
|
|||
|
|||
Opengl camera problemHello everyone,
I had built my camera by only using the position of the camera and its reference point where they are the parameters of opengl function : CPP / C++ / C Code:
and I have my view domain represented by the position of the camera as the top of the pyramid and it far plane defined by four points, so my reshape function is : CPP / C++ / C Code:
so, the following function : CPP / C++ / C Code:
define my view frustum and I have computed the four points of the far plane. and by key board function : CPP / C++ / C Code:
I used this function: CPP / C++ / C Code:
which rotates the aforesaid initial points with respect to to the detected array m[16] and to move the camera poistion and reference point respectively rotate the reference point using the same m[16] and use the result poit in glLookAt() in display function. So, I thought I will get the correct movement of my camera but actually it doesn't. If you have some ideas or you may see some mistakes in my initializations, I will be appreciate any suggestions Sheree |
|
#2
|
|||
|
|||
Re: Opengl camera problemAlright, I think my problem is that I don't move my camera position respectively, but now could any one tell me how can I compute the correct new position of my camera
|
|
#3
|
|||
|
|||
Re: Opengl camera problemOkay gys,
I don't know, weather my question is difficult to answer or just naive :-( well, simply I need to know how can I control the movement of the camera in my scenery and every time get new camera view with the possibility to get an appropriate view size of my scene. Actually, I have looked at some examples for a similar thing and I have found this tutorial : www.lighthouse3d.com which simply contain explanation on how to deal with LookAt function, but it still simple example, and I want a more complicate example of dealing with LookAt function along with compatible view size and camera free motion. So, again if you have any suggestions or may be other tutorial that could be more interest. Thanks |
Recent GIDBlog
Writing a book by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with udating a function in opengl | sheree | OpenGL Programming | 1 | 25-Jun-2008 12:33 |
| Help!!! A Problem with Camera Resolution | Melvin Lin | C++ Forum | 8 | 18-Jun-2004 22:36 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The