mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-19 08:40:24 +01:00
Avoid warnings when working with CMatrix4<f64>
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6303 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
c20d3d08b6
commit
c5fd5bc4cd
@ -1155,10 +1155,10 @@ namespace core
|
|||||||
template <class T>
|
template <class T>
|
||||||
inline void CMatrix4<T>::rotateVect( vector3df& vect ) const
|
inline void CMatrix4<T>::rotateVect( vector3df& vect ) const
|
||||||
{
|
{
|
||||||
vector3df tmp = vect;
|
vector3d<T> tmp(static_cast<T>(vect.X), static_cast<T>(vect.Y), static_cast<T>(vect.Z));
|
||||||
vect.X = tmp.X*M[0] + tmp.Y*M[4] + tmp.Z*M[8];
|
vect.X = static_cast<f32>(tmp.X*M[0] + tmp.Y*M[4] + tmp.Z*M[8]);
|
||||||
vect.Y = tmp.X*M[1] + tmp.Y*M[5] + tmp.Z*M[9];
|
vect.Y = static_cast<f32>(tmp.X*M[1] + tmp.Y*M[5] + tmp.Z*M[9]);
|
||||||
vect.Z = tmp.X*M[2] + tmp.Y*M[6] + tmp.Z*M[10];
|
vect.Z = static_cast<f32>(tmp.X*M[2] + tmp.Y*M[6] + tmp.Z*M[10]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! An alternate transform vector method, writing into a second vector
|
//! An alternate transform vector method, writing into a second vector
|
||||||
@ -1182,10 +1182,10 @@ namespace core
|
|||||||
template <class T>
|
template <class T>
|
||||||
inline void CMatrix4<T>::inverseRotateVect( vector3df& vect ) const
|
inline void CMatrix4<T>::inverseRotateVect( vector3df& vect ) const
|
||||||
{
|
{
|
||||||
vector3df tmp = vect;
|
vector3d<T> tmp(static_cast<T>(vect.X), static_cast<T>(vect.Y), static_cast<T>(vect.Z));
|
||||||
vect.X = tmp.X*M[0] + tmp.Y*M[1] + tmp.Z*M[2];
|
vect.X = static_cast<f32>(tmp.X*M[0] + tmp.Y*M[1] + tmp.Z*M[2]);
|
||||||
vect.Y = tmp.X*M[4] + tmp.Y*M[5] + tmp.Z*M[6];
|
vect.Y = static_cast<f32>(tmp.X*M[4] + tmp.Y*M[5] + tmp.Z*M[6]);
|
||||||
vect.Z = tmp.X*M[8] + tmp.Y*M[9] + tmp.Z*M[10];
|
vect.Z = static_cast<f32>(tmp.X*M[8] + tmp.Y*M[9] + tmp.Z*M[10]);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
|
Loading…
Reference in New Issue
Block a user