Fixed declaration and definision mismatches (#148)
This commit is contained in:
parent
c6896064ef
commit
aed7317408
@ -275,7 +275,7 @@ namespace detail
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat2x2<T, P> tmat2x2<T, P>::_inverse() const
|
GLM_FUNC_QUALIFIER tmat2x2<T, P> tmat2x2<T, P>::_inverse() const
|
||||||
{
|
{
|
||||||
typename tmat2x2<T, P>::value_type Determinant = this->value[0][0] * this->value[1][1] - this->value[1][0] * this->value[0][1];
|
T Determinant = this->value[0][0] * this->value[1][1] - this->value[1][0] * this->value[0][1];
|
||||||
|
|
||||||
tmat2x2<T, P> Inverse(
|
tmat2x2<T, P> Inverse(
|
||||||
+ this->value[1][1] / Determinant,
|
+ this->value[1][1] / Determinant,
|
||||||
|
|||||||
@ -500,19 +500,19 @@ namespace detail
|
|||||||
tmat3x2<T, P> const & m2
|
tmat3x2<T, P> const & m2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
typename tmat2x3<T, P>::value_type SrcA00 = m1[0][0];
|
T SrcA00 = m1[0][0];
|
||||||
typename tmat2x3<T, P>::value_type SrcA01 = m1[0][1];
|
T SrcA01 = m1[0][1];
|
||||||
typename tmat2x3<T, P>::value_type SrcA02 = m1[0][2];
|
T SrcA02 = m1[0][2];
|
||||||
typename tmat2x3<T, P>::value_type SrcA10 = m1[1][0];
|
T SrcA10 = m1[1][0];
|
||||||
typename tmat2x3<T, P>::value_type SrcA11 = m1[1][1];
|
T SrcA11 = m1[1][1];
|
||||||
typename tmat2x3<T, P>::value_type SrcA12 = m1[1][2];
|
T SrcA12 = m1[1][2];
|
||||||
|
|
||||||
typename tmat2x3<T, P>::value_type SrcB00 = m2[0][0];
|
T SrcB00 = m2[0][0];
|
||||||
typename tmat2x3<T, P>::value_type SrcB01 = m2[0][1];
|
T SrcB01 = m2[0][1];
|
||||||
typename tmat2x3<T, P>::value_type SrcB10 = m2[1][0];
|
T SrcB10 = m2[1][0];
|
||||||
typename tmat2x3<T, P>::value_type SrcB11 = m2[1][1];
|
T SrcB11 = m2[1][1];
|
||||||
typename tmat2x3<T, P>::value_type SrcB20 = m2[2][0];
|
T SrcB20 = m2[2][0];
|
||||||
typename tmat2x3<T, P>::value_type SrcB21 = m2[2][1];
|
T SrcB21 = m2[2][1];
|
||||||
|
|
||||||
tmat3x3<T, P> Result(tmat3x3<T, P>::null);
|
tmat3x3<T, P> Result(tmat3x3<T, P>::null);
|
||||||
Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01;
|
Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01;
|
||||||
|
|||||||
@ -490,23 +490,23 @@ namespace detail
|
|||||||
tmat4x2<T, P> const & m2
|
tmat4x2<T, P> const & m2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
typename tmat2x4<T, P>::value_type SrcA00 = m1[0][0];
|
T SrcA00 = m1[0][0];
|
||||||
typename tmat2x4<T, P>::value_type SrcA01 = m1[0][1];
|
T SrcA01 = m1[0][1];
|
||||||
typename tmat2x4<T, P>::value_type SrcA02 = m1[0][2];
|
T SrcA02 = m1[0][2];
|
||||||
typename tmat2x4<T, P>::value_type SrcA03 = m1[0][3];
|
T SrcA03 = m1[0][3];
|
||||||
typename tmat2x4<T, P>::value_type SrcA10 = m1[1][0];
|
T SrcA10 = m1[1][0];
|
||||||
typename tmat2x4<T, P>::value_type SrcA11 = m1[1][1];
|
T SrcA11 = m1[1][1];
|
||||||
typename tmat2x4<T, P>::value_type SrcA12 = m1[1][2];
|
T SrcA12 = m1[1][2];
|
||||||
typename tmat2x4<T, P>::value_type SrcA13 = m1[1][3];
|
T SrcA13 = m1[1][3];
|
||||||
|
|
||||||
typename tmat2x4<T, P>::value_type SrcB00 = m2[0][0];
|
T SrcB00 = m2[0][0];
|
||||||
typename tmat2x4<T, P>::value_type SrcB01 = m2[0][1];
|
T SrcB01 = m2[0][1];
|
||||||
typename tmat2x4<T, P>::value_type SrcB10 = m2[1][0];
|
T SrcB10 = m2[1][0];
|
||||||
typename tmat2x4<T, P>::value_type SrcB11 = m2[1][1];
|
T SrcB11 = m2[1][1];
|
||||||
typename tmat2x4<T, P>::value_type SrcB20 = m2[2][0];
|
T SrcB20 = m2[2][0];
|
||||||
typename tmat2x4<T, P>::value_type SrcB21 = m2[2][1];
|
T SrcB21 = m2[2][1];
|
||||||
typename tmat2x4<T, P>::value_type SrcB30 = m2[3][0];
|
T SrcB30 = m2[3][0];
|
||||||
typename tmat2x4<T, P>::value_type SrcB31 = m2[3][1];
|
T SrcB31 = m2[3][1];
|
||||||
|
|
||||||
tmat4x4<T, P> Result(tmat4x4<T, P>::null);
|
tmat4x4<T, P> Result(tmat4x4<T, P>::null);
|
||||||
Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01;
|
Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01;
|
||||||
|
|||||||
@ -615,25 +615,25 @@ namespace detail
|
|||||||
tmat3x3<T, P> const & m2
|
tmat3x3<T, P> const & m2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
typename tmat3x3<T, P>::value_type const SrcA00 = m1[0][0];
|
T const SrcA00 = m1[0][0];
|
||||||
typename tmat3x3<T, P>::value_type const SrcA01 = m1[0][1];
|
T const SrcA01 = m1[0][1];
|
||||||
typename tmat3x3<T, P>::value_type const SrcA02 = m1[0][2];
|
T const SrcA02 = m1[0][2];
|
||||||
typename tmat3x3<T, P>::value_type const SrcA10 = m1[1][0];
|
T const SrcA10 = m1[1][0];
|
||||||
typename tmat3x3<T, P>::value_type const SrcA11 = m1[1][1];
|
T const SrcA11 = m1[1][1];
|
||||||
typename tmat3x3<T, P>::value_type const SrcA12 = m1[1][2];
|
T const SrcA12 = m1[1][2];
|
||||||
typename tmat3x3<T, P>::value_type const SrcA20 = m1[2][0];
|
T const SrcA20 = m1[2][0];
|
||||||
typename tmat3x3<T, P>::value_type const SrcA21 = m1[2][1];
|
T const SrcA21 = m1[2][1];
|
||||||
typename tmat3x3<T, P>::value_type const SrcA22 = m1[2][2];
|
T const SrcA22 = m1[2][2];
|
||||||
|
|
||||||
typename tmat3x3<T, P>::value_type const SrcB00 = m2[0][0];
|
T const SrcB00 = m2[0][0];
|
||||||
typename tmat3x3<T, P>::value_type const SrcB01 = m2[0][1];
|
T const SrcB01 = m2[0][1];
|
||||||
typename tmat3x3<T, P>::value_type const SrcB02 = m2[0][2];
|
T const SrcB02 = m2[0][2];
|
||||||
typename tmat3x3<T, P>::value_type const SrcB10 = m2[1][0];
|
T const SrcB10 = m2[1][0];
|
||||||
typename tmat3x3<T, P>::value_type const SrcB11 = m2[1][1];
|
T const SrcB11 = m2[1][1];
|
||||||
typename tmat3x3<T, P>::value_type const SrcB12 = m2[1][2];
|
T const SrcB12 = m2[1][2];
|
||||||
typename tmat3x3<T, P>::value_type const SrcB20 = m2[2][0];
|
T const SrcB20 = m2[2][0];
|
||||||
typename tmat3x3<T, P>::value_type const SrcB21 = m2[2][1];
|
T const SrcB21 = m2[2][1];
|
||||||
typename tmat3x3<T, P>::value_type const SrcB22 = m2[2][2];
|
T const SrcB22 = m2[2][2];
|
||||||
|
|
||||||
tmat3x3<T, P> Result(tmat3x3<T, P>::_null);
|
tmat3x3<T, P> Result(tmat3x3<T, P>::_null);
|
||||||
Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02;
|
Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02;
|
||||||
|
|||||||
@ -897,10 +897,10 @@ namespace detail
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
return tmat4x4<T, P>(
|
return tmat4x4<T, P>(
|
||||||
m[0] + typename tmat4x4<T, P>::value_type(1),
|
m[0] + static_cast<T>(1),
|
||||||
m[1] + typename tmat4x4<T, P>::value_type(1),
|
m[1] + static_cast<T>(1),
|
||||||
m[2] + typename tmat4x4<T, P>::value_type(1),
|
m[2] + static_cast<T>(1),
|
||||||
m[3] + typename tmat4x4<T, P>::value_type(1));
|
m[3] + static_cast<T>(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
@ -911,10 +911,10 @@ namespace detail
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
return tmat4x4<T, P>(
|
return tmat4x4<T, P>(
|
||||||
m[0] - typename tmat4x4<T, P>::value_type(1),
|
m[0] - static_cast<T>(1),
|
||||||
m[1] - typename tmat4x4<T, P>::value_type(1),
|
m[1] - static_cast<T>(1),
|
||||||
m[2] - typename tmat4x4<T, P>::value_type(1),
|
m[2] - static_cast<T>(1),
|
||||||
m[3] - typename tmat4x4<T, P>::value_type(1));
|
m[3] - static_cast<T>(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
|
|||||||
@ -289,7 +289,7 @@ namespace detail
|
|||||||
// Lerp is only defined in [0, 1]
|
// Lerp is only defined in [0, 1]
|
||||||
assert(a >= static_cast<T>(0));
|
assert(a >= static_cast<T>(0));
|
||||||
assert(a <= static_cast<T>(1));
|
assert(a <= static_cast<T>(1));
|
||||||
T const k = dot(x.real,y.real) < detail::tdualquat<T, P>::value_type(0) ? -a : a;
|
T const k = dot(x.real,y.real) < static_cast<T>(0) ? -a : a;
|
||||||
T const one(1);
|
T const one(1);
|
||||||
return detail::tdualquat<T, P>(x * (one - a) + y * k);
|
return detail::tdualquat<T, P>(x * (one - a) + y * k);
|
||||||
}
|
}
|
||||||
@ -304,15 +304,7 @@ namespace detail
|
|||||||
const glm::detail::tquat<T, P> dual = conjugate(q.dual);
|
const glm::detail::tquat<T, P> dual = conjugate(q.dual);
|
||||||
return detail::tdualquat<T, P>(real, dual + (real * (-2.0f * dot(real,dual))));
|
return detail::tdualquat<T, P>(real, dual + (real * (-2.0f * dot(real,dual))));
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
template <typename T, precision P>
|
|
||||||
GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> mat3_cast
|
|
||||||
(
|
|
||||||
detail::tdualquat<T, P> const & x
|
|
||||||
)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER detail::tmat2x4<T, P> mat2x4_cast
|
GLM_FUNC_QUALIFIER detail::tmat2x4<T, P> mat2x4_cast
|
||||||
(
|
(
|
||||||
|
|||||||
@ -74,7 +74,7 @@ namespace glm
|
|||||||
template <typename genType>
|
template <typename genType>
|
||||||
bool intersectRaySphere(
|
bool intersectRaySphere(
|
||||||
genType const & rayStarting, genType const & rayNormalizedDirection,
|
genType const & rayStarting, genType const & rayNormalizedDirection,
|
||||||
genType const & sphereCenter, const typename genType::value_type sphereRadiusSquered,
|
genType const & sphereCenter, typename genType::value_type const sphereRadiusSquered,
|
||||||
typename genType::value_type & intersectionDistance);
|
typename genType::value_type & intersectionDistance);
|
||||||
|
|
||||||
//! Compute the intersection of a ray and a sphere.
|
//! Compute the intersection of a ray and a sphere.
|
||||||
|
|||||||
@ -79,7 +79,7 @@ namespace glm
|
|||||||
template<typename genType>
|
template<typename genType>
|
||||||
bool isIdentity(
|
bool isIdentity(
|
||||||
genType const & m,
|
genType const & m,
|
||||||
typename genType::T const & epsilon/* = std::numeric_limits<typename genType::value_type>::epsilon()*/);
|
typename genType::value_type const & epsilon/* = std::numeric_limits<typename genType::value_type>::epsilon()*/);
|
||||||
|
|
||||||
/// Return whether a matrix is a normalized matrix.
|
/// Return whether a matrix is a normalized matrix.
|
||||||
/// From GLM_GTX_matrix_query extension.
|
/// From GLM_GTX_matrix_query extension.
|
||||||
|
|||||||
@ -74,7 +74,7 @@ namespace glm
|
|||||||
GLM_FUNC_QUALIFIER detail::tquat<T, P> rotateNormalizedAxis
|
GLM_FUNC_QUALIFIER detail::tquat<T, P> rotateNormalizedAxis
|
||||||
(
|
(
|
||||||
detail::tquat<T, P> const & q,
|
detail::tquat<T, P> const & q,
|
||||||
typename detail::tquat<T, P>::T const & angle,
|
T const & angle,
|
||||||
detail::tvec3<T, P> const & v
|
detail::tvec3<T, P> const & v
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -88,7 +88,7 @@ namespace glm
|
|||||||
#endif
|
#endif
|
||||||
T const Sin = sin(AngleRad * T(0.5));
|
T const Sin = sin(AngleRad * T(0.5));
|
||||||
|
|
||||||
return q * detail::tquat<T, P>(cos(AngleRad * T(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin);
|
return q * detail::tquat<T, P>(cos(AngleRad * static_cast<T>(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin);
|
||||||
//return gtc::quaternion::cross(q, detail::tquat<T, P>(cos(AngleRad * T(0.5)), Tmp.x * fSin, Tmp.y * fSin, Tmp.z * fSin));
|
//return gtc::quaternion::cross(q, detail::tquat<T, P>(cos(AngleRad * T(0.5)), Tmp.x * fSin, Tmp.y * fSin, Tmp.z * fSin));
|
||||||
}
|
}
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|||||||
@ -58,7 +58,7 @@ namespace glm
|
|||||||
bool areCollinear(
|
bool areCollinear(
|
||||||
genType const & v0,
|
genType const & v0,
|
||||||
genType const & v1,
|
genType const & v1,
|
||||||
typename genType::T const & epsilon);
|
typename genType::value_type const & epsilon);
|
||||||
|
|
||||||
//! Check whether two vectors are orthogonals.
|
//! Check whether two vectors are orthogonals.
|
||||||
/// @see gtx_vector_query extensions.
|
/// @see gtx_vector_query extensions.
|
||||||
@ -66,7 +66,7 @@ namespace glm
|
|||||||
bool areOrthogonal(
|
bool areOrthogonal(
|
||||||
genType const & v0,
|
genType const & v0,
|
||||||
genType const & v1,
|
genType const & v1,
|
||||||
typename genType::T const & epsilon);
|
typename genType::value_type const & epsilon);
|
||||||
|
|
||||||
//! Check whether a vector is normalized.
|
//! Check whether a vector is normalized.
|
||||||
/// @see gtx_vector_query extensions.
|
/// @see gtx_vector_query extensions.
|
||||||
@ -102,7 +102,7 @@ namespace glm
|
|||||||
bool areOrthonormal(
|
bool areOrthonormal(
|
||||||
genType const & v0,
|
genType const & v0,
|
||||||
genType const & v1,
|
genType const & v1,
|
||||||
typename genType::T const & epsilon);
|
typename genType::value_type const & epsilon);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}// namespace glm
|
}// namespace glm
|
||||||
|
|||||||
@ -43,8 +43,7 @@ GLM 0.9.5.1: 2014-XX-XX
|
|||||||
- Deprecated degrees for function parameters and display a message
|
- Deprecated degrees for function parameters and display a message
|
||||||
- Added possible static_cast conversion of GLM types (#72)
|
- Added possible static_cast conversion of GLM types (#72)
|
||||||
- Fixed error 'inverse' is not a member of 'glm' from glm::unProject (#146)
|
- Fixed error 'inverse' is not a member of 'glm' from glm::unProject (#146)
|
||||||
- Fixed mismatch of GTC_packing declaration and definition prototypes
|
- Fixed mismatch between some declarations and definitions
|
||||||
- Fixed rotate declaration for quat rotate function
|
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
GLM 0.9.5.0: 2013-12-25
|
GLM 0.9.5.0: 2013-12-25
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user