transform2.hpp
Go to the documentation of this file.
#pragma once
// Dependency:
#include "../glm.hpp"
#include "../gtx/transform.hpp"
#ifndef GLM_ENABLE_EXPERIMENTAL
# error "GLM: GLM_GTX_transform2 is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
#elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_GTX_transform2 extension included")
#endif
namespace glm
{
template<typename T, qualifier Q>
GLM_FUNC_DECL mat<3, 3, T, Q> shearX2D(mat<3, 3, T, Q> const& m, T y);
template<typename T, qualifier Q>
GLM_FUNC_DECL mat<3, 3, T, Q> shearY2D(mat<3, 3, T, Q> const& m, T x);
template<typename T, qualifier Q>
GLM_FUNC_DECL mat<4, 4, T, Q> shearX3D(mat<4, 4, T, Q> const& m, T y, T z);
template<typename T, qualifier Q>
GLM_FUNC_DECL mat<4, 4, T, Q> shearY3D(mat<4, 4, T, Q> const& m, T x, T z);
template<typename T, qualifier Q>
GLM_FUNC_DECL mat<4, 4, T, Q> shearZ3D(mat<4, 4, T, Q> const& m, T x, T y);
//template<typename T> GLM_FUNC_QUALIFIER mat<4, 4, T, Q> shear(const mat<4, 4, T, Q> & m, shearPlane, planePoint, angle)
// Identity + tan(angle) * cross(Normal, OnPlaneVector) 0
// - dot(PointOnPlane, normal) * OnPlaneVector 1
// Reflect functions seem to don't work
//template<typename T> mat<3, 3, T, Q> reflect2D(const mat<3, 3, T, Q> & m, const vec<3, T, Q>& normal){return reflect2DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
//template<typename T> mat<4, 4, T, Q> reflect3D(const mat<4, 4, T, Q> & m, const vec<3, T, Q>& normal){return reflect3DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
template<typename T, qualifier Q>
GLM_FUNC_DECL mat<3, 3, T, Q> proj2D(mat<3, 3, T, Q> const& m, vec<3, T, Q> const& normal);
template<typename T, qualifier Q>
GLM_FUNC_DECL mat<4, 4, T, Q> proj3D(mat<4, 4, T, Q> const & m, vec<3, T, Q> const& normal);
template<typename T, qualifier Q>
GLM_FUNC_DECL mat<4, 4, T, Q> scaleBias(T scale, T bias);
template<typename T, qualifier Q>
GLM_FUNC_DECL mat<4, 4, T, Q> scaleBias(mat<4, 4, T, Q> const& m, T scale, T bias);
}// namespace glm
#include "transform2.inl"
glm::shearY3D
GLM_FUNC_DECL mat< 4, 4, T, Q > shearY3D(mat< 4, 4, T, Q > const &m, T x, T z)
Transforms a matrix with a shearing on Y axis.
glm::scale
GLM_FUNC_DECL mat< 4, 4, T, Q > scale(mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)
Builds a scale 4 * 4 matrix created from 3 scalars.
glm::proj3D
GLM_FUNC_DECL mat< 4, 4, T, Q > proj3D(mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &normal)
Build planar projection matrix along normal axis.
glm::shearY2D
GLM_FUNC_DECL mat< 3, 3, T, Q > shearY2D(mat< 3, 3, T, Q > const &m, T x)
Transforms a matrix with a shearing on Y axis.
glm::shearX2D
GLM_FUNC_DECL mat< 3, 3, T, Q > shearX2D(mat< 3, 3, T, Q > const &m, T y)
Transforms a matrix with a shearing on X axis.
glm::proj2D
GLM_FUNC_DECL mat< 3, 3, T, Q > proj2D(mat< 3, 3, T, Q > const &m, vec< 3, T, Q > const &normal)
Build planar projection matrix along normal axis.
glm::scaleBias
GLM_FUNC_DECL mat< 4, 4, T, Q > scaleBias(mat< 4, 4, T, Q > const &m, T scale, T bias)
Build a scale bias matrix.
glm::shearX3D
GLM_FUNC_DECL mat< 4, 4, T, Q > shearX3D(mat< 4, 4, T, Q > const &m, T y, T z)
Transforms a matrix with a shearing on X axis From GLM_GTX_transform2 extension.
glm::shearZ3D
GLM_FUNC_DECL mat< 4, 4, T, Q > shearZ3D(mat< 4, 4, T, Q > const &m, T x, T y)
Transforms a matrix with a shearing on Z axis.