Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2015-12-13 10:33:35 +0300
committerJoshua Leung <aligorith@gmail.com>2015-12-13 10:33:35 +0300
commitef2aecf2db981b5344e0d14e7f074f1742b0b2f7 (patch)
treed016e95050f10eda7bc44e1bdfa2f7c4fc0fc024 /intern/moto/intern/MT_CmMatrix4x4.cpp
parentcf8980559fdc2e9731d9229512a554212173ea4f (diff)
parentd9ee88d126ddb59b68d2561694b522a99e4923b6 (diff)
Merge branch 'master' into GPencil_Editing_Stage3GPencil_Editing_Stage3
Diffstat (limited to 'intern/moto/intern/MT_CmMatrix4x4.cpp')
-rw-r--r--intern/moto/intern/MT_CmMatrix4x4.cpp36
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;
}