27/2/07, pm-n.
Week: 9 ( 26/2 - 2/3 )
Lectures:
- OpenGL in the Panorama - from 'glut' to 'VR Juggler'.
Exercises:
How to operate the Panorama.
It takes place in the Panorama ( CAVI ) as follows:
Project group: 1 - 3, Wednesday, 12:00 - 12:30
- 4 - 6, - 12:30 - 13:00
- 7 - 9, - 13:00 - 13:30
- 10 - 12, - 13:30 - 14:00
- 13 - 15, - 14:00 - 14:30
- 16 - 18, - 14:30 - 15:00
- 19 - 21, Thursday, 12:00 - 12:30
- 22 - 24 - 12:30 - 13:00
Spare - 13:00 - 14:00
Project group numbers have been added to the list of
participants.
Example programs:
The directory /users/pmn/public/cgf07/week9 contains
programs from preceding weeks. They have been modified
to fit on top of the platform 'VR Juggler' ( rather than 'glut' ).
The programs are:
- main_surfaceG ( from week7 )
- main_texture ( from week8 )
- main_texture_alpha ( from week8 )
- main_texture_2 ( from week8 )
Compilation:
In order to produce an executable, which will run on the work stations
( in Stibitz ) as well as in the Panorama, the compilation must
take place on either 'beretta' or 'goldberry', e.g.:
ssh beretta
< enter DAIMI password >
cd < dir. with example programs >
./MAKE main_surfaceG
Execution:
./RUN_main_surfaceG
The execution must take place on the work station at which
you are sitting ( in Stibitz ) or 'kylle' ( in the Panorama ).
Only compilation must take place on 'beretta' or 'goldberry'.
The execution is terminated by pressing 'Esc'.
New classes:
- environment, environment::get_cluster()
returns 0 if running on a
work station, 1 if running in the panorama.
- wand, wand::getWandMatrix( m ) returns
the 4x4 transformation matrix
from the wand or mouse in the vector float m[16]. The matrix elements
are stored
in the vector in the sequence: m11, m21, m31, m41, m12, m22, m32, m42,
m13, m23, m33, m43, m14, m24, m34, m44. The matrix contains the position
of the mouse if running on a work station, or the position and
orientation of the wand if running in the panorama.
When running on a work station, the matrix will only change when
the mouse is moved while either 'Ctrl' or 'Alt' is pressed.
- buttons, The methods buttons::button0, ... ,
buttons::button3
returns 1 if the button
is pinched, 0 otherwise.
buttons::button0, the left button on the mouse
or the yellow button on the wand.
buttons::button1, the red button on the wand.
buttons::button2, the right button on the mouse
or the green button on the wand.
buttons::button3, the blue button on the wand.
- keyboard, keyBoard::getKey() returns a value
KEY__F1, ... ( compile
time constants defined in keyBoard.h ) if the corresponding key is
currently pressed. Otherwise the value NO_KEY is returned.
keyBoard::getKey_singleShot(), is similar to getKey, but it operates in
'single shot mode'. It means, that a key value different from NO_KEY is
returned only after the key has been released and then pressed again.
Exercises:
- Compare the examples in week9 with the corresponding programs
from preceding weeks, and notice the differences. Then make similar
changes to your project.
- Measure the translation returned by getWandMatrix for a set of
positions of the wand and the mouse.