diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2010-10-06 11:13:42 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2010-10-06 11:13:42 +0400 |
commit | fdadab10062cd9fbef6a6585fd19f344280a9d5b (patch) | |
tree | 52f819576cff389159b13255e28d50972583d249 /source/blender/collada/collada_internal.h | |
parent | 02d97e4da297b8fa112811470846c0ae4598412a (diff) |
COLLADA exporter: split camera and light export into own files.
Diffstat (limited to 'source/blender/collada/collada_internal.h')
-rw-r--r-- | source/blender/collada/collada_internal.h | 74 |
1 files changed, 29 insertions, 45 deletions
diff --git a/source/blender/collada/collada_internal.h b/source/blender/collada/collada_internal.h index f8fbe71e6d9..1e3546263da 100644 --- a/source/blender/collada/collada_internal.h +++ b/source/blender/collada/collada_internal.h @@ -24,9 +24,15 @@ #ifndef BLENDER_COLLADA_H #define BLENDER_COLLADA_H +#include <string> +#include <vector> +#include <map> + #include "COLLADAFWFileInfo.h" #include "Math/COLLADABUMathMatrix4.h" +#include "DNA_armature_types.h" +#include "DNA_object_types.h" #include "BLI_math.h" class UnitConverter @@ -38,63 +44,41 @@ private: public: // Initialize with Z_UP, since Blender uses right-handed, z-up - UnitConverter() : unit(), up_axis(COLLADAFW::FileInfo::Z_UP) {} + UnitConverter(); - void read_asset(const COLLADAFW::FileInfo* asset) - { - } + void read_asset(const COLLADAFW::FileInfo* asset); // TODO // convert vector vec from COLLADA format to Blender - void convertVec3(float *vec) - { - } + void convertVec3(float *vec); // TODO need also for angle conversion, time conversion... - 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 - for (int i = 0; i < 4; i++) { - for (int j = 0; j < 4; j++) { - out[i][j] = in[j][i]; - } - } - } - - void mat4_to_dae(float out[][4], float in[][4]) - { - copy_m4_m4(out, in); - transpose_m4(out); - } - - void mat4_to_dae_double(double out[][4], float in[][4]) - { - float mat[4][4]; - - mat4_to_dae(mat, in); - - for (int i = 0; i < 4; i++) - for (int j = 0; j < 4; j++) - out[i][j] = mat[i][j]; - } + void dae_matrix_to_mat4_(float out[][4], const COLLADABU::Math::Matrix4& in); + + void mat4_to_dae(float out[][4], float in[][4]); + + void mat4_to_dae_double(double out[][4], float in[][4]); }; class TransformBase { public: - void decompose(float mat[][4], float *loc, float eul[3], float quat[4], float *size) - { - mat4_to_size(size, mat); - if (eul) { - mat4_to_eul(eul, mat); - } - if (quat) { - mat4_to_quat(quat, mat); - } - copy_v3_v3(loc, mat[3]); - } + void decompose(float mat[][4], float *loc, float eul[3], float quat[4], float *size); }; +extern void clear_global_id_map(); +/** Look at documentation of translate_map */ +extern std::string translate_id(const std::string &id); + +extern std::string id_name(void *id); + +extern std::string get_geometry_id(Object *ob); + +extern std::string get_light_id(Object *ob); + +extern std::string get_joint_id(Bone *bone, Object *ob_arm); + +extern std::string get_camera_id(Object *ob); + #endif |