diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-01-12 14:43:40 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-01-12 14:44:26 +0300 |
commit | e5766752d04794c2693dedad75baeb8c7d68f4cf (patch) | |
tree | 7f5354d1272612a32c28bfda4c03259970c402b7 /source/blender/blenkernel/intern/object_dupli.cc | |
parent | b2ccd8546c7249a5ce279210d45ddbb5e90cd10d (diff) |
Revert "BLI: Refactor vector types & functions to use templates"
Reverted because the commit removes a lot of commits.
This reverts commit a2c1c368af48644fa8995ecbe7138cc0d7900c30.
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. */ |