Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/curves_geometry.cc
| Show First 20 Lines • Show All 551 Lines • ▼ Show 20 Lines | |||||
| IndexMask CurvesGeometry::indices_for_curve_type(const CurveType type, | IndexMask CurvesGeometry::indices_for_curve_type(const CurveType type, | ||||
| const IndexMask selection, | const IndexMask selection, | ||||
| Vector<int64_t> &r_indices) const | Vector<int64_t> &r_indices) const | ||||
| { | { | ||||
| return curves::indices_for_type( | return curves::indices_for_type( | ||||
| this->curve_types(), this->curve_type_counts(), type, selection, r_indices); | this->curve_types(), this->curve_type_counts(), type, selection, r_indices); | ||||
| } | } | ||||
| Array<int> CurvesGeometry::point_to_curve_map() const | |||||
| { | |||||
| Array<int> map(this->points_num()); | |||||
| for (const int i : this->curves_range()) { | |||||
| map.as_mutable_span().slice(this->points_for_curve(i)).fill(i); | |||||
| } | |||||
| return map; | |||||
| } | |||||
| void CurvesGeometry::ensure_nurbs_basis_cache() const | void CurvesGeometry::ensure_nurbs_basis_cache() const | ||||
| { | { | ||||
| if (!this->runtime->nurbs_basis_cache_dirty) { | if (!this->runtime->nurbs_basis_cache_dirty) { | ||||
| return; | return; | ||||
| } | } | ||||
| /* A double checked lock. */ | /* A double checked lock. */ | ||||
| std::scoped_lock lock{this->runtime->nurbs_basis_cache_mutex}; | std::scoped_lock lock{this->runtime->nurbs_basis_cache_mutex}; | ||||
| ▲ Show 20 Lines • Show All 1,013 Lines • Show Last 20 Lines | |||||