[Bf-blender-cvs] [a6b828c] depsgraph_refactor: Cleanup: Remove transformation matrix classes

Sergey Sharybin noreply at git.blender.org
Mon Oct 13 15:09:59 CEST 2014


Commit: a6b828ca1c4164c7ce6ebc44d90f3f8e0a6d9cbb
Author: Sergey Sharybin
Date:   Mon Oct 13 14:09:56 2014 +0200
Branches: depsgraph_refactor
https://developer.blender.org/rBa6b828ca1c4164c7ce6ebc44d90f3f8e0a6d9cbb

Cleanup: Remove transformation matrix classes

Not sure why depsgraph should actually care about transformation,
and for sure it's kinda weird to have wrappers. It's a blender core
and better to avoid using wrappers/abstractions in here.

The idea is to not store data in the depsgraph anyway, but use an
evaluation context for this instead.

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

M	source/blender/depsgraph/CMakeLists.txt
D	source/blender/depsgraph/util/depsgraph_util_math.cpp
D	source/blender/depsgraph/util/depsgraph_util_math.h

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

diff --git a/source/blender/depsgraph/CMakeLists.txt b/source/blender/depsgraph/CMakeLists.txt
index 7015521..a0d533d 100644
--- a/source/blender/depsgraph/CMakeLists.txt
+++ b/source/blender/depsgraph/CMakeLists.txt
@@ -76,8 +76,6 @@ set(SRC
 	util/depsgraph_util_hash.h
 	util/depsgraph_util_id.h
 	util/depsgraph_util_map.h
-	util/depsgraph_util_math.h
-	util/depsgraph_util_math.cpp
 	util/depsgraph_util_priority_queue.h
 	util/depsgraph_util_rna.h
 	util/depsgraph_util_set.h
diff --git a/source/blender/depsgraph/util/depsgraph_util_math.cpp b/source/blender/depsgraph/util/depsgraph_util_math.cpp
deleted file mode 100644
index 4839c0b..0000000
--- a/source/blender/depsgraph/util/depsgraph_util_math.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2014 Blender Foundation.
- * All rights reserved.
- *
- * Original Author: Lukas Toenne
- * Contributor(s): 
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include "depsgraph_util_math.h"
-
-const Transform3 Transform3::identity({{1.0f, 0.0f, 0.0f},
-                                       {0.0f, 1.0f, 0.0f},
-                                       {0.0f, 0.0f, 1.0f}});
-
-const Transform4 Transform4::identity({{1.0f, 0.0f, 0.0f, 0.0f},
-                                       {0.0f, 1.0f, 0.0f, 0.0f},
-                                       {0.0f, 0.0f, 1.0f, 0.0f},
-                                       {0.0f, 0.0f, 0.0f, 1.0f}});
diff --git a/source/blender/depsgraph/util/depsgraph_util_math.h b/source/blender/depsgraph/util/depsgraph_util_math.h
deleted file mode 100644
index 31b5e1f..0000000
--- a/source/blender/depsgraph/util/depsgraph_util_math.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2014 Blender Foundation.
- * All rights reserved.
- *
- * Original Author: Brecht van Lommel
- * Contributor(s): Lukas Toenne
- */
-
-#ifndef __DEPSGRAPH_UTIL_STRING_H__
-#define __DEPSGRAPH_UTIL_STRING_H__
-
-extern "C" {
-#include "BLI_math.h"
-}
-
-struct Transform3 {
-	typedef float (*data_ptr)[3];
-	typedef const float (*const_data_ptr)[3];
-	typedef float (&data_ref)[3][3];
-	typedef const float (&const_data_ref)[3][3];
-	
-	static const Transform3 identity;
-	
-	Transform3()
-	{
-		zero_m3(data);
-	}
-
-	Transform3(const_data_ref copy)
-	{
-		copy_m3_m3(data, (data_ptr)copy);
-	}
-	
-	Transform3 &operator = (const_data_ref copy)
-	{
-		copy_m3_m3(data, (data_ptr)copy);
-		return *this;
-	}
-	
-	operator data_ref() { return data; }
-	operator const_data_ref() const { return data; }
-	
-	float data[3][3];
-};
-
-struct Transform4 {
-	typedef float (*data_ptr)[4];
-	typedef const float (*const_data_ptr)[4];
-	typedef float (&data_ref)[4][4];
-	typedef const float (&const_data_ref)[4][4];
-	
-	static const Transform4 identity;
-	
-	Transform4()
-	{
-		zero_m4(data);
-	}
-
-	Transform4(const_data_ref copy)
-	{
-		copy_m4_m4(data, (data_ptr)copy);
-	}
-	
-	Transform4 &operator = (const_data_ref copy)
-	{
-		copy_m4_m4(data, (data_ptr)copy);
-		return *this;
-	}
-	
-	operator data_ref() { return data; }
-	operator const_data_ref() const { return data; }
-	
-	float data[4][4];
-};
-
-#endif /* __DEPSGRAPH_UTIL_STRING_H__ */




More information about the Bf-blender-cvs mailing list