A hierarchy of objects was chosen as the method for representing the world and character internally. Since the external representation splits the model into objects, it was a trivial matter to organise the internal representation the same way. The class hierarchy shown by the class model in Figure 4.4 depicts the exact organisation of the data.
The main virtual environment class shown in Figure 3.4 will be composed of several of the Model classes, one for each object of the external representation held in a C++ <map> container. This allows fast access to each object as the map container is implemented as a hash table. Each model class will have an OpenGL display list constructed for it, and these will all be rendered every frame.