diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-01-12 14:49:36 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-01-12 14:50:02 +0300 |
commit | fb6bd8864411ee27db05ceadcb80f690f44e48dd (patch) | |
tree | 7f5354d1272612a32c28bfda4c03259970c402b7 /source/blender/blenkernel/intern/object_dupli.cc | |
parent | 46e049d0ce2bce2f53ddc41a0dbbea2969d00a5d (diff) |
Revert "BLI: Refactor vector types & functions to use templates"
Includes unwanted changes
This reverts commit 46e049d0ce2bce2f53ddc41a0dbbea2969d00a5d.
Diffstat (limited to 'source/blender/blenkernel/intern/object_dupli.cc')
-rw-r--r-- | source/blender/blenkernel/intern/object_dupli.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/object_dupli.cc b/source/blender/blenkernel/intern/object_dupli.cc index 20fdda8bdc7..e682486390c 100644 --- a/source/blender/blenkernel/intern/object_dupli.cc +++ b/source/blender/blenkernel/intern/object_dupli.cc @@ -31,9 +31,9 @@ #include "BLI_string_utf8.h" #include "BLI_array.hh" +#include "BLI_float3.hh" #include "BLI_float4x4.hh" #include "BLI_math.h" -#include "BLI_math_vec_types.hh" #include "BLI_rand.h" #include "BLI_span.hh" #include "BLI_vector.hh" @@ -1026,8 +1026,6 @@ static void get_dupliface_transform_from_coords(Span<float3> coords, const float scale_fac, float r_mat[4][4]) { - using namespace blender::math; - /* Location. */ float3 location(0); for (const float3 &coord : coords) { @@ -1038,7 +1036,9 @@ static void get_dupliface_transform_from_coords(Span<float3> coords, /* Rotation. */ float quat[4]; - float3 f_no = normalize(cross_poly(coords)); + float3 f_no; + cross_poly_v3(f_no, (const float(*)[3])coords.data(), (uint)coords.size()); + f_no.normalize(); tri_to_quat_ex(quat, coords[0], coords[1], coords[2], f_no); /* Scale. */ |