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:
Diffstat (limited to 'intern/moto/include/MT_Matrix3x3.h')
-rw-r--r--intern/moto/include/MT_Matrix3x3.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/intern/moto/include/MT_Matrix3x3.h b/intern/moto/include/MT_Matrix3x3.h
index 899a2731588..c6d299d19fd 100644
--- a/intern/moto/include/MT_Matrix3x3.h
+++ b/intern/moto/include/MT_Matrix3x3.h
@@ -98,6 +98,18 @@ public:
m_el[0][2] = *m++; m_el[1][2] = *m++; m_el[2][2] = *m;
}
+ void setValue3x3(const float *m) {
+ m_el[0][0] = *m++; m_el[1][0] = *m++; m_el[2][0] = *m++;
+ m_el[0][1] = *m++; m_el[1][1] = *m++; m_el[2][1] = *m++;
+ m_el[0][2] = *m++; m_el[1][2] = *m++; m_el[2][2] = *m;
+ }
+
+ void setValue3x3(const double *m) {
+ m_el[0][0] = *m++; m_el[1][0] = *m++; m_el[2][0] = *m++;
+ m_el[0][1] = *m++; m_el[1][1] = *m++; m_el[2][1] = *m++;
+ m_el[0][2] = *m++; m_el[1][2] = *m++; m_el[2][2] = *m;
+ }
+
void setValue(MT_Scalar xx, MT_Scalar xy, MT_Scalar xz,
MT_Scalar yx, MT_Scalar yy, MT_Scalar yz,
MT_Scalar zx, MT_Scalar zy, MT_Scalar zz) {
@@ -194,6 +206,18 @@ public:
*m++ = m_el[0][2]; *m++ = m_el[1][2]; *m++ = m_el[2][2]; *m = 0.0;
}
+ void getValue3x3(float *m) const {
+ *m++ = (float) m_el[0][0]; *m++ = (float) m_el[1][0]; *m++ = (float) m_el[2][0];
+ *m++ = (float) m_el[0][1]; *m++ = (float) m_el[1][1]; *m++ = (float) m_el[2][1];
+ *m++ = (float) m_el[0][2]; *m++ = (float) m_el[1][2]; *m++ = (float) m_el[2][2];
+ }
+
+ void getValue3x3(double *m) const {
+ *m++ = m_el[0][0]; *m++ = m_el[1][0]; *m++ = m_el[2][0];
+ *m++ = m_el[0][1]; *m++ = m_el[1][1]; *m++ = m_el[2][1];
+ *m++ = m_el[0][2]; *m++ = m_el[1][2]; *m++ = m_el[2][2];
+ }
+
MT_Quaternion getRotation() const;
MT_Matrix3x3& operator*=(const MT_Matrix3x3& m);