summaryrefslogtreecommitdiffstats
path: root/external/include/glm/gtx/rotate_vector.inl
diff options
context:
space:
mode:
Diffstat (limited to 'external/include/glm/gtx/rotate_vector.inl')
-rw-r--r--external/include/glm/gtx/rotate_vector.inl122
1 files changed, 61 insertions, 61 deletions
diff --git a/external/include/glm/gtx/rotate_vector.inl b/external/include/glm/gtx/rotate_vector.inl
index 5620e96..5183d37 100644
--- a/external/include/glm/gtx/rotate_vector.inl
+++ b/external/include/glm/gtx/rotate_vector.inl
@@ -3,12 +3,12 @@
namespace glm
{
- template <typename T, precision P>
- GLM_FUNC_QUALIFIER tvec3<T, P> slerp
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<3, T, Q> slerp
(
- tvec3<T, P> const & x,
- tvec3<T, P> const & y,
- T const & a
+ vec<3, T, Q> const& x,
+ vec<3, T, Q> const& y,
+ T const& a
)
{
// get cosine of angle between vectors (-1 -> 1)
@@ -25,14 +25,14 @@ namespace glm
return x * t1 + y * t2;
}
- template <typename T, precision P>
- GLM_FUNC_QUALIFIER tvec2<T, P> rotate
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<2, T, Q> rotate
(
- tvec2<T, P> const & v,
- T const & angle
+ vec<2, T, Q> const& v,
+ T const& angle
)
{
- tvec2<T, P> Result;
+ vec<2, T, Q> Result;
T const Cos(cos(angle));
T const Sin(sin(angle));
@@ -41,47 +41,47 @@ namespace glm
return Result;
}
- template <typename T, precision P>
- GLM_FUNC_QUALIFIER tvec3<T, P> rotate
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<3, T, Q> rotate
(
- tvec3<T, P> const & v,
- T const & angle,
- tvec3<T, P> const & normal
+ vec<3, T, Q> const& v,
+ T const& angle,
+ vec<3, T, Q> const& normal
)
{
- return tmat3x3<T, P>(glm::rotate(angle, normal)) * v;
+ return mat<3, 3, T, Q>(glm::rotate(angle, normal)) * v;
}
/*
- template <typename T, precision P>
- GLM_FUNC_QUALIFIER tvec3<T, P> rotateGTX(
- const tvec3<T, P>& x,
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<3, T, Q> rotateGTX(
+ const vec<3, T, Q>& x,
T angle,
- const tvec3<T, P>& normal)
+ const vec<3, T, Q>& normal)
{
const T Cos = cos(radians(angle));
const T Sin = sin(radians(angle));
return x * Cos + ((x * normal) * (T(1) - Cos)) * normal + cross(x, normal) * Sin;
}
*/
- template <typename T, precision P>
- GLM_FUNC_QUALIFIER tvec4<T, P> rotate
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<4, T, Q> rotate
(
- tvec4<T, P> const & v,
- T const & angle,
- tvec3<T, P> const & normal
+ vec<4, T, Q> const& v,
+ T const& angle,
+ vec<3, T, Q> const& normal
)
{
return rotate(angle, normal) * v;
}
- template <typename T, precision P>
- GLM_FUNC_QUALIFIER tvec3<T, P> rotateX
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<3, T, Q> rotateX
(
- tvec3<T, P> const & v,
- T const & angle
+ vec<3, T, Q> const& v,
+ T const& angle
)
{
- tvec3<T, P> Result(v);
+ vec<3, T, Q> Result(v);
T const Cos(cos(angle));
T const Sin(sin(angle));
@@ -90,14 +90,14 @@ namespace glm
return Result;
}
- template <typename T, precision P>
- GLM_FUNC_QUALIFIER tvec3<T, P> rotateY
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<3, T, Q> rotateY
(
- tvec3<T, P> const & v,
- T const & angle
+ vec<3, T, Q> const& v,
+ T const& angle
)
{
- tvec3<T, P> Result = v;
+ vec<3, T, Q> Result = v;
T const Cos(cos(angle));
T const Sin(sin(angle));
@@ -106,14 +106,14 @@ namespace glm
return Result;
}
- template <typename T, precision P>
- GLM_FUNC_QUALIFIER tvec3<T, P> rotateZ
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<3, T, Q> rotateZ
(
- tvec3<T, P> const & v,
- T const & angle
+ vec<3, T, Q> const& v,
+ T const& angle
)
{
- tvec3<T, P> Result = v;
+ vec<3, T, Q> Result = v;
T const Cos(cos(angle));
T const Sin(sin(angle));
@@ -122,14 +122,14 @@ namespace glm
return Result;
}
- template <typename T, precision P>
- GLM_FUNC_QUALIFIER tvec4<T, P> rotateX
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<4, T, Q> rotateX
(
- tvec4<T, P> const & v,
- T const & angle
+ vec<4, T, Q> const& v,
+ T const& angle
)
{
- tvec4<T, P> Result = v;
+ vec<4, T, Q> Result = v;
T const Cos(cos(angle));
T const Sin(sin(angle));
@@ -138,14 +138,14 @@ namespace glm
return Result;
}
- template <typename T, precision P>
- GLM_FUNC_QUALIFIER tvec4<T, P> rotateY
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<4, T, Q> rotateY
(
- tvec4<T, P> const & v,
- T const & angle
+ vec<4, T, Q> const& v,
+ T const& angle
)
{
- tvec4<T, P> Result = v;
+ vec<4, T, Q> Result = v;
T const Cos(cos(angle));
T const Sin(sin(angle));
@@ -154,14 +154,14 @@ namespace glm
return Result;
}
- template <typename T, precision P>
- GLM_FUNC_QUALIFIER tvec4<T, P> rotateZ
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<4, T, Q> rotateZ
(
- tvec4<T, P> const & v,
- T const & angle
+ vec<4, T, Q> const& v,
+ T const& angle
)
{
- tvec4<T, P> Result = v;
+ vec<4, T, Q> Result = v;
T const Cos(cos(angle));
T const Sin(sin(angle));
@@ -170,17 +170,17 @@ namespace glm
return Result;
}
- template <typename T, precision P>
- GLM_FUNC_QUALIFIER tmat4x4<T, P> orientation
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, Q> orientation
(
- tvec3<T, P> const & Normal,
- tvec3<T, P> const & Up
+ vec<3, T, Q> const& Normal,
+ vec<3, T, Q> const& Up
)
{
if(all(equal(Normal, Up)))
- return tmat4x4<T, P>(T(1));
+ return mat<4, 4, T, Q>(T(1));
- tvec3<T, P> RotationAxis = cross(Up, Normal);
+ vec<3, T, Q> RotationAxis = cross(Up, Normal);
T Angle = acos(dot(Normal, Up));
return rotate(Angle, RotationAxis);