diff options
Diffstat (limited to 'intern/moto/intern/MT_CmMatrix4x4.cpp')
-rw-r--r-- | intern/moto/intern/MT_CmMatrix4x4.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/intern/moto/intern/MT_CmMatrix4x4.cpp b/intern/moto/intern/MT_CmMatrix4x4.cpp index 7a04864e48d..38c93b92761 100644 --- a/intern/moto/intern/MT_CmMatrix4x4.cpp +++ b/intern/moto/intern/MT_CmMatrix4x4.cpp @@ -42,7 +42,7 @@ MT_CmMatrix4x4::MT_CmMatrix4x4() -MT_CmMatrix4x4::MT_CmMatrix4x4(const float value[4][4]) +MT_CmMatrix4x4::MT_CmMatrix4x4(const MT_Scalar value[4][4]) { for (int i=0;i<4;i++) { @@ -53,7 +53,7 @@ MT_CmMatrix4x4::MT_CmMatrix4x4(const float value[4][4]) -MT_CmMatrix4x4::MT_CmMatrix4x4(const double value[16]) +MT_CmMatrix4x4::MT_CmMatrix4x4(const MT_Scalar value[16]) { for (int i=0;i<16;i++) m_Vflat[i] = value[i]; @@ -148,21 +148,21 @@ void MT_CmMatrix4x4::SetMatrix(const MT_CmMatrix4x4& other) -double* MT_CmMatrix4x4::getPointer() +MT_Scalar* MT_CmMatrix4x4::getPointer() { return &m_V[0][0]; } -const double* MT_CmMatrix4x4::getPointer() const +const MT_Scalar* MT_CmMatrix4x4::getPointer() const { return &m_V[0][0]; } -void MT_CmMatrix4x4::setElem(int pos,double newvalue) +void MT_CmMatrix4x4::setElem(int pos,MT_Scalar newvalue) { m_Vflat[pos] = newvalue; } @@ -179,28 +179,28 @@ MT_CmMatrix4x4 MT_CmMatrix4x4::Perspective( MT_CmMatrix4x4 mat; // Column 0 - mat(0, 0) = -(2.0*inNear) / (inRight-inLeft); - mat(1, 0) = 0; - mat(2, 0) = 0; - mat(3, 0) = 0; + mat(0, 0) = -(2.0f*inNear) / (inRight-inLeft); + mat(1, 0) = 0.0f; + mat(2, 0) = 0.0f; + mat(3, 0) = 0.0f; // Column 1 - mat(0, 1) = 0; - mat(1, 1) = (2.0*inNear) / (inTop-inBottom); - mat(2, 1) = 0; - mat(3, 1) = 0; + mat(0, 1) = 0.0f; + mat(1, 1) = (2.0f*inNear) / (inTop-inBottom); + mat(2, 1) = 0.0f; + mat(3, 1) = 0.0f; // Column 2 mat(0, 2) = (inRight+inLeft) / (inRight-inLeft); mat(1, 2) = (inTop+inBottom) / (inTop-inBottom); mat(2, 2) = -(inFar+inNear) / (inFar-inNear); - mat(3, 2) = -1; + mat(3, 2) = -1.0f; // Column 3 - mat(0, 3) = 0; - mat(1, 3) = 0; - mat(2, 3) = -(2.0*inFar*inNear) / (inFar-inNear); - mat(3, 3) = 0; + mat(0, 3) = 0.0f; + mat(1, 3) = 0.0f; + mat(2, 3) = -(2.0f*inFar*inNear) / (inFar-inNear); + mat(3, 3) = 0.0f; return mat; } |