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:
authorNathan Letwory <nathan@letworyinteractive.com>2010-10-05 04:05:14 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2010-10-05 04:05:14 +0400
commit82209cdc86f5f248102df89b3dfeca86149768f7 (patch)
tree21ce50ed95bc62544d76754c9512ac791e52ca44 /source/blender/collada/collada_internal.h
parent63b4c93e449902da3bb9a17d4f8b9f8ef7d00ae5 (diff)
Reorganisation of COLLADA import code. Classes have been split into their own files.
No functional changes. Where necessary extern "C" {} blocks have been added.
Diffstat (limited to 'source/blender/collada/collada_internal.h')
-rw-r--r--source/blender/collada/collada_internal.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/collada/collada_internal.h b/source/blender/collada/collada_internal.h
index 242fce749c4..f8fbe71e6d9 100644
--- a/source/blender/collada/collada_internal.h
+++ b/source/blender/collada/collada_internal.h
@@ -27,6 +27,8 @@
#include "COLLADAFWFileInfo.h"
#include "Math/COLLADABUMathMatrix4.h"
+#include "BLI_math.h"
+
class UnitConverter
{
private:
@@ -35,6 +37,7 @@ private:
public:
+ // Initialize with Z_UP, since Blender uses right-handed, z-up
UnitConverter() : unit(), up_axis(COLLADAFW::FileInfo::Z_UP) {}
void read_asset(const COLLADAFW::FileInfo* asset)
@@ -49,7 +52,7 @@ public:
// TODO need also for angle conversion, time conversion...
- void dae_matrix_to_mat4(float out[][4], const COLLADABU::Math::Matrix4& in)
+ void dae_matrix_to_mat4_(float out[][4], const COLLADABU::Math::Matrix4& in)
{
// in DAE, matrices use columns vectors, (see comments in COLLADABUMathMatrix4.h)
// so here, to make a blender matrix, we swap columns and rows
@@ -84,10 +87,12 @@ public:
void decompose(float mat[][4], float *loc, float eul[3], float quat[4], float *size)
{
mat4_to_size(size, mat);
- if (eul)
+ if (eul) {
mat4_to_eul(eul, mat);
- if (quat)
+ }
+ if (quat) {
mat4_to_quat(quat, mat);
+ }
copy_v3_v3(loc, mat[3]);
}
};