[Bf-blender-cvs] [1df94f62578] functions: remove obselete BLI_math_cxx.h file
Jacques Lucke
noreply at git.blender.org
Thu Feb 13 18:59:17 CET 2020
Commit: 1df94f6257820a2aec8b94f9566357ed83d56fa7
Author: Jacques Lucke
Date: Thu Feb 13 18:58:34 2020 +0100
Branches: functions
https://developer.blender.org/rB1df94f6257820a2aec8b94f9566357ed83d56fa7
remove obselete BLI_math_cxx.h file
===================================================================
M source/blender/blenkernel/BKE_surface_hook.h
D source/blender/blenlib/BLI_math_cxx.h
M source/blender/blenlib/CMakeLists.txt
M source/blender/functions/FN_multi_function_common_contexts.h
M source/blender/functions/FN_multi_function_context.h
M source/blender/functions/intern/cpp_types.cc
M source/blender/functions/intern/multi_functions/constants.h
M source/blender/functions/intern/multi_functions/customizable.h
M source/blender/functions/intern/multi_functions/mixed.cc
M source/blender/functions/intern/multi_functions/surface_hook.cc
M source/blender/functions/intern/node_tree_multi_function_network/generate.cc
M source/blender/functions/intern/node_tree_multi_function_network/mappings.cc
M source/blender/functions/intern/node_tree_multi_function_network/mappings_nodes.cc
M source/blender/functions/intern/node_tree_multi_function_network/mappings_sockets.cc
M source/blender/modifiers/intern/MOD_functiondeform_cxx.cc
M source/blender/simulations/bparticles/actions.cpp
M source/blender/simulations/bparticles/c_wrapper.cpp
M source/blender/simulations/bparticles/node_frontend.cpp
M source/blender/simulations/bparticles/offset_handlers.cpp
M source/blender/simulations/bparticles/world_state.hpp
===================================================================
diff --git a/source/blender/blenkernel/BKE_surface_hook.h b/source/blender/blenkernel/BKE_surface_hook.h
index 73f155202fa..2ca5f9f6238 100644
--- a/source/blender/blenkernel/BKE_surface_hook.h
+++ b/source/blender/blenkernel/BKE_surface_hook.h
@@ -2,7 +2,7 @@
#define __BKE_SURFACE_HOOK_H__
#include "BLI_utildefines.h"
-#include "BLI_math_cxx.h"
+#include "BLI_float3.h"
#include "BKE_id_handle.h"
diff --git a/source/blender/blenlib/BLI_math_cxx.h b/source/blender/blenlib/BLI_math_cxx.h
deleted file mode 100644
index adb24b6aed8..00000000000
--- a/source/blender/blenlib/BLI_math_cxx.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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.
- */
-
-/** \file
- * \ingroup bli
- *
- * This file provides multiple small structs that make working with e.g. vectors in c++ code
- * easier.
- */
-
-#pragma once
-
-#include "BLI_float3.h"
-#include "BLI_float2.h"
-#include "BLI_float4x4.h"
-#include "BLI_color.h"
diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt
index 7252105bec0..5dd0419d7bc 100644
--- a/source/blender/blenlib/CMakeLists.txt
+++ b/source/blender/blenlib/CMakeLists.txt
@@ -257,7 +257,6 @@ set(SRC
BLI_dot_export.h
BLI_dot_export_attribute_enums.h
intern/dot_export.cc
- BLI_math_cxx.h
BLI_linear_allocator.h
BLI_multi_map.h
BLI_timeit.h
diff --git a/source/blender/functions/FN_multi_function_common_contexts.h b/source/blender/functions/FN_multi_function_common_contexts.h
index c107e953f3f..007bbb95fd0 100644
--- a/source/blender/functions/FN_multi_function_common_contexts.h
+++ b/source/blender/functions/FN_multi_function_common_contexts.h
@@ -6,7 +6,7 @@
#include "FN_multi_function_context.h"
#include "FN_attributes_ref.h"
-#include "BLI_math_cxx.h"
+#include "BLI_float3.h"
#include "BLI_map.h"
namespace FN {
diff --git a/source/blender/functions/FN_multi_function_context.h b/source/blender/functions/FN_multi_function_context.h
index ee84c617cbd..0bbd8c02e05 100644
--- a/source/blender/functions/FN_multi_function_context.h
+++ b/source/blender/functions/FN_multi_function_context.h
@@ -1,7 +1,6 @@
#ifndef __FN_MULTI_FUNCTION_CONTEXT_H__
#define __FN_MULTI_FUNCTION_CONTEXT_H__
-#include "BLI_math_cxx.h"
#include "BLI_optional.h"
#include "BLI_virtual_list_ref.h"
#include "BLI_vector.h"
diff --git a/source/blender/functions/intern/cpp_types.cc b/source/blender/functions/intern/cpp_types.cc
index 22d23e7961c..119b2ee80d1 100644
--- a/source/blender/functions/intern/cpp_types.cc
+++ b/source/blender/functions/intern/cpp_types.cc
@@ -1,7 +1,8 @@
#include "FN_cpp_type.h"
#include "cpp_types.h"
-#include "BLI_math_cxx.h"
+#include "BLI_float3.h"
+#include "BLI_color.h"
#include "BLI_rand_cxx.h"
#include "BKE_surface_hook.h"
diff --git a/source/blender/functions/intern/multi_functions/constants.h b/source/blender/functions/intern/multi_functions/constants.h
index c537a52772b..4e8d2194d86 100644
--- a/source/blender/functions/intern/multi_functions/constants.h
+++ b/source/blender/functions/intern/multi_functions/constants.h
@@ -6,6 +6,7 @@
#include "BLI_hash.h"
#include "BLI_rand_cxx.h"
+#include "BLI_float3.h"
namespace FN {
diff --git a/source/blender/functions/intern/multi_functions/customizable.h b/source/blender/functions/intern/multi_functions/customizable.h
index cef8164cd68..f48e2a4da96 100644
--- a/source/blender/functions/intern/multi_functions/customizable.h
+++ b/source/blender/functions/intern/multi_functions/customizable.h
@@ -4,8 +4,6 @@
#include "FN_multi_function.h"
-#include "BLI_math_cxx.h"
-
namespace FN {
template<typename FromT, typename ToT> class MF_Convert : public MultiFunction {
diff --git a/source/blender/functions/intern/multi_functions/mixed.cc b/source/blender/functions/intern/multi_functions/mixed.cc
index 53e61ce36f3..cba903957c7 100644
--- a/source/blender/functions/intern/multi_functions/mixed.cc
+++ b/source/blender/functions/intern/multi_functions/mixed.cc
@@ -4,7 +4,6 @@
#include "FN_generic_vector_array.h"
#include "FN_multi_function_common_contexts.h"
-#include "BLI_math_cxx.h"
#include "BLI_string_map.h"
#include "BLI_array_cxx.h"
#include "BLI_noise.h"
@@ -12,6 +11,9 @@
#include "BLI_rand.h"
#include "BLI_kdtree.h"
#include "BLI_rand_cxx.h"
+#include "BLI_float3.h"
+#include "BLI_float4x4.h"
+#include "BLI_color.h"
#include "DNA_object_types.h"
#include "DNA_mesh_types.h"
@@ -30,10 +32,8 @@ namespace FN {
using BKE::ImageIDHandle;
using BKE::ObjectIDHandle;
-using BLI::float2;
using BLI::float3;
using BLI::float4x4;
-using BLI::rgba_b;
using BLI::rgba_f;
MF_CombineColor::MF_CombineColor()
diff --git a/source/blender/functions/intern/multi_functions/surface_hook.cc b/source/blender/functions/intern/multi_functions/surface_hook.cc
index 575a47530a3..0527a24d3de 100644
--- a/source/blender/functions/intern/multi_functions/surface_hook.cc
+++ b/source/blender/functions/intern/multi_functions/surface_hook.cc
@@ -12,7 +12,10 @@
#include "DNA_customdata_types.h"
-#include "BLI_math_cxx.h"
+#include "BLI_float2.h"
+#include "BLI_float3.h"
+#include "BLI_float4x4.h"
+#include "BLI_color.h"
#include "BLI_array_cxx.h"
#include "BLI_vector_adaptor.h"
@@ -145,47 +148,47 @@ void MF_GetPositionOnSurface::call(IndexMask mask, MFParams params, MFContext co
return;
}
- group_indices_by_same_value(mask.indices(),
- surface_hooks,
- [&](SurfaceHook base_hook, IndexMask indices_on_same_surface) {
- if (base_hook.type() != BKE::SurfaceHookType::MeshObject) {
- r_positions.fill_indices(indices_on_same_surface, fallback);
- return;
- }
-
- Object *object = id_handle_lookup->lookup(
- base_hook.object_handle());
- if (object == nullptr) {
- r_positions.fill_indices(indices_on_same_surface, fallback);
- return;
- }
-
- Mesh *mesh = (Mesh *)object->data;
- const MLoopTri *triangles = BKE_mesh_runtime_looptri_ensure(mesh);
- int triangle_amount = BKE_mesh_runtime_looptri_len(mesh);
-
- for (uint i : indices_on_same_surface) {
- SurfaceHook hook = surface_hooks[i];
-
- if (hook.triangle_index() >= triangle_amount) {
- r_positions[i] = fallback;
- continue;
- }
-
- const MLoopTri &triangle = triangles[hook.triangle_index()];
- float3 v1 = mesh->mvert[mesh->mloop[triangle.tri[0]].v].co;
- float3 v2 = mesh->mvert[mesh->mloop[triangle.tri[1]].v].co;
- float3 v3 = mesh->mvert[mesh->mloop[triangle.tri[2]].v].co;
-
- float3 position;
- interp_v3_v3v3v3(position, v1, v2, v3, hook.bary_coords());
- float4x4 local_to_world = object->obmat;
- position = local_to_world.transform_position(position);
-
- r_positions[i] = position;
- }
- },
- SurfaceHook::on_same_surface);
+ group_indices_by_same_value(
+ mask.indices(),
+ surface_hooks,
+ [&](SurfaceHook base_hook, IndexMask indices_on_same_surface) {
+ if (base_hook.type() != BKE::SurfaceHookType::MeshObject) {
+ r_positions.fill_indices(indices_on_same_surface, fallback);
+ return;
+ }
+
+ Object *object = id_handle_lookup->lookup(base_hook.object_handle());
+ if (object == nullptr) {
+ r_positions.fill_indices(indices_on_same_surface, fallback);
+ return;
+ }
+
+ Mesh *mesh = (Mesh *)object->data;
+ const MLoopTri *triangles = BKE_mesh_runtime_looptri_ensure(mesh);
+ int triangle_amount = BKE_mesh_runtime_looptri_len(mesh);
+
+ for (uint i : indices_on_same_surface) {
+ SurfaceHook hook = surface_hooks[i];
+
+ if (hook.triangle_index() >= triangle_amount) {
+ r_positions[i] = fallback;
+ continue;
+ }
+
+ const MLoopTri &triangle = triangles[hook.triangle_index()];
+ float3 v1 = mesh->mvert[mesh->mloop[triangle.tri[0]].v].co;
+ float3 v2 = mesh->mvert[mesh->mloop[triangle.tri[1]].v].co;
+ float3 v3 = mesh->mvert[mesh->mloop[triangle.tri[2]].v].co;
+
+ float3 position;
+ interp_v3_v3v3v3(position, v1, v2, v3, hook.bary_coords());
+ float4x4 local_to_world = object->obmat;
+ position = local_to_world.transform_position(position);
+
+ r_positions[i] = position;
+ }
+ },
+ SurfaceHook::on_same_surface);
}
MF_GetNormalOnSurface::MF_GetNormalOnSurface()
diff --git a/source/blender/functions/intern/node_tree_multi_function_network/generate.cc b/source/blender/functions/intern/node_tree_multi_function_network/generate.cc
index ddb93fa1f3a..02cdcc2efdd 100644
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list