martijnkoopman / SpatiumLib

C++ header-only library for 2D/3D computer graphics, image processing and a little bit of geography.
GNU General Public License v3.0
14 stars 6 forks source link

SpatiumLib

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.

About

SpatiumLib has the following key points:

Applicability

Education

Performance is not a key point of SpatiumLib. There is no GPU acceleration or multithreading. This may be quite important, especially for 3D graphics.

Content

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.

Namespace: spatium

Global namespace including base Matrix, Vector and Image. Also contains mathematical functions.

Namespace: geom2d

#include <spatium/geom2d.h>

2D geometry namespace including class Vector2

Namespace: geom3d

#include <spatium/geom3d.h>

3D geometry namespace including classes Matrix4x4, Point3, Ellipsoid and more...

Namespace: gfx3d

#include <spatium/gfx3d.h>

3D graphics namespace including classes Mesh, Camera, Scene, Renderer and more...

Namespace: gfx2d

#include <spatium/gfx2d.h>

2D graphics namespace including draw functions for lines, circles, rectangles and Bezier curves.

Namespace: imgproc

#include <spatium/imgproc.h>

Image processing namespace including classes and functions for image convolution (thresholding, blurring, etc.) and feature extraction (corners, edges).

Namespace: idx

#include <spatium/idx.h>

Spatial indexing namespace including class Tree

Namespace: stats

#include <spatium/stats.h>

Statistics namespace with convenience function for computing mean, standard deviation, variance, covariance, etc.

Usage

  1. Clone or download this repository.

    git clone https://github.com/martijnkoopman/SpatiumLib.git
  2. Copy directory spatium from include into your project.

This directory has the following subdirectories, each being a namespace:

  1. 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.

License

This library is licensed under the GNU General Public License 3.0 - see the LICENSE.md file for details.