The ported normal calculation from ceed37fc5c
neglected to
use the tilt attribute to rotate the normals around the tangents.
This commit adds that behavior back, adding a new math header file
to avoid duplicating the rotation function for normalized axes.
Differential Revision: https://developer.blender.org/D14655
19 lines
376 B
C++
19 lines
376 B
C++
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#pragma once
|
|
|
|
/** \file
|
|
* \ingroup bli
|
|
*/
|
|
|
|
#include "BLI_math_vec_types.hh"
|
|
|
|
namespace blender::math {
|
|
|
|
/**
|
|
* Rotate the unit-length \a direction around the unit-length \a axis by the \a angle.
|
|
*/
|
|
float3 rotate_direction_around_axis(const float3 &direction, const float3 &axis, float angle);
|
|
|
|
} // namespace blender::math
|