Blender
V3.3
|
#include "BLI_array.hh"
#include "BLI_generic_virtual_array.hh"
#include "BLI_span.hh"
#include "BLI_task.hh"
#include "BLI_timeit.hh"
#include "BKE_attribute_math.hh"
#include "BKE_spline.hh"
Go to the source code of this file.
Functions | |
static SplinePtr | create_spline (const CurveType type) |
static void | accumulate_lengths (Span< float3 > positions, const bool is_cyclic, MutableSpan< float > lengths) |
static float3 | direction_bisect (const float3 &prev, const float3 &middle, const float3 &next) |
static void | calculate_tangents (Span< float3 > positions, const bool is_cyclic, MutableSpan< float3 > tangents) |
static float3 | rotate_direction_around_axis (const float3 &direction, const float3 &axis, const float angle) |
static void | calculate_normals_z_up (Span< float3 > tangents, MutableSpan< float3 > r_normals) |
static float3 | calculate_next_normal (const float3 &last_normal, const float3 &last_tangent, const float3 ¤t_tangent) |
static void | calculate_normals_minimum (Span< float3 > tangents, const bool cyclic, MutableSpan< float3 > r_normals) |
|
static |
Definition at line 153 of file spline_base.cc.
References blender::math::distance(), is_cyclic(), blender::MutableSpan< T >::last(), blender::math::length(), and positions.
Referenced by Spline::evaluated_lengths().
|
static |
Rotate the last normal in the same way the tangent has been rotated.
Definition at line 295 of file spline_base.cc.
References angle(), angle_normalized_v3v3(), blender::math::cross(), blender::math::is_zero(), blender::math::normalize(), and blender::math::rotate_direction_around_axis().
Referenced by calculate_normals_minimum().
|
static |
Definition at line 312 of file spline_base.cc.
References angle(), angle_signed_on_axis_v3v3_v3(), BLI_assert, calculate_next_normal(), blender::robust_pred::epsilon, fabs(), blender::MutableSpan< T >::index_range(), blender::MutableSpan< T >::is_empty(), blender::MutableSpan< T >::last(), M_PI, blender::math::normalize(), blender::math::rotate_direction_around_axis(), blender::MutableSpan< T >::size(), tangents, float3::x, and float3::y.
Referenced by blender::bke::CurvesGeometry::evaluated_normals(), and Spline::evaluated_normals().
|
static |
Definition at line 273 of file spline_base.cc.
References BLI_assert, blender::robust_pred::epsilon, fabsf, blender::MutableSpan< T >::index_range(), blender::math::normalize(), blender::MutableSpan< T >::size(), tangents, float3::x, and float3::y.
Referenced by blender::bke::CurvesGeometry::evaluated_normals(), and Spline::evaluated_normals().
|
static |
Definition at line 205 of file spline_base.cc.
References direction_bisect(), is_cyclic(), blender::math::normalize(), positions, and tangents.
Referenced by blender::bke::CurvesGeometry::evaluated_tangents(), and Spline::evaluated_tangents().
Definition at line 36 of file spline_base.cc.
References BLI_assert_unreachable, CURVE_TYPE_BEZIER, CURVE_TYPE_CATMULL_ROM, CURVE_TYPE_NURBS, CURVE_TYPE_POLY, and type.
Referenced by Spline::copy_only_settings().
|
static |
Definition at line 191 of file spline_base.cc.
References blender::math::is_zero(), next, blender::math::normalize(), blender::meshintersect::prev(), result, and UNLIKELY.
Referenced by calculate_tangents().
|
static |
Definition at line 257 of file spline_base.cc.
References angle(), BLI_ASSERT_UNIT_V3, KDL::cos(), blender::math::cross(), KDL::diff(), blender::math::dot(), and KDL::sin().
Referenced by Spline::evaluated_normals().