Importing a game map
As the first step to load a level, we will add a new C++ class named AssimpLevel. You can think of the AssimpLevel class as a mix of the two classes, AssimpModel and AssimpInstance, containing the static vertex data of the model class and dynamic properties such as the position, rotation, or scale of the instance class.
The AssimpLevel class consists of two new files, AssimpLevel.h and AssimpLevel.cpp. Both files are in the model folder, but we will borrow most of the methods and members from the two classes, AssimpModel and AssimpInstance.
Let’s do a brief walkthrough of the AssimpLevel class.
Adding a C++ class to hold the level data
Since the level and model/instance data are so similar, we can reuse parts of the functionality we already have in the AssimpModel and AssimpInstance classes, such as loading the model file or doing matrix operations.
For the static data, we can copy the following methods and members from the AssimpModel...