Modules
The complete project is strictly separation into different modules and layers of abstraction. This design principle is supported by the usage of different namespaces for different modules. The result of these efforts is a clearer design and less dependencies between the classes. It is even possible to use only some parts of Project Magnum without being forced to import all other modules.
Of course the project is not free of dependencies, but they are well defined and only in one direction, that is is only allowed for higher-level modules to depend on lower level ones, not the other way round.
Currently Project Magnum has the following modules:
- Base Module. Contains some very basic classes, data types and some functions.
- Container Module. This module provides common container classes like lists, sets, maps etc. All containers are implemented as templated, so they are reusable for many different tasks.
- Algorithm Module. The algorithm modules contains some important algorithms that work together with the container module, for example sorting and retrieving data in arrays.
- System Module. The system module offers abstraction to many operating system specific calls for thread management, mutexes etc.
- IO Module. The IO module provides all neccesary classes for input and output via files and streams.
- Networking Module. Offers basic network services like sockets and more advanced classes for easily accessing files and streams on web servers using HTTP.
- Mathematics Module. Contains basic mathematical structures and algorithms like vectors, matrices and linear solvers.
- Geometry Module. The geometry modules contains different classes for represnting bodies like spheres, aligned and oriented boxes etc. among routines for intersection and volume fitting. It is implemented for arbitrary dimensions, although only used for 2- and 3-dimensional applications.
- Application Module. The application module contains functionality for building message queues, listener objects etc.
- User Interface Module. Delivers an interface both for classical windows and for OpenGL views-
- 2D Graphics Module. Delivers many important 2D algorithms like resizing and colour space conversions. Plus contains a lot of image file readers for various file formats (PCX, PNG, JPG, TGA, GIF, PSD, BMP etc).
- 3D Graphics Module. This is probably the biggest and most complex module containing a still growing 3d package for building 3d interactive applications.
- Scene Graph Module. The scene graph module sits on top of the 3D graphics module and offers a higher level of abstraction and incorporates behaviours and audio.
- Multimedia Module. The multi media module enables an application to decode and play sound and music files. With its flexible architecture, the module can easily be enhanced to handle video streams, too.