Blender
V3.3
|
#include <BKE_spline.hh>
Public Member Functions | |
CurveEval ()=default | |
CurveEval (const CurveEval &other) | |
blender::Span< SplinePtr > | splines () const |
blender::MutableSpan< SplinePtr > | splines () |
bool | has_spline_with_type (const CurveType type) const |
void | resize (int size) |
void | add_spline (SplinePtr spline) |
void | add_splines (blender::MutableSpan< SplinePtr > splines) |
void | remove_splines (blender::IndexMask mask) |
void | translate (const blender::float3 &translation) |
void | transform (const blender::float4x4 &matrix) |
bool | bounds_min_max (blender::float3 &min, blender::float3 &max, bool use_evaluated) const |
blender::bke::MutableAttributeAccessor | attributes_for_write () |
blender::Array< int > | control_point_offsets () const |
blender::Array< int > | evaluated_point_offsets () const |
blender::Array< float > | accumulated_spline_lengths () const |
float | total_length () const |
int | total_control_point_num () const |
void | mark_cache_invalid () |
void | assert_valid_point_attributes () const |
Public Attributes | |
blender::bke::CustomDataAttributes | attributes |
A collection of Spline objects with the same attribute types and names. Most data and functionality is in splines, but this contains some helpers for working with them as a group.
Definition at line 612 of file BKE_spline.hh.
|
default |
|
inline |
Definition at line 620 of file BKE_spline.hh.
References splines().
blender::Array< float > CurveEval::accumulated_spline_lengths | ( | ) | const |
Return the accumulated length at the start of every spline in the curve.
Definition at line 151 of file curve_eval.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::Array< T, InlineBufferCapacity, Allocator >::last(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Definition at line 62 of file curve_eval.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append().
Referenced by add_splines().
void CurveEval::add_splines | ( | blender::MutableSpan< SplinePtr > | splines | ) |
Definition at line 67 of file curve_eval.cc.
References add_spline(), and splines().
void CurveEval::assert_valid_point_attributes | ( | ) | const |
Check the invariants that curve control point attributes should always uphold, necessary because attributes are stored on splines rather than in a flat array on the curve:
Definition at line 544 of file curve_eval.cc.
References ATTR_DOMAIN_POINT, BLI_assert, blender::Vector< T, InlineBufferCapacity, Allocator >::first(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
blender::bke::MutableAttributeAccessor CurveEval::attributes_for_write | ( | ) |
Definition at line 1460 of file geometry_component_curve.cc.
References blender::bke::get_curve_accessor_functions_ref().
bool CurveEval::bounds_min_max | ( | blender::float3 & | min, |
blender::float3 & | max, | ||
bool | use_evaluated | ||
) | const |
Definition at line 96 of file curve_eval.cc.
blender::Array< int > CurveEval::control_point_offsets | ( | ) | const |
Return the start indices for each of the curve spline's control points, if they were part of a flattened array. This can be used to facilitate parallelism by avoiding the need to accumulate an offset while doing more complex calculations.
Definition at line 127 of file curve_eval.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::Array< T, InlineBufferCapacity, Allocator >::last(), offset, and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by curve_eval_to_curves().
blender::Array< int > CurveEval::evaluated_point_offsets | ( | ) | const |
Exactly like control_point_offsets, but uses the number of evaluated points instead.
Definition at line 139 of file curve_eval.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::Array< T, InlineBufferCapacity, Allocator >::last(), offset, and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Definition at line 46 of file curve_eval.cc.
References splines(), and type.
Referenced by curve_eval_to_curves().
void CurveEval::mark_cache_invalid | ( | ) |
Definition at line 163 of file curve_eval.cc.
void CurveEval::remove_splines | ( | blender::IndexMask | mask | ) |
Definition at line 74 of file curve_eval.cc.
References mask(), and blender::Vector< T, InlineBufferCapacity, Allocator >::remove_and_reorder().
void CurveEval::resize | ( | int | size | ) |
Definition at line 56 of file curve_eval.cc.
References attributes, blender::bke::CustomDataAttributes::reallocate(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and size().
blender::MutableSpan< SplinePtr > CurveEval::splines | ( | ) |
Definition at line 41 of file curve_eval.cc.
blender::Span< SplinePtr > CurveEval::splines | ( | ) | const |
Definition at line 36 of file curve_eval.cc.
Referenced by add_splines(), bounds_min_max(), curve_eval_to_curves(), CurveEval(), blender::bke::get_curve_accessor_functions(), has_spline_with_type(), total_control_point_num(), total_length(), transform(), and translate().
int CurveEval::total_control_point_num | ( | ) | const |
Definition at line 118 of file curve_eval.cc.
References count, and splines().
Referenced by curve_eval_to_curves(), and blender::bke::get_curve_accessor_functions().
float CurveEval::total_length | ( | ) | const |
Definition at line 109 of file curve_eval.cc.
References blender::math::length(), and splines().
void CurveEval::transform | ( | const blender::float4x4 & | matrix | ) |
Definition at line 89 of file curve_eval.cc.
References splines().
void CurveEval::translate | ( | const blender::float3 & | translation | ) |
Definition at line 81 of file curve_eval.cc.
References splines().
blender::bke::CustomDataAttributes CurveEval::attributes |
Definition at line 617 of file BKE_spline.hh.
Referenced by resize().