Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_curves.hh
| Show First 20 Lines • Show All 865 Lines • ▼ Show 20 Lines | |||||
| inline bool CurvesGeometry::has_curve_with_type(const Span<CurveType> types) const | inline bool CurvesGeometry::has_curve_with_type(const Span<CurveType> types) const | ||||
| { | { | ||||
| return std::any_of( | return std::any_of( | ||||
| types.begin(), types.end(), [&](CurveType type) { return this->has_curve_with_type(type); }); | types.begin(), types.end(), [&](CurveType type) { return this->has_curve_with_type(type); }); | ||||
| } | } | ||||
| inline const std::array<int, CURVE_TYPES_NUM> &CurvesGeometry::curve_type_counts() const | inline const std::array<int, CURVE_TYPES_NUM> &CurvesGeometry::curve_type_counts() const | ||||
| { | { | ||||
| BLI_assert(this->runtime->type_counts == calculate_type_counts(this->curve_types())); | auto a = calculate_type_counts(this->curve_types()); | ||||
| BLI_assert(this->runtime->type_counts == a); | |||||
| return this->runtime->type_counts; | return this->runtime->type_counts; | ||||
| } | } | ||||
| inline IndexRange CurvesGeometry::points_for_curve(const int index) const | inline IndexRange CurvesGeometry::points_for_curve(const int index) const | ||||
| { | { | ||||
| /* Offsets are not allocated when there are no curves. */ | /* Offsets are not allocated when there are no curves. */ | ||||
| BLI_assert(this->curve_num > 0); | BLI_assert(this->curve_num > 0); | ||||
| BLI_assert(this->curve_num > index); | BLI_assert(this->curve_num > index); | ||||
| ▲ Show 20 Lines • Show All 131 Lines • Show Last 20 Lines | |||||