next up previous contents
Next: Collision Detection Up: ANIMATION Previous: External Representation   Contents

Internal Representation

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.

Figure 4.4: Class model for the internal representation

\begin{picture}(0,0)\includegraphics{images/internalHeirarchy.eps}
\end{picture}

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.



Andrew P Coates (UG) 2002-07-17