home
Exercise 2 Part I - Arcball User Interface

Submission date 11/12/05
This exercise can be submitted in pairs

Introduction:

In this exercise you will create an application to intuitively view 3D object. The program can rotate the object, change its position and zoom in and out. You will use OpenMesh to represent the 3D objects and to read them from disk (no parser to write in this exercise !). In part II of ex2 we'll perform complex operations on the mesh (which will be much more difficult to achieve without OpenMesh).

 

Reference Material

Arcball:

OpenMesh:

Detailed description:

Important Note: The total transformation of the object by the Arcball, should be the accumulation of COMPLETED transformations done by the user so far + the current transformation (assuming the user is clicking the mouse button). Completed Transformation is defined as the final transformation between the mouse down event and the mouse up event. The current transformation is the transformation performed by the user while dragging the mouse (motion event). Do not accumulate transformations done during motion event, but display them. Accumulate only the the mouse button is released.

Using OpenMesh:

In ~cg/www/exercises/ex2/stuff/code you can find example code and makefile that uses OpenMesh to accomplish several simple tasks. In the main() function there are several commented function calls. Uncomment them one by one and make sure that you understand how to operate them. OpenMesh library is located at ~cg/ww/exercises/ex2/ you can include it from there. OpenMesh is compiled as a dynamic library. In order to run it you'll have to set the environment variable LD_LIBRARY_PATH to include the location of the libraries. In the same folder you'll find a file named setpath.csh - run it (source setpath.csh) in order to set this variable correctly. You also need to run this script before running the school solution

Displaying the mesh:

The mesh is drawn in wire frame mode meaning that only the edges are drawn. The easiest way to do that is to iterate over all the edges and display them. You can also iterate over all the faces and display the mesh this way. It is your choice.


Program Syntax (usage)

ex2 <input-file>

School solution + models

The school solution and some models are placed at: ~cg/www/exercises/ex2/stuff

General Requirements

Submission requirements:

Tips

Good Luck And Have Fun!!!