diff options
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 e682486390c..20fdda8bdc7 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,6 +1026,8 @@ 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) { @@ -1036,9 +1038,7 @@ static void get_dupliface_transform_from_coords(Span<float3> coords, /* Rotation. */ float quat[4]; - float3 f_no; - cross_poly_v3(f_no, (const float(*)[3])coords.data(), (uint)coords.size()); - f_no.normalize(); + float3 f_no = normalize(cross_poly(coords)); tri_to_quat_ex(quat, coords[0], coords[1], coords[2], f_no); /* Scale. */ |