Sunday, July 29, 2007
Wednesday, July 18, 2007
Tuesday, July 10, 2007
Week 13: Camera & Picking
How it is done
[Zooming]
- Change the value from the fov in gluPerspective(fov, ratio, .....). This happens in our
defined function called setPerspectiveView(). This function is called in the normal
keyboard function.
[Picking]
- Copy the necessary variables and functions from "picking project", and paste them
in our main project (space simulation).
- Create a boolean global variable called start.
- Check if there is a hit/screen being clicked, thus *ptr has value/name.
- If *ptr is 0 or 1(name of our spaceships), then set 'start' to true, thus rotates the
spaceships. If click on them again, 'start' is set to false, thus spaceships stop rotating.
Completed: Qn 2 & 3
Download
[Zooming]
- Change the value from the fov in gluPerspective(fov, ratio, .....). This happens in our
defined function called setPerspectiveView(). This function is called in the normal
keyboard function.
[Picking]
- Copy the necessary variables and functions from "picking project", and paste them
in our main project (space simulation).
- Create a boolean global variable called start.
- Check if there is a hit/screen being clicked, thus *ptr has value/name.
- If *ptr is 0 or 1(name of our spaceships), then set 'start' to true, thus rotates the
spaceships. If click on them again, 'start' is set to false, thus spaceships stop rotating.
Completed: Qn 2 & 3
Download
Subscribe to:
Comments (Atom)