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:
authorGaia Clary <gaia.clary@machinimatrix.org>2019-05-28 09:45:28 +0300
committerGaia Clary <gaia.clary@machinimatrix.org>2019-06-03 00:00:56 +0300
commite17990bab75fd922bd0d497d7d6c8a25e9bf63fd (patch)
treeac8431f56ca6ff93ad6e0d6366bf116d91eec5d6 /source/blender/collada
parent692edf430110f15d7356e20ef9efc41596417199 (diff)
refactor Collada: Add new class Quat (wip)
Diffstat (limited to 'source/blender/collada')
-rw-r--r--source/blender/collada/BCMatrix.h36
-rw-r--r--source/blender/collada/BlenderTypes.h1
2 files changed, 34 insertions, 3 deletions
diff --git a/source/blender/collada/BCMatrix.h b/source/blender/collada/BCMatrix.h
index b1d89081f27..63f84d2fd3d 100644
--- a/source/blender/collada/BCMatrix.h
+++ b/source/blender/collada/BCMatrix.h
@@ -14,15 +14,45 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
- /** \file
- * \ingroup collada
- */
+/** \file
+ * \ingroup collada
+ */
#ifndef __BCMATRIX_H__
#define __BCMATRIX_H__
#include "BlenderTypes.h"
#include "BKE_object.h"
+#include "BLI_math.h"
+
+class BCQuat {
+ private:
+ mutable Quat q;
+
+ void unit();
+ void copy(Quat &r, Quat &a);
+
+ public:
+ BCQuat(const BCQuat &other)
+ {
+ copy_v4_v4(q, other.q);
+ }
+
+ BCQuat(Quat &other)
+ {
+ copy_v4_v4(q, other);
+ }
+
+ BCQuat()
+ {
+ unit_qt(q);
+ }
+
+ Quat &quat()
+ {
+ return q;
+ }
+};
class BCMatrix {
diff --git a/source/blender/collada/BlenderTypes.h b/source/blender/collada/BlenderTypes.h
index 2b0a479fa07..22ad9b8c1e0 100644
--- a/source/blender/collada/BlenderTypes.h
+++ b/source/blender/collada/BlenderTypes.h
@@ -22,6 +22,7 @@
#define __BLENDERTYPES_H__
typedef float(Vector)[3];
+typedef float(Quat)[4];
typedef float(Matrix)[4][4];
typedef double(DMatrix)[4][4];