Merge branch '0.9.5' of https://github.com/g-truc/glm into 0.9.5

This commit is contained in:
Christophe Riccio
2013-12-15 19:56:12 +01:00
13 changed files with 780 additions and 27 deletions

View File

@@ -718,7 +718,7 @@
#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_SWIZZLE_DISPLAYED))
# define GLM_MESSAGE_SWIZZLE_DISPLAYED
# if defined(GLM_SWIZZL)
# if defined(GLM_SWIZZLE)
# pragma message("GLM: Swizzling operators enabled")
# else
# pragma message("GLM: Swizzling operators disabled")

View File

@@ -100,6 +100,7 @@
#include "./gtx/int_10_10_10_2.hpp"
#include "./gtx/integer.hpp"
#include "./gtx/intersect.hpp"
#include "./gtx/io.hpp"
#include "./gtx/log_base.hpp"
#include "./gtx/matrix_cross_product.hpp"
#include "./gtx/matrix_interpolation.hpp"

View File

@@ -106,6 +106,8 @@ namespace detail
GLM_FUNC_DECL T const & operator[](int i) const;
// Operators
GLM_FUNC_DECL tquat<T, P> & operator+=(tquat<T, P> const & q);
GLM_FUNC_DECL tquat<T, P> & operator*=(tquat<T, P> const & q);
GLM_FUNC_DECL tquat<T, P> & operator*=(T const & s);
GLM_FUNC_DECL tquat<T, P> & operator/=(T const & s);
};

View File

@@ -182,6 +182,34 @@ namespace detail
//////////////////////////////////////////////////////////////
// tquat<valType> operators
template <typename T, precision P>
GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator +=
(
tquat<T, P> const & q
)
{
this->w += q.w;
this->x += q.x;
this->y += q.y;
this->z += q.z;
return *this;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator *=
(
tquat<T, P> const & q
)
{
tquat<T, P> const p(*this);
this->w = p.w * q.w - p.x * q.x - p.y * q.y - p.z * q.z;
this->x = p.w * q.x + p.x * q.w + p.y * q.z - p.z * q.y;
this->y = p.w * q.y + p.y * q.w + p.z * q.x - p.x * q.z;
this->z = p.w * q.z + p.z * q.w + p.x * q.y - p.y * q.x;
return *this;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator *=
(
@@ -194,7 +222,7 @@ namespace detail
this->z *= s;
return *this;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator /=
(
@@ -227,11 +255,7 @@ namespace detail
detail::tquat<T, P> const & p
)
{
return detail::tquat<T, P>(
q.w + p.w,
q.x + p.x,
q.y + p.y,
q.z + p.z);
return detail::tquat<T, P>(q) += p;
}
template <typename T, precision P>
@@ -241,11 +265,7 @@ namespace detail
detail::tquat<T, P> const & p
)
{
return detail::tquat<T, P>(
q.w * p.w - q.x * p.x - q.y * p.y - q.z * p.z,
q.w * p.x + q.x * p.w + q.y * p.z - q.z * p.y,
q.w * p.y + q.y * p.w + q.z * p.x - q.x * p.z,
q.w * p.z + q.z * p.w + q.x * p.y - q.y * p.x);
return detail::tquat<T, P>(q) *= p;
}
// Transformation

159
glm/gtx/io.hpp Normal file
View File

@@ -0,0 +1,159 @@
///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net)
///
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
/// copies of the Software, and to permit persons to whom the Software is
/// furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
/// THE SOFTWARE.
///
/// @ref gtx_io
/// @file glm/gtx/io.hpp
/// @date 2013-11-22
/// @author Jan P Springer (regnirpsj@gmail.com)
///
/// @see core (dependence)
/// @see gtx_quaternion (dependence)
///
/// @defgroup gtx_io GLM_GTX_io
/// @ingroup gtx
///
/// @brief std::[w]ostream support for glm types
///
/// <glm/gtx/io.hpp> needs to be included to use these functionalities.
///////////////////////////////////////////////////////////////////////////////////
#ifndef GLM_GTX_io
#define GLM_GTX_io GLM_VERSION
// Dependency:
#include "../glm.hpp"
#include "../gtx/quaternion.hpp"
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
# pragma message("GLM: GLM_GTX_io extension included")
#endif
#include <iosfwd> // std::basic_ostream<> (fwd)
#include <utility> // std::pair<>
namespace glm
{
/// @addtogroup gtx_io
/// @{
namespace io
{
class precision_guard {
public:
GLM_FUNC_DECL explicit precision_guard();
GLM_FUNC_DECL ~precision_guard();
private:
unsigned precision_;
unsigned value_width_;
};
enum class order_t { column_major, row_major, };
class format_guard {
public:
GLM_FUNC_DECL explicit format_guard();
GLM_FUNC_DECL ~format_guard();
private:
order_t order_;
char cr_;
};
// decimal places (dflt: 3)
GLM_FUNC_DECL unsigned& precision();
// sign + value + '.' + decimals (dflt: 1 + 4 + 1 + precision())
GLM_FUNC_DECL unsigned& value_width();
// matrix output order (dflt: row_major)
GLM_FUNC_DECL order_t& order();
// carriage/return char (dflt: '\n')
GLM_FUNC_DECL char& cr();
// matrix output order -> column_major
GLM_FUNC_DECL std::ios_base& column_major(std::ios_base&);
// matrix output order -> row_major
GLM_FUNC_DECL std::ios_base& row_major (std::ios_base&);
// carriage/return char -> '\n'
GLM_FUNC_DECL std::ios_base& formatted (std::ios_base&);
// carriage/return char -> ' '
GLM_FUNC_DECL std::ios_base& unformatted (std::ios_base&);
}//namespace io
namespace detail
{
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tquat<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tvec2<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tvec3<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tvec4<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x2<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x3<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x4<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat3x2<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat3x3<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat3x4<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat4x2<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat4x3<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat4x4<T,P> const&);
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&,
std::pair<tmat4x4<T,P> const,
tmat4x4<T,P> const> const&);
}//namespace detail
/// @}
}//namespace glm
#include "io.inl"
#endif//GLM_GTX_io

420
glm/gtx/io.inl Normal file
View File

@@ -0,0 +1,420 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
///////////////////////////////////////////////////////////////////////////////////////////////////
// Created : 2013-11-22
// Updated : 2013-11-22
// Licence : This source is under MIT License
// File : glm/gtx/inl.inl
///////////////////////////////////////////////////////////////////////////////////////////////////
// #include <boost/io/ios_state.hpp> // boost::io::ios_all_saver
#include <iomanip> // std::setfill<>, std::fixed, std::setprecision, std::right,
// std::setw
#include <ostream> // std::basic_ostream<>
namespace glm
{
namespace io
{
/* explicit */ GLM_FUNC_QUALIFIER
precision_guard::precision_guard()
: precision_ (precision()),
value_width_(value_width())
{}
GLM_FUNC_QUALIFIER
precision_guard::~precision_guard()
{
value_width() = value_width_;
precision() = precision_;
}
/* explicit */ GLM_FUNC_QUALIFIER
format_guard::format_guard()
: order_(order()),
cr_ (cr())
{}
GLM_FUNC_QUALIFIER
format_guard::~format_guard()
{
cr() = cr_;
order() = order_;
}
GLM_FUNC_QUALIFIER unsigned&
precision()
{
static unsigned p(3);
return p;
}
GLM_FUNC_QUALIFIER unsigned&
value_width()
{
static unsigned p(9);
return p;
}
GLM_FUNC_QUALIFIER order_t&
order()
{
static order_t p(order_t::row_major);
return p;
}
GLM_FUNC_QUALIFIER char&
cr()
{
static char p('\n'); return p;
}
GLM_FUNC_QUALIFIER std::ios_base&
column_major(std::ios_base& os)
{
order() = order_t::column_major;
return os;
}
GLM_FUNC_QUALIFIER std::ios_base&
row_major(std::ios_base& os)
{
order() = order_t::row_major;
return os;
}
GLM_FUNC_QUALIFIER std::ios_base&
formatted(std::ios_base& os)
{
cr() = '\n';
return os;
}
GLM_FUNC_QUALIFIER std::ios_base&
unformatted(std::ios_base& os)
{
cr() = ' ';
return os;
}
} // namespace io
namespace detail {
// functions, inlined (inline)
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>&
operator<<(std::basic_ostream<CTy,CTr>& os, tquat<T,P> const& a)
{
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
if (cerberus) {
// boost::io::ios_all_saver const ias(os);
os << std::fixed << std::setprecision(io::precision())
<< '['
<< std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.w << ','
<< std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.x << ','
<< std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.y << ','
<< std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.z
<< ']';
}
return os;
}
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>&
operator<<(std::basic_ostream<CTy,CTr>& os, tvec2<T,P> const& a)
{
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
if (cerberus) {
// boost::io::ios_all_saver const ias(os);
os << std::fixed << std::setprecision(io::precision())
<< '['
<< std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.x << ','
<< std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.y
<< ']';
}
return os;
}
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>&
operator<<(std::basic_ostream<CTy,CTr>& os, tvec3<T,P> const& a)
{
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
if (cerberus) {
// boost::io::ios_all_saver const ias(os);
os << std::fixed << std::setprecision(io::precision())
<< '['
<< std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.x << ','
<< std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.y << ','
<< std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.z
<< ']';
}
return os;
}
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>&
operator<<(std::basic_ostream<CTy,CTr>& os, tvec4<T,P> const& a)
{
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
if (cerberus) {
// boost::io::ios_all_saver const ias(os);
os << std::fixed << std::setprecision(io::precision())
<< '['
<< std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.x << ','
<< std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.y << ','
<< std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.z << ','
<< std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.w
<< ']';
}
return os;
}
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>&
operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x2<T,P> const& a)
{
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
if (cerberus) {
tmat2x2<T,P> m(a);
if (io::order_t::row_major == io::order()) {
m = transpose(a);
}
os << io::cr()
<< '[' << m[0] << io::cr()
<< ' ' << m[1] << ']';
}
return os;
}
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>&
operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x3<T,P> const& a)
{
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
if (cerberus) {
tmat3x2<T,P> m(a);
if (io::order_t::row_major == io::order()) {
m = transpose(a);
}
os << io::cr()
<< '[' << m[0] << io::cr()
<< ' ' << m[1] << io::cr()
<< ' ' << m[2] << ']';
}
return os;
}
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>&
operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x4<T,P> const& a)
{
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
if (cerberus) {
tmat4x2<T,P> m(a);
if (io::order_t::row_major == io::order()) {
m = transpose(a);
}
os << io::cr()
<< '[' << m[0] << io::cr()
<< ' ' << m[1] << io::cr()
<< ' ' << m[2] << io::cr()
<< ' ' << m[3] << ']';
}
return os;
}
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>&
operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x2<T,P> const& a)
{
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
if (cerberus) {
tmat2x3<T,P> m(a);
if (io::order_t::row_major == io::order()) {
m = transpose(a);
}
os << io::cr()
<< '[' << m[0] << io::cr()
<< ' ' << m[1] << ']';
}
return os;
}
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>&
operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x3<T,P> const& a)
{
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
if (cerberus) {
tmat3x3<T,P> m(a);
if (io::order_t::row_major == io::order()) {
m = transpose(a);
}
os << io::cr()
<< '[' << m[0] << io::cr()
<< ' ' << m[1] << io::cr()
<< ' ' << m[2] << ']';
}
return os;
}
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>&
operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x4<T,P> const& a)
{
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
if (cerberus) {
tmat4x3<T,P> m(a);
if (io::order_t::row_major == io::order()) {
m = transpose(a);
}
os << io::cr()
<< '[' << m[0] << io::cr()
<< ' ' << m[1] << io::cr()
<< ' ' << m[2] << io::cr()
<< ' ' << m[3] << ']';
}
return os;
}
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>&
operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x2<T,P> const& a)
{
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
if (cerberus) {
tmat2x4<T,P> m(a);
if (io::order_t::row_major == io::order()) {
m = transpose(a);
}
os << io::cr()
<< '[' << m[0] << io::cr()
<< ' ' << m[1] << ']';
}
return os;
}
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>&
operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x3<T,P> const& a)
{
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
if (cerberus) {
tmat3x4<T,P> m(a);
if (io::order_t::row_major == io::order()) {
m = transpose(a);
}
os << io::cr()
<< '[' << m[0] << io::cr()
<< ' ' << m[1] << io::cr()
<< ' ' << m[2] << ']';
}
return os;
}
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>&
operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x4<T,P> const& a)
{
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
if (cerberus) {
tmat4x4<T,P> m(a);
if (io::order_t::row_major == io::order()) {
m = transpose(a);
}
os << io::cr()
<< '[' << m[0] << io::cr()
<< ' ' << m[1] << io::cr()
<< ' ' << m[2] << io::cr()
<< ' ' << m[3] << ']';
}
return os;
}
template <typename CTy, typename CTr, typename T, precision P>
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>&
operator<<(std::basic_ostream<CTy,CTr>& os,
std::pair<tmat4x4<T,P> const, tmat4x4<T,P> const> const& a)
{
typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
if (cerberus) {
tmat4x4<T,P> ml(a.first);
tmat4x4<T,P> mr(a.second);
if (io::order_t::row_major == io::order()) {
ml = transpose(a.first);
mr = transpose(a.second);
}
os << io::cr()
<< '[' << ml[0] << " [" << mr[0] << io::cr()
<< ' ' << ml[1] << " " << mr[1] << io::cr()
<< ' ' << ml[2] << " " << mr[2] << io::cr()
<< ' ' << ml[3] << "] " << mr[3] << ']';
}
return os;
}
}//namespace detail
}//namespace glm

View File

@@ -54,7 +54,7 @@ namespace glm
//! Transforms a matrix with a shearing on X axis.
//! From GLM_GTX_transform2 extension.
template <typename T>
template <typename T, precision P>
detail::tmat3x3<T, P> shearX2D(
detail::tmat3x3<T, P> const & m,
T y);

View File

@@ -9,7 +9,7 @@
namespace glm
{
template <typename T>
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> shearX2D(
const detail::tmat3x3<T, P>& m,
T s)
@@ -19,7 +19,7 @@ namespace glm
return m * r;
}
template <typename T>
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> shearY2D(
const detail::tmat3x3<T, P>& m,
T s)
@@ -29,7 +29,7 @@ namespace glm
return m * r;
}
template <typename T>
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> shearX3D(
const detail::tmat4x4<T, P>& m,
T s,
@@ -41,7 +41,7 @@ namespace glm
return m * r;
}
template <typename T>
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> shearY3D(
const detail::tmat4x4<T, P>& m,
T s,
@@ -53,7 +53,7 @@ namespace glm
return m * r;
}
template <typename T>
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> shearZ3D(
const detail::tmat4x4<T, P>& m,
T s,
@@ -65,7 +65,7 @@ namespace glm
return m * r;
}
template <typename T>
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> reflect2D(
const detail::tmat3x3<T, P>& m,
const detail::tvec3<T, P>& normal)
@@ -78,7 +78,7 @@ namespace glm
return m * r;
}
template <typename T>
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> reflect3D(
const detail::tmat4x4<T, P>& m,
const detail::tvec3<T, P>& normal)
@@ -98,7 +98,7 @@ namespace glm
return m * r;
}
template <typename T>
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> proj2D(
const detail::tmat3x3<T, P>& m,
const detail::tvec3<T, P>& normal)
@@ -111,7 +111,7 @@ namespace glm
return m * r;
}
template <typename T>
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> proj3D(
const detail::tmat4x4<T, P>& m,
const detail::tvec3<T, P>& normal)
@@ -129,7 +129,7 @@ namespace glm
return m * r;
}
template <typename T>
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> scaleBias(
T scale,
T bias)
@@ -142,7 +142,7 @@ namespace glm
return result;
}
template <typename T>
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> scaleBias(
const detail::tmat4x4<T, P>& m,
T scale,