summaryrefslogtreecommitdiffstats
path: root/external/include/glm/gtx/rotate_normalized_axis.inl
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-08-21 17:40:38 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-08-21 17:40:38 +0200
commit2877f4eda3d1b0c7431039e3142ecf1a282a34b1 (patch)
tree58ad35e27ab2a3b8955f5adbf28f296670681ffc /external/include/glm/gtx/rotate_normalized_axis.inl
parentSmooth sun movement (diff)
downloadAltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar
AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar.gz
AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar.bz2
AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar.lz
AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar.xz
AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar.zst
AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.zip
Diffstat (limited to 'external/include/glm/gtx/rotate_normalized_axis.inl')
-rw-r--r--external/include/glm/gtx/rotate_normalized_axis.inl34
1 files changed, 17 insertions, 17 deletions
diff --git a/external/include/glm/gtx/rotate_normalized_axis.inl b/external/include/glm/gtx/rotate_normalized_axis.inl
index dc1b1a8..66e0910 100644
--- a/external/include/glm/gtx/rotate_normalized_axis.inl
+++ b/external/include/glm/gtx/rotate_normalized_axis.inl
@@ -3,23 +3,23 @@
namespace glm
{
- template <typename T, precision P>
- GLM_FUNC_QUALIFIER tmat4x4<T, P> rotateNormalizedAxis
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, Q> rotateNormalizedAxis
(
- tmat4x4<T, P> const & m,
- T const & angle,
- tvec3<T, P> const & v
+ mat<4, 4, T, Q> const& m,
+ T const& angle,
+ vec<3, T, Q> const& v
)
{
T const a = angle;
T const c = cos(a);
T const s = sin(a);
- tvec3<T, P> const axis(v);
+ vec<3, T, Q> const axis(v);
- tvec3<T, P> const temp((static_cast<T>(1) - c) * axis);
+ vec<3, T, Q> const temp((static_cast<T>(1) - c) * axis);
- tmat4x4<T, P> Rotate(uninitialize);
+ mat<4, 4, T, Q> Rotate;
Rotate[0][0] = c + temp[0] * axis[0];
Rotate[0][1] = 0 + temp[0] * axis[1] + s * axis[2];
Rotate[0][2] = 0 + temp[0] * axis[2] - s * axis[1];
@@ -32,7 +32,7 @@ namespace glm
Rotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0];
Rotate[2][2] = c + temp[2] * axis[2];
- tmat4x4<T, P> Result(uninitialize);
+ mat<4, 4, T, Q> Result;
Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2];
Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2];
Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2];
@@ -40,20 +40,20 @@ namespace glm
return Result;
}
- template <typename T, precision P>
- GLM_FUNC_QUALIFIER tquat<T, P> rotateNormalizedAxis
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER tquat<T, Q> rotateNormalizedAxis
(
- tquat<T, P> const & q,
- T const & angle,
- tvec3<T, P> const & v
+ tquat<T, Q> const& q,
+ T const& angle,
+ vec<3, T, Q> const& v
)
{
- tvec3<T, P> const Tmp(v);
+ vec<3, T, Q> const Tmp(v);
T const AngleRad(angle);
T const Sin = sin(AngleRad * T(0.5));
- return q * tquat<T, P>(cos(AngleRad * static_cast<T>(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin);
- //return gtc::quaternion::cross(q, tquat<T, P>(cos(AngleRad * T(0.5)), Tmp.x * fSin, Tmp.y * fSin, Tmp.z * fSin));
+ return q * tquat<T, Q>(cos(AngleRad * static_cast<T>(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin);
+ //return gtc::quaternion::cross(q, tquat<T, Q>(cos(AngleRad * T(0.5)), Tmp.x * fSin, Tmp.y * fSin, Tmp.z * fSin));
}
}//namespace glm