C++ header-only library for 2D/3D computer graphics, image processing and mathematics (linear algebra and statistics).
Looking for examples? Go directly to the Examples page.
SpatiumLib has the following key points:
Applicability
- Header-only. No platform dependent library linking.
- Written in C++11.
- No dependencies except C++ Standard Library. QtTest for unit testing.
Education
- Code readability more important than optimizations.
- Documentation through comments in code.
- Doxygen documentation (read the docs).
- Examples on the Wiki (read the wiki).
Performance is not a key point of SpatiumLib. There is no GPU acceleration or multithreading. This may be quite important, especially for 3D graphics.
Looking for class references? Go directly to the Class References page.
SpatiumLib is a collection of header files (*.h) distributed over several directories. Each of these directories represents a namespace with identical name. These namespaces and their dependencies are shown in the dependency graph.
TODO: Insert namespace dependency graph
Global namespace including base Matrix, Vector and Image. Also contains mathematical functions.
#include <spatium/geom3d.h>
3D geometry namespace including classes Matrix4x4, Point3, Ellipsoid and more...
#include <spatium/gfx3d.h>
3D graphics namespace including classes Mesh, Camera, Scene, Renderer and more...
#include <spatium/gfx2d.h>
2D graphics namespace including draw functions for lines, circles, rectangles and Bezier curves.
#include <spatium/imgproc.h>
Image processing namespace including classes and functions for image convolution (thresholding, blurring, etc.) and feature extraction (corners, edges).
- Clone or download this repository.
git clone https://github.com/martijnkoopman/SpatiumLib.git
- Copy directory
spatiumfromincludeinto your project.
This directory has the following subdirectories, each being a namespace:
geom3dgfx2dgfx3dimgproc
- Include the required files.
For example: #include <spatium/Matrix.h>
You can include individual files (classes) or whole namespaces. You can also delete namespaces (directories) that you don't need as long as it isn't a dependecny for other namespaces you're using. See the dependency graph.
TODO
TODO
This library is licensed under the GNU General Public License 3.0 - see the LICENSE.md file for details.