Reformatting
This commit is contained in:
parent
6f6d161afb
commit
bc15b98730
@ -27,8 +27,8 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace glm{
|
||||
namespace detail{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
#ifndef _MSC_EXTENSIONS
|
||||
|
||||
//////////////////////////////////////
|
||||
|
@ -26,13 +26,15 @@
|
||||
/// @author Christophe Riccio
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace glm{
|
||||
|
||||
namespace glm
|
||||
{
|
||||
template <typename genType>
|
||||
GLM_FUNC_QUALIFIER genType row(
|
||||
GLM_FUNC_QUALIFIER genType row
|
||||
(
|
||||
genType const & m,
|
||||
int index,
|
||||
typename genType::row_type const & x)
|
||||
typename genType::row_type const & x
|
||||
)
|
||||
{
|
||||
genType Result = m;
|
||||
for(typename genType::size_type i = 0; i < genType::row_size(); ++i)
|
||||
@ -41,9 +43,11 @@ GLM_FUNC_QUALIFIER genType row(
|
||||
}
|
||||
|
||||
template <typename genType>
|
||||
GLM_FUNC_QUALIFIER typename genType::row_type row(
|
||||
GLM_FUNC_QUALIFIER typename genType::row_type row
|
||||
(
|
||||
genType const & m,
|
||||
int index)
|
||||
int index
|
||||
)
|
||||
{
|
||||
typename genType::row_type Result;
|
||||
for(typename genType::size_type i = 0; i < genType::row_size(); ++i)
|
||||
@ -52,10 +56,12 @@ GLM_FUNC_QUALIFIER typename genType::row_type row(
|
||||
}
|
||||
|
||||
template <typename genType>
|
||||
GLM_FUNC_QUALIFIER genType column(
|
||||
GLM_FUNC_QUALIFIER genType column
|
||||
(
|
||||
genType const & m,
|
||||
int index,
|
||||
typename genType::col_type const & x)
|
||||
typename genType::col_type const & x
|
||||
)
|
||||
{
|
||||
genType Result = m;
|
||||
Result[index] = x;
|
||||
@ -63,12 +69,12 @@ GLM_FUNC_QUALIFIER genType column(
|
||||
}
|
||||
|
||||
template <typename genType>
|
||||
GLM_FUNC_QUALIFIER typename genType::col_type column(
|
||||
GLM_FUNC_QUALIFIER typename genType::col_type column
|
||||
(
|
||||
genType const & m,
|
||||
int index)
|
||||
int index
|
||||
)
|
||||
{
|
||||
return m[index];
|
||||
}
|
||||
|
||||
}//namespace glm
|
||||
|
||||
|
@ -26,8 +26,8 @@
|
||||
/// @author Christophe Riccio
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace glm{
|
||||
|
||||
namespace glm
|
||||
{
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER detail::tmat3x3<T> affineInverse
|
||||
(
|
||||
@ -57,8 +57,10 @@ GLM_FUNC_QUALIFIER detail::tmat4x4<T> affineInverse
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tmat2x2<valType> inverseTranspose(
|
||||
detail::tmat2x2<valType> const & m)
|
||||
GLM_FUNC_QUALIFIER detail::tmat2x2<valType> inverseTranspose
|
||||
(
|
||||
detail::tmat2x2<valType> const & m
|
||||
)
|
||||
{
|
||||
valType Determinant = m[0][0] * m[1][1] - m[1][0] * m[0][1];
|
||||
|
||||
@ -72,8 +74,10 @@ GLM_FUNC_QUALIFIER detail::tmat2x2<valType> inverseTranspose(
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tmat3x3<valType> inverseTranspose(
|
||||
detail::tmat3x3<valType> const & m)
|
||||
GLM_FUNC_QUALIFIER detail::tmat3x3<valType> inverseTranspose
|
||||
(
|
||||
detail::tmat3x3<valType> const & m
|
||||
)
|
||||
{
|
||||
valType Determinant =
|
||||
+ m[0][0] * (m[1][1] * m[2][2] - m[1][2] * m[2][1])
|
||||
@ -96,8 +100,10 @@ GLM_FUNC_QUALIFIER detail::tmat3x3<valType> inverseTranspose(
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> inverseTranspose(
|
||||
detail::tmat4x4<valType> const & m)
|
||||
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> inverseTranspose
|
||||
(
|
||||
detail::tmat4x4<valType> const & m
|
||||
)
|
||||
{
|
||||
valType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];
|
||||
valType SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];
|
||||
@ -150,5 +156,4 @@ GLM_FUNC_QUALIFIER detail::tmat4x4<valType> inverseTranspose(
|
||||
|
||||
return Inverse;
|
||||
}
|
||||
|
||||
}//namespace glm
|
||||
|
@ -26,8 +26,8 @@
|
||||
/// @author Christophe Riccio
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace glm{
|
||||
|
||||
namespace glm
|
||||
{
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER detail::tmat4x4<T> translate
|
||||
(
|
||||
@ -409,5 +409,4 @@ GLM_FUNC_QUALIFIER detail::tmat4x4<T> lookAt
|
||||
*/
|
||||
return translate(Result, -eye);
|
||||
}
|
||||
|
||||
}//namespace glm
|
||||
|
@ -15,8 +15,8 @@
|
||||
// - GLM core
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace glm{
|
||||
|
||||
namespace glm
|
||||
{
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T mod289(T const & x)
|
||||
{
|
||||
@ -848,5 +848,4 @@ GLM_FUNC_QUALIFIER T simplex(detail::tvec4<T> const & v)
|
||||
(dot(m0 * m0, detail::tvec3<T>(dot(p0, x0), dot(p1, x1), dot(p2, x2))) +
|
||||
dot(m1 * m1, detail::tvec2<T>(dot(p3, x3), dot(p4, x4))));
|
||||
}
|
||||
|
||||
}//namespace glm
|
||||
|
@ -29,8 +29,8 @@
|
||||
#include <limits>
|
||||
|
||||
namespace glm{
|
||||
namespace detail{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER tquat<T>::tquat() :
|
||||
x(0),
|
||||
|
@ -26,8 +26,8 @@
|
||||
/// @author Christophe Riccio
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace glm{
|
||||
|
||||
namespace glm
|
||||
{
|
||||
template <typename T, template <typename> class vecType>
|
||||
GLM_FUNC_QUALIFIER T swizzle
|
||||
(
|
||||
@ -113,78 +113,4 @@ GLM_FUNC_QUALIFIER detail::tref4<T> swizzle
|
||||
{
|
||||
return detail::tref4<T>(v[x], v[y], v[z], v[w]);
|
||||
}
|
||||
/*
|
||||
template <comp x>
|
||||
GLM_FUNC_QUALIFIER float& swizzle
|
||||
(
|
||||
detail::tvec4<float> & v
|
||||
)
|
||||
{
|
||||
return v[x];
|
||||
}
|
||||
|
||||
template <comp x>
|
||||
GLM_FUNC_QUALIFIER int& swizzle
|
||||
(
|
||||
detail::tvec4<int> & v
|
||||
)
|
||||
{
|
||||
return v[x];
|
||||
}
|
||||
|
||||
template <comp x, comp y>
|
||||
GLM_FUNC_QUALIFIER detail::tref2<float> swizzle
|
||||
(
|
||||
detail::tvec4<float> & v
|
||||
)
|
||||
{
|
||||
return detail::tref2<float>(v[x], v[y]);
|
||||
}
|
||||
|
||||
template <comp x, comp y>
|
||||
GLM_FUNC_QUALIFIER detail::tref2<int> swizzle
|
||||
(
|
||||
detail::tvec4<int> & v
|
||||
)
|
||||
{
|
||||
return detail::tref2<int>(v[x], v[y]);
|
||||
}
|
||||
|
||||
template <comp x, comp y, comp z>
|
||||
GLM_FUNC_QUALIFIER detail::tref3<float> swizzle
|
||||
(
|
||||
detail::tvec4<float> & v
|
||||
)
|
||||
{
|
||||
return detail::tref3<float>(v[x], v[y], v[z]);
|
||||
}
|
||||
|
||||
template <comp x, comp y, comp z>
|
||||
GLM_FUNC_QUALIFIER detail::tref3<int> swizzle
|
||||
(
|
||||
detail::tvec4<int> & v
|
||||
)
|
||||
{
|
||||
return detail::tref3<int>(v[x], v[y], v[z]);
|
||||
}
|
||||
|
||||
template <comp x, comp y, comp z, comp w>
|
||||
GLM_FUNC_QUALIFIER detail::tref4<float> swizzle
|
||||
(
|
||||
detail::tvec4<float> & v
|
||||
)
|
||||
{
|
||||
return detail::tref4<float>(v[x], v[y], v[z], v[w]);
|
||||
}
|
||||
|
||||
template <comp x, comp y, comp z, comp w>
|
||||
GLM_FUNC_QUALIFIER detail::tref4<int> swizzle
|
||||
(
|
||||
detail::tvec4<int> & v
|
||||
)
|
||||
{
|
||||
return detail::tref4<int>(v[x], v[y], v[z], v[w]);
|
||||
}
|
||||
*/
|
||||
|
||||
}//namespace glm
|
||||
|
Loading…
x
Reference in New Issue
Block a user