Blender
V3.3
|
Functions | |
int | calculate_evaluated_num (int points_num, bool cyclic, int resolution) |
void | interpolate_to_evaluated (GSpan src, bool cyclic, int resolution, GMutableSpan dst) |
void | interpolate_to_evaluated (const GSpan src, const bool cyclic, const Span< int > evaluated_offsets, GMutableSpan dst) |
template<typename T > | |
static T | calculate_basis (const T &a, const T &b, const T &c, const T &d, const float parameter) |
template<typename T > | |
static void | evaluate_segment (const T &a, const T &b, const T &c, const T &d, MutableSpan< T > dst) |
template<typename T , typename RangeForSegmentFn > | |
static void | interpolate_to_evaluated (const Span< T > src, const bool cyclic, const RangeForSegmentFn &range_fn, MutableSpan< T > dst) |
template<typename T > | |
static void | interpolate_to_evaluated (const Span< T > src, const bool cyclic, const int resolution, MutableSpan< T > dst) |
template<typename T > | |
static void | interpolate_to_evaluated (const Span< T > src, const bool cyclic, const Span< int > evaluated_offsets, MutableSpan< T > dst) |
|
static |
Definition at line 25 of file curve_catmull_rom.cc.
References Freestyle::a, usdtokens::b(), Freestyle::c, and t.
int blender::bke::curves::catmull_rom::calculate_evaluated_num | ( | int | points_num, |
bool | cyclic, | ||
int | resolution | ||
) |
Calculate the number of evaluated points that interpolate_to_evaluated is expected to produce.
points_num | The number of points in the curve. |
resolution | The resolution for each segment. |
Definition at line 12 of file curve_catmull_rom.cc.
References max, and blender::bke::curves::segments_num().
Referenced by blender::bke::calculate_evaluated_offsets(), and interpolate_to_evaluated().
|
static |
Definition at line 37 of file curve_catmull_rom.cc.
References Freestyle::a, usdtokens::b(), Freestyle::c, blender::IndexRange::drop_front(), blender::MutableSpan< T >::first(), blender::MutableSpan< T >::index_range(), and blender::MutableSpan< T >::size().
Referenced by interpolate_to_evaluated().
void blender::bke::curves::catmull_rom::interpolate_to_evaluated | ( | const GSpan | src, |
const bool | cyclic, | ||
const Span< int > | evaluated_offsets, | ||
GMutableSpan | dst | ||
) |
Evaluate the Catmull Rom curve. The size of each segment and its offset in the #dst span is encoded in #evaluated_offsets, with the same method as #CurvesGeometry::offsets().
Definition at line 156 of file curve_catmull_rom.cc.
References blender::attribute_math::convert_to_static_type(), and src.
|
static |
Definition at line 109 of file curve_catmull_rom.cc.
References BLI_assert, calculate_evaluated_num(), interpolate_to_evaluated(), blender::MutableSpan< T >::size(), and src.
|
static |
range_fn | Returns an index range describing where in the #dst span each segment should be evaluated to, and how many points to add to it. This is used to avoid the need to allocate an actual offsets array in typical evaluation use cases where the resolution is per-curve. |
Definition at line 52 of file curve_catmull_rom.cc.
References evaluate_segment(), blender::MutableSpan< T >::first(), blender::MutableSpan< T >::last(), blender::threading::parallel_for(), blender::MutableSpan< T >::slice(), and src.
|
static |
Definition at line 126 of file curve_catmull_rom.cc.
References interpolate_to_evaluated(), blender::bke::offsets_to_range(), and src.
void blender::bke::curves::catmull_rom::interpolate_to_evaluated | ( | GSpan | src, |
bool | cyclic, | ||
int | resolution, | ||
GMutableSpan | dst | ||
) |
Evaluate the Catmull Rom curve. The length of the #dst span should be calculated with calculate_evaluated_num and is expected to divide evenly by the src span's segment size.
Definition at line 141 of file curve_catmull_rom.cc.
References blender::attribute_math::convert_to_static_type(), and src.
Referenced by interpolate_to_evaluated().