Blender  V3.3
Functions
spline_base.cc File Reference
#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 &current_tangent)
 
static void calculate_normals_minimum (Span< float3 > tangents, const bool cyclic, MutableSpan< float3 > r_normals)
 

Function Documentation

◆ accumulate_lengths()

static void accumulate_lengths ( Span< float3 positions,
const bool  is_cyclic,
MutableSpan< float lengths 
)
static

◆ calculate_next_normal()

static float3 calculate_next_normal ( const float3 last_normal,
const float3 last_tangent,
const float3 current_tangent 
)
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().

◆ calculate_normals_minimum()

static void calculate_normals_minimum ( Span< float3 tangents,
const bool  cyclic,
MutableSpan< float3 r_normals 
)
static

◆ calculate_normals_z_up()

static void calculate_normals_z_up ( Span< float3 tangents,
MutableSpan< float3 r_normals 
)
static

◆ calculate_tangents()

static void calculate_tangents ( Span< float3 positions,
const bool  is_cyclic,
MutableSpan< float3 tangents 
)
static

◆ create_spline()

static SplinePtr create_spline ( const CurveType  type)
static

◆ direction_bisect()

static float3 direction_bisect ( const float3 prev,
const float3 middle,
const float3 next 
)
static

◆ rotate_direction_around_axis()

static float3 rotate_direction_around_axis ( const float3 direction,
const float3 axis,
const float  angle 
)
static