Traditional Culture Encyclopedia - Photography and portraiture - What is the vector representation of the up direction of the camera in OpenGL? What happens if we change the vector in the up direction? Is the direction of the up vector arbitrary?
What is the vector representation of the up direction of the camera in OpenGL? What happens if we change the vector in the up direction? Is the direction of the up vector arbitrary?
up includes inwards
The first group of eyex, eyey, eyez camera positions in world coordinates
The second group of centerx, centery, centerz camera lens pairs The accurate position of the object in world coordinates
The third group of upx, upy, upz is the upward direction of the camera in world coordinates
There is this explanation on the Internet, I think it suits me , see if it suits you.
The first set of eyes is equivalent to the specific coordinates of your head in a three-dimensional coordinate.
The second group is the coordinates of the object your eyes want to see.
The third group is the direction of your head.
If you set upx=0;upz=0;upy=1, it means that your head is in the same direction as a normal person. If upy=-1, it means that you are upside down.
If upx=1;upz=0;upy=0; then it is equivalent to looking at the right side. If upy=-1, it is equivalent to looking at the left side.
If upx=0;upz=1;upy=0; it means that we are looking at the screen facing our direction (can’t remember whether the positive direction of the z-axis is facing in or out, if it is wrong Equivalent to this z is the opposite of what I said), if upz=-1, it means that we are looking in the direction of the screen.
You will understand the function glLookAt() after you try it more.
- Previous article:Where is the best place for go on road trip in Bazhong?
- Next article:This is how women with high emotional intelligence fall in love
- Related articles
- It can be a 2-pound fat man or a heartthrob. This is a real actress!
- How about Nokia camera 9?
- The hottest short sentences and photos on the whole network
- The picture taken by Pentax k-x in M file is very dark.
- What does vibrato short video make money from?
- The development history of MGM at United Artists
- How to divide the work of filming micro-movies? For example, dubbing, video processing, students playing around, about ten people.
- What about Shenzhen Jintailai Technology Co., Ltd.?
- Is it easy to pass the entrance examination in Zhejiang Province?
- Photographer Teddy