Computer Graphics project for viewing 3D .obj files using OpenGL
- Vertex loading (using Assimp lib)
- Geometric transforms
- Normal and wireframe views
This software is compatible with Linux environments.
If the file mesh
isnt available, run make
. That's it!
Run
./mesh [filepath]
For example, try
./mesh resource/backpack.object
Key | Action |
---|---|
s or e |
Enter scale mode |
t |
Enter translation mode |
r |
Enter translation mode (default mode) |
v |
Toggle wireframe view. Defauldt value is disabled. |
p |
Toggle perspective mode (orthogonal or perspective). Default view is orthogonal. |
Use the arrow keys, a
and d
for changing parameters in each mode.
Key | Action |
---|---|
= | Increase scale proportionally |
- | Decrease scale proportionally |
Left and right arrows | Change scale in x-axis |
Down and up arrows | Change scale in y-axis |
a and d |
Change scale in z-axis |
Key | Action |
---|---|
Left and right arrows | Move in x-axis |
Down and up arrows | Move in y-axis |
a and d |
Move in z-axis |
Fill | Wireframe |
---|---|
Key | Action |
---|---|
Left and right arrows | Rotate in y-axis |
Down and up arrows | Rotate in x-axis |
a and d |
Rotate in z-axis |
All the dependencies are included.
Library | Link | Documentation |
---|---|---|
OpenGL | ||
Glut | ||
assimp | https://github.com/assimp/assimp | https://assimp-docs.readthedocs.io/ |
Many of the code is based on the great tutorials by Learn OpenGL available at https://learnopengl.com/Model-Loading/Model and on the Computer Graphics lectures at the Federal University of Parana (UTFPR) in the first semester of 2023.
The backpack model was suggested by the same tutorial, and is designed by Berk Gedik. It's available for download here: Survival Guitar Backpack.