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-23 13:17:17 +0300
committerGaia Clary <gaia.clary@machinimatrix.org>2019-05-23 13:29:20 +0300
commit6be9d19951ed460829d379aa90953b14a9f281f2 (patch)
tree45fe275c232ff0b4fb0e4e7205d53c8fdd6f8e9a /source/blender/collada/BCSampleData.h
parente9cf9e0a397f9589e00d980f0c0489641e7ed57e (diff)
Collada exporter update
Added new feature: Collada: global axis rotation upon export (UI) The new feature allows to specify the target rest coordinate system upon export. This allows for example to export a character that is in Blender orientation (Y forward) to match the Secondlife orientation where (-X forward) - Refactor:Added new utility methods to collada_utils Made BCMatrix class more powerfull moved Blender related structures into new BlenderContext class added class wrapper to encapsulate ExportSettings structure Added blender context getters to ExportSettings added access methods to BlenderContext into ExportSettings class Moved class BCMatrix into BlenderContext moved utility functions from collada_util into BlenderContext replace own function for parenting by a call to ED_object_parent_set() - Cleanup: removed obsolete parameters from methods renamed parameters for better understanding cleanup whitespace and indentation removed obsolete comments
Diffstat (limited to 'source/blender/collada/BCSampleData.h')
-rw-r--r--source/blender/collada/BCSampleData.h41
1 files changed, 6 insertions, 35 deletions
diff --git a/source/blender/collada/BCSampleData.h b/source/blender/collada/BCSampleData.h
index 9cb56c95e0f..709bd3e59ef 100644
--- a/source/blender/collada/BCSampleData.h
+++ b/source/blender/collada/BCSampleData.h
@@ -24,6 +24,8 @@
#include <map>
#include <algorithm>
+#include "ExportSettings.h"
+
extern "C" {
#include "BKE_object.h"
#include "BLI_math_rotation.h"
@@ -34,40 +36,6 @@ extern "C" {
#include "DNA_camera_types.h"
}
-typedef float(Matrix)[4][4];
-
-class BCMatrix {
-
- private:
- mutable float matrix[4][4];
- mutable float size[3];
- mutable float rot[3];
- mutable float loc[3];
- mutable float q[4];
-
- void unit();
- void copy(Matrix &r, Matrix &a);
- void set_transform(Object *ob);
- void set_transform(Matrix &mat);
-
- public:
- float (&location() const)[3];
- float (&rotation() const)[3];
- float (&scale() const)[3];
- float (&quat() const)[4];
-
- BCMatrix(Matrix &mat);
- BCMatrix(Object *ob);
-
- void get_matrix(double (&mat)[4][4],
- const bool transposed = false,
- const int precision = -1) const;
-
- const bool in_range(const BCMatrix &other, float distance) const;
- static void sanitize(Matrix &matrix, int precision);
- static void transpose(Matrix &matrix);
-};
-
typedef std::map<Bone *, BCMatrix *> BCBoneMatrixMap;
class BCSample {
@@ -76,7 +44,10 @@ class BCSample {
BCBoneMatrixMap bonemats; /* For Armature animation */
public:
- BCSample(Object *ob);
+ BCSample(Object *ob) : obmat(ob)
+ {
+ }
+
~BCSample();
void add_bone_matrix(Bone *bone, Matrix &mat);