summaryrefslogtreecommitdiffstats
path: root/src/gui/math3d
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-01-13 15:18:37 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2011-01-13 15:18:37 (GMT)
commit83dc0f2bc78336d117f4842d0b030cc5f0a41eb4 (patch)
treedfbe406eafc21343c65925234365f1fb276c1f04 /src/gui/math3d
parente63c88ac355f9b8b029faab599fb35756f22fb2e (diff)
parent9ff210a8ba748ce3d46441886c8feb407e3aa9a6 (diff)
downloadQt-83dc0f2bc78336d117f4842d0b030cc5f0a41eb4.zip
Qt-83dc0f2bc78336d117f4842d0b030cc5f0a41eb4.tar.gz
Qt-83dc0f2bc78336d117f4842d0b030cc5f0a41eb4.tar.bz2
Merge branch '4.7' of ../qt into 4.7
Conflicts: doc/src/declarative/qdeclarativeintro.qdoc doc/src/declarative/qdeclarativereference.qdoc doc/src/snippets/declarative/focus/focusColumn.qml tools/qdoc3/apigenerator.cpp tools/qdoc3/apigenerator.h tools/qdoc3/archiveextractor.cpp tools/qdoc3/bookgenerator.cpp tools/qdoc3/bookgenerator.h tools/qdoc3/ccodeparser.cpp tools/qdoc3/command.cpp tools/qdoc3/command.h tools/qdoc3/cpptoqsconverter.cpp tools/qdoc3/dcfsection.cpp tools/qdoc3/dcfsection.h tools/qdoc3/jambiapiparser.cpp tools/qdoc3/jambiapiparser.h tools/qdoc3/javacodemarker.cpp tools/qdoc3/javacodemarker.h tools/qdoc3/javadocgenerator.cpp tools/qdoc3/javadocgenerator.h tools/qdoc3/linguistgenerator.cpp tools/qdoc3/linguistgenerator.h tools/qdoc3/loutgenerator.h tools/qdoc3/mangenerator.cpp tools/qdoc3/mangenerator.h tools/qdoc3/polyarchiveextractor.cpp tools/qdoc3/polyarchiveextractor.h tools/qdoc3/polyuncompressor.cpp tools/qdoc3/polyuncompressor.h tools/qdoc3/qsakernelparser.cpp tools/qdoc3/qscodemarker.cpp tools/qdoc3/qscodemarker.h tools/qdoc3/qscodeparser.cpp tools/qdoc3/qscodeparser.h tools/qdoc3/sgmlgenerator.cpp tools/qdoc3/sgmlgenerator.h tools/qdoc3/test/qt-html-templates.qdocconf tools/qdoc3/uncompressor.cpp tools/qdoc3/webxmlgenerator.cpp tools/qdoc3/webxmlgenerator.h
Diffstat (limited to 'src/gui/math3d')
-rw-r--r--src/gui/math3d/qgenericmatrix.cpp2
-rw-r--r--src/gui/math3d/qgenericmatrix.h70
-rw-r--r--src/gui/math3d/qmatrix4x4.cpp2
-rw-r--r--src/gui/math3d/qmatrix4x4.h2
-rw-r--r--src/gui/math3d/qquaternion.cpp2
-rw-r--r--src/gui/math3d/qquaternion.h2
-rw-r--r--src/gui/math3d/qvector2d.cpp2
-rw-r--r--src/gui/math3d/qvector2d.h2
-rw-r--r--src/gui/math3d/qvector3d.cpp2
-rw-r--r--src/gui/math3d/qvector3d.h2
-rw-r--r--src/gui/math3d/qvector4d.cpp2
-rw-r--r--src/gui/math3d/qvector4d.h2
12 files changed, 52 insertions, 40 deletions
diff --git a/src/gui/math3d/qgenericmatrix.cpp b/src/gui/math3d/qgenericmatrix.cpp
index be30cb6..922f5e0 100644
--- a/src/gui/math3d/qgenericmatrix.cpp
+++ b/src/gui/math3d/qgenericmatrix.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/math3d/qgenericmatrix.h b/src/gui/math3d/qgenericmatrix.h
index 3224ae2..d9aef20 100644
--- a/src/gui/math3d/qgenericmatrix.h
+++ b/src/gui/math3d/qgenericmatrix.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -198,52 +198,58 @@ Q_OUTOFLINE_TEMPLATE QGenericMatrix<M, N, T> QGenericMatrix<N, M, T>::transposed
template <int N, int M, typename T>
Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T>& QGenericMatrix<N, M, T>::operator+=(const QGenericMatrix<N, M, T>& other)
{
- for (int index = 0; index < N * M; ++index)
- m[0][index] += other.m[0][index];
+ for (int row = 0; row < M; ++row)
+ for (int col = 0; col < N; ++col)
+ m[col][row] += other.m[col][row];
return *this;
}
template <int N, int M, typename T>
Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T>& QGenericMatrix<N, M, T>::operator-=(const QGenericMatrix<N, M, T>& other)
{
- for (int index = 0; index < N * M; ++index)
- m[0][index] -= other.m[0][index];
+ for (int row = 0; row < M; ++row)
+ for (int col = 0; col < N; ++col)
+ m[col][row] -= other.m[col][row];
return *this;
}
template <int N, int M, typename T>
Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T>& QGenericMatrix<N, M, T>::operator*=(T factor)
{
- for (int index = 0; index < N * M; ++index)
- m[0][index] *= factor;
+ for (int row = 0; row < M; ++row)
+ for (int col = 0; col < N; ++col)
+ m[col][row] *= factor;
return *this;
}
template <int N, int M, typename T>
Q_OUTOFLINE_TEMPLATE bool QGenericMatrix<N, M, T>::operator==(const QGenericMatrix<N, M, T>& other) const
{
- for (int index = 0; index < N * M; ++index) {
- if (m[0][index] != other.m[0][index])
- return false;
- }
+ for (int row = 0; row < M; ++row)
+ for (int col = 0; col < N; ++col) {
+ if (m[col][row] != other.m[col][row])
+ return false;
+ }
return true;
}
template <int N, int M, typename T>
Q_OUTOFLINE_TEMPLATE bool QGenericMatrix<N, M, T>::operator!=(const QGenericMatrix<N, M, T>& other) const
{
- for (int index = 0; index < N * M; ++index) {
- if (m[0][index] != other.m[0][index])
- return true;
- }
+ for (int row = 0; row < M; ++row)
+ for (int col = 0; col < N; ++col) {
+ if (m[col][row] != other.m[col][row])
+ return true;
+ }
return false;
}
template <int N, int M, typename T>
Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T>& QGenericMatrix<N, M, T>::operator/=(T divisor)
{
- for (int index = 0; index < N * M; ++index)
- m[0][index] /= divisor;
+ for (int row = 0; row < M; ++row)
+ for (int col = 0; col < N; ++col)
+ m[col][row] /= divisor;
return *this;
}
@@ -251,8 +257,9 @@ template <int N, int M, typename T>
Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T> operator+(const QGenericMatrix<N, M, T>& m1, const QGenericMatrix<N, M, T>& m2)
{
QGenericMatrix<N, M, T> result(1);
- for (int index = 0; index < N * M; ++index)
- result.m[0][index] = m1.m[0][index] + m2.m[0][index];
+ for (int row = 0; row < M; ++row)
+ for (int col = 0; col < N; ++col)
+ result.m[col][row] = m1.m[col][row] + m2.m[col][row];
return result;
}
@@ -260,8 +267,9 @@ template <int N, int M, typename T>
Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T> operator-(const QGenericMatrix<N, M, T>& m1, const QGenericMatrix<N, M, T>& m2)
{
QGenericMatrix<N, M, T> result(1);
- for (int index = 0; index < N * M; ++index)
- result.m[0][index] = m1.m[0][index] - m2.m[0][index];
+ for (int row = 0; row < M; ++row)
+ for (int col = 0; col < N; ++col)
+ result.m[col][row] = m1.m[col][row] - m2.m[col][row];
return result;
}
@@ -284,8 +292,9 @@ template <int N, int M, typename T>
Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T> operator-(const QGenericMatrix<N, M, T>& matrix)
{
QGenericMatrix<N, M, T> result(1);
- for (int index = 0; index < N * M; ++index)
- result.m[0][index] = -matrix.m[0][index];
+ for (int row = 0; row < M; ++row)
+ for (int col = 0; col < N; ++col)
+ result.m[col][row] = -matrix.m[col][row];
return result;
}
@@ -293,8 +302,9 @@ template <int N, int M, typename T>
Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T> operator*(T factor, const QGenericMatrix<N, M, T>& matrix)
{
QGenericMatrix<N, M, T> result(1);
- for (int index = 0; index < N * M; ++index)
- result.m[0][index] = matrix.m[0][index] * factor;
+ for (int row = 0; row < M; ++row)
+ for (int col = 0; col < N; ++col)
+ result.m[col][row] = matrix.m[col][row] * factor;
return result;
}
@@ -302,8 +312,9 @@ template <int N, int M, typename T>
Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T> operator*(const QGenericMatrix<N, M, T>& matrix, T factor)
{
QGenericMatrix<N, M, T> result(1);
- for (int index = 0; index < N * M; ++index)
- result.m[0][index] = matrix.m[0][index] * factor;
+ for (int row = 0; row < M; ++row)
+ for (int col = 0; col < N; ++col)
+ result.m[col][row] = matrix.m[col][row] * factor;
return result;
}
@@ -311,8 +322,9 @@ template <int N, int M, typename T>
Q_OUTOFLINE_TEMPLATE QGenericMatrix<N, M, T> operator/(const QGenericMatrix<N, M, T>& matrix, T divisor)
{
QGenericMatrix<N, M, T> result(1);
- for (int index = 0; index < N * M; ++index)
- result.m[0][index] = matrix.m[0][index] / divisor;
+ for (int row = 0; row < M; ++row)
+ for (int col = 0; col < N; ++col)
+ result.m[col][row] = matrix.m[col][row] / divisor;
return result;
}
diff --git a/src/gui/math3d/qmatrix4x4.cpp b/src/gui/math3d/qmatrix4x4.cpp
index 16c7f97..e839b25 100644
--- a/src/gui/math3d/qmatrix4x4.cpp
+++ b/src/gui/math3d/qmatrix4x4.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/math3d/qmatrix4x4.h b/src/gui/math3d/qmatrix4x4.h
index 0671fa8..6d8a68b 100644
--- a/src/gui/math3d/qmatrix4x4.h
+++ b/src/gui/math3d/qmatrix4x4.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/math3d/qquaternion.cpp b/src/gui/math3d/qquaternion.cpp
index 2fd66eb..0819afe 100644
--- a/src/gui/math3d/qquaternion.cpp
+++ b/src/gui/math3d/qquaternion.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/math3d/qquaternion.h b/src/gui/math3d/qquaternion.h
index 16aa5d0..24c41a0 100644
--- a/src/gui/math3d/qquaternion.h
+++ b/src/gui/math3d/qquaternion.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/math3d/qvector2d.cpp b/src/gui/math3d/qvector2d.cpp
index 6a5cfc8..7f5a937 100644
--- a/src/gui/math3d/qvector2d.cpp
+++ b/src/gui/math3d/qvector2d.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/math3d/qvector2d.h b/src/gui/math3d/qvector2d.h
index c92c5e0..089caf3 100644
--- a/src/gui/math3d/qvector2d.h
+++ b/src/gui/math3d/qvector2d.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/math3d/qvector3d.cpp b/src/gui/math3d/qvector3d.cpp
index dfcce0e..2414b5f 100644
--- a/src/gui/math3d/qvector3d.cpp
+++ b/src/gui/math3d/qvector3d.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/math3d/qvector3d.h b/src/gui/math3d/qvector3d.h
index 2fdd1d3..c33cf42 100644
--- a/src/gui/math3d/qvector3d.h
+++ b/src/gui/math3d/qvector3d.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/math3d/qvector4d.cpp b/src/gui/math3d/qvector4d.cpp
index abff1ba..74dedc4 100644
--- a/src/gui/math3d/qvector4d.cpp
+++ b/src/gui/math3d/qvector4d.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/gui/math3d/qvector4d.h b/src/gui/math3d/qvector4d.h
index a383fbb..1c1fb75 100644
--- a/src/gui/math3d/qvector4d.h
+++ b/src/gui/math3d/qvector4d.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**