Imath is a basic, light-weight, and efficient C++ representation of 2D and 3D vectors and matrices and other simple but useful mathematical objects, functions, and data types common in computer graphics applications, including the “half” 16-bit floating-point type.
Imath also includes optional python bindings for all types and functions, including optimized implementations of vector and matrix arrays.
The goals of the Imath project are simplicity, ease of use, correctness and verifiability, performance, and breadth of adoption. Imath is not intended to be a comprehensive linear algebra or numerical analysis package.
- half: 16-bit floating-point type
- Vector: V2s, V2i, V2f, V2d, V3s, V3i, V3f, V3d, V4s, V4i, V4f, V4d
- Matrix: M22f, M22d, M33f, M33d, M44f, M44d
- Bounding box: Box2s, Box2i, Box2f, Box2d, Box3s, Box3i, Box3f, Box3d
- Color: C3h, C3f, C3c, C4f, C4h, C4c
- Euler angles: Eulerf, Eulerd
- Quaternion: Quatf, Quatd
- Viewing frustum: Frustrumf, Frustumd
- Interval: Intervals, Intervali, Intervalf, Intervald
- Line: Line3f, Line3d
- Plane: Plane3f, Plane3d
- Sphere: Sphere3f, Sphere3d
- Shear: Shear3f, Shear3d, Shear6f, Shear6
- Miscellaneous math functions
Imath builds on Linux, macOS, Microsoft Windows, and is cross-compilable on other systems.
Imath was originally developed at Industrial Light & Magic in the early 2000's and was originally distributed as open source as a part of the OpenEXR project.
Imath continues to be maintained as a sub-project of OpenEXR, which is now a project of the Academy Software Foundation. See the OpenEXR project's GOVERNANCE.md for more information about how the project operates.
The OpenEXR project is dedicated to promoting a harassment-free community. Read our code of conduct.
See INSTALL.md for instructions on downloading and building Imath from source.
Because Imath was originally distributed as a part of OpenEXR, it has already had two major release versions, as a part of OpenEXR v1.* and v2.*. To avoid confusion with these original releases, the first version of Imath released independently of OpenEXR is Version v3.0. To be clear, the versioning and release of Imath is no longer tied to OpenEXR.
There are two primary ways to connect with the project:
-
The openexr-dev@lists.aswf.io mail list: This is a development focused mail list with a deep history of technical conversations and decisions that have shaped the project. Subscribe at openexr-dev@lists.aswf.io.
-
GitHub Issues: GitHub issues are used both to track bugs and to discuss feature requests. Submit an issue here: https://github.com/AcademySoftwareFoundation/imath/issues.
The OpenEXR developer community welcomes contributions to the project. See CONTRIBUTING.md for more information about contributing to Imath and OpenEXR.
Imath is released under OpenEXR's BSD-3-Clause license.