$25
The Vulkan application whose source code is contained in file Assignment19.cpp, needs to show a dice and a soda can, respectively modelled with a cube and a cylinder, using a texture and appropriate UV coordinates. Objects are built within the code contained models.cpp. In particular, the user implements the procedure makeModels(), that creates the primitive using indexed triangle lists. Vectors M1_vertices and M2_vertices should contain the components of the vertices of the primitives, while vectors M1_indices and M2_indices, should contain the indices for building the triangles. Below you can find a sample result for the four objects. The main difference with respect to Assignment18 is that in this case vertices are characterized by the position, the normal vector direction and the UVcoordinates, contained in the Vertex data structure. Expected results are the following:
You can move the view using the same keys as in Assigment0:
ESC – quit the application
SPACE BAR – move to the next projection | X: change view mode
Q: roll left
W: forward
E: roll right
R: up
↑: look up
A: left
S: backward
D: right
F: down
←: look left
↓: look down
→: look right
Pressing X you can change the view mode: the wireframe mode also shows the direction of the normal vector and can be usefull for debugging your code.