[Bf-blender-cvs] [171f3816383] collada: Cleanup: Collada: Removed no longer needed methods

Gaia Clary noreply at git.blender.org
Wed Mar 28 21:31:25 CEST 2018


Commit: 171f381638319a172978f63b23e589299739f906
Author: Gaia Clary
Date:   Sun Mar 25 16:02:27 2018 +0200
Branches: collada
https://developer.blender.org/rB171f381638319a172978f63b23e589299739f906

Cleanup: Collada: Removed no longer needed methods

===================================================================

M	source/blender/collada/BCSampleData.cpp
M	source/blender/collada/BCSampleData.h

===================================================================

diff --git a/source/blender/collada/BCSampleData.cpp b/source/blender/collada/BCSampleData.cpp
index 9d7f0d27a58..cf989ab237b 100644
--- a/source/blender/collada/BCSampleData.cpp
+++ b/source/blender/collada/BCSampleData.cpp
@@ -26,14 +26,9 @@
 #include "BCSampleData.h"
 #include "collada_utils.h"
 
-BCSample::BCSample(double(&mat)[4][4])
+BCSample::BCSample(Matrix &mat)
 {
-	set_matrix(mat);
-}
-
-BCSample::BCSample(float(&mat)[4][4])
-{
-	set_matrix(mat);
+	copy_m4_m4(matrix.matrix, mat);
 }
 
 BCSample::~BCSample()
@@ -263,23 +258,6 @@ void BCMatrix::unit()
 	unit_m4(matrix);
 }
 
-void BCSample::set_matrix(double(&mat)[4][4])
-{
-	for (int i = 0; i < 4; i++)
-		for (int j = 0; j < 4; j++)
-			matrix.matrix[i][j] = mat[i][j];
-}
-
-void BCSample::set_matrix(float(&mat)[4][4])
-{
-	copy_m4_m4(matrix.matrix, mat);
-}
-
-void BCSample::set_matrix(BCSample &other)
-{
-	set_matrix(other.matrix.matrix);
-}
-
 /*
 We need double here because the OpenCollada API needs it.
 precision = -1 indicates to not limit the precision
diff --git a/source/blender/collada/BCSampleData.h b/source/blender/collada/BCSampleData.h
index 7e35b0341e8..3030fe74dec 100644
--- a/source/blender/collada/BCSampleData.h
+++ b/source/blender/collada/BCSampleData.h
@@ -171,15 +171,11 @@ private:
 	BCLamp lamp; /* For Lamp channels */
 	BCCamera camera; /* For Camera channels */
 
-
 public:
-	BCSample(double(&mat)[4][4]);
-	BCSample(float(&mat)[4][4]);
+
+	BCSample(Matrix &mat);
 	~BCSample();
 
-	void set_matrix(double(&mat)[4][4]);
-	void set_matrix(float(&mat)[4][4]);
-	void set_matrix(BCSample &other);
 	void set_material(Material *ma);
 	void set_bone(Bone *bone, Matrix &mat);
 	const BCMatrix *get_sampled_matrix() const;



More information about the Bf-blender-cvs mailing list