file
Integration.hConversion of basic GLM vector and matrix types.
Provides conversion for the following types. See Magnum/
Magnum vector type | Equivalent GLM type |
---|---|
Math:: | glm::bvec2 , glm::bvec3 , glm::bvec4 |
Vector2, Vector3, Color3, Vector4, Color4 | glm::vec2 , glm::vec3 , glm::vec4 |
Vector2ui, Vector3ui, Vector4ui | glm::uvec2 , glm::uvec3 , glm::uvec4 |
Vector2i, Vector3i, Vector4i | glm::ivec2 , glm::ivec3 , glm::ivec4 |
Vector2d, Vector3d, Vector4d | glm::dvec2 , glm::dvec3 , glm::dvec4 |
Magnum matrix type | Equivalent GLM type |
---|---|
Matrix2x2 or Matrix2x2d | glm::mat2 / glm::mat2x2 or glm::dmat2 / glm::dmat2x2 |
Matrix3 / Matrix3x3 or Matrix3d / Matrix3x3d | glm::mat3 / glm::mat3x3 or glm::dmat3 / glm::dmat3x3 |
Matrix4 / Matrix4x4 or Matrix4d / Matrix4x4d | glm::mat4 / glm::mat4x4 or glm::dmat4 / glm::dmat4x4 |
Matrix2x3 or Matrix2x3d | glm::mat2x3 or glm::dmat2x3 |
Matrix3x2 or Matrix3x2d | glm::mat3x2 or glm::dmat3x2 |
Matrix2x4 or Matrix2x4d | glm::mat2x4 or glm::dmat2x4 |
Matrix4x2 or Matrix4x2d | glm::mat4x2 or glm::dmat4x2 |
Matrix3x4 or Matrix3x4d | glm::mat3x4 or glm::dmat3x4 |
Matrix4x3 or Matrix4x3d | glm::mat4x3 or glm::dmat4x3 |
Types with extra qualifiers (such as glm::mediump_dmat3x4
) are treated the same as types with no qualifier. Debug output using Corrade::
#include <Magnum/GlmIntegration/Integration.h> glm::vec3 a{1.0f, 2.0f, 3.0f}; Vector3 b(a); glm::mat3 c = glm::mat3(Matrix3::rotation(35.0_degf)); Debug{} << glm::lowp_ivec3{1, 42, -3}; // prints ivec3(1, 42, -3)
Namespaces
- namespace glm
- GLM namespace.
Functions
-
template<class T, glm::precision q>auto operator<<(Corrade::
Utility:: Debug& debug, const tvec2<T, q>& value) -> Corrade:: Utility:: Debug& - Debug output operator for GLM vector types.
-
template<class T, glm::precision q>auto operator<<(Corrade::
Utility:: Debug& debug, const tvec3<T, q>& value) -> Corrade:: Utility:: Debug& -
template<class T, glm::precision q>auto operator<<(Corrade::
Utility:: Debug& debug, const tvec4<T, q>& value) -> Corrade:: Utility:: Debug& -
template<class T, glm::precision q>auto operator<<(Corrade::
Utility:: Debug& debug, const tmat2x2<T, q>& value) -> Corrade:: Utility:: Debug& - Debug output operator for GLM matrix types.
-
template<class T, glm::precision q>auto operator<<(Corrade::
Utility:: Debug& debug, const tmat2x3<T, q>& value) -> Corrade:: Utility:: Debug& -
template<class T, glm::precision q>auto operator<<(Corrade::
Utility:: Debug& debug, const tmat2x4<T, q>& value) -> Corrade:: Utility:: Debug& -
template<class T, glm::precision q>auto operator<<(Corrade::
Utility:: Debug& debug, const tmat3x2<T, q>& value) -> Corrade:: Utility:: Debug& -
template<class T, glm::precision q>auto operator<<(Corrade::
Utility:: Debug& debug, const tmat3x3<T, q>& value) -> Corrade:: Utility:: Debug& -
template<class T, glm::precision q>auto operator<<(Corrade::
Utility:: Debug& debug, const tmat3x4<T, q>& value) -> Corrade:: Utility:: Debug& -
template<class T, glm::precision q>auto operator<<(Corrade::
Utility:: Debug& debug, const tmat4x2<T, q>& value) -> Corrade:: Utility:: Debug& -
template<class T, glm::precision q>auto operator<<(Corrade::
Utility:: Debug& debug, const tmat4x3<T, q>& value) -> Corrade:: Utility:: Debug& -
template<class T, glm::precision q>auto operator<<(Corrade::
Utility:: Debug& debug, const tmat4x4<T, q>& value) -> Corrade:: Utility:: Debug&