Magnum/GlmIntegration/GtcIntegration.h file

Integration of GLM extension types.

Provides conversion for the following types. See Magnum/GlmIntegration/Integration.h and Magnum/GlmIntegration/GtxIntegration.h for conversion of other types.

Magnum typeEquivalent GLM type
Quaternion, Quaterniondglm::quat, glm::dquat

Types with extra qualifiers (such as glm::mediump_dquat) are treated the same as types with no qualifier. Debug output using Corrade::Utility::Debug for all types is provided as well on GLM >= 0.9.7. Example usage:

#include <Magnum/GlmIntegration/GtcIntegration.h>

Quaterniond a = Quaterniond::rotation(35.0_deg, Vector3d::xAxis());
glm::dquat b(a);

Debug{} << glm::mediump_quat{4.0f, 1.0f, 2.0f, 3.0f};
    // prints quat(4.000000, {1.000000, 2.000000, 3.000000})

Namespaces

namespace glm
GLM namespace.

Functions

template<class T, glm::precision q>
auto operator<<(Corrade::Utility::Debug& debug, const tquat<T, q>& value) -> Corrade::Utility::Debug&
Debug output operator for GLM quaternion types.