Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/curve_eval.cc
| Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | |||||
| void CurveEval::transform(const float4x4 &matrix) | void CurveEval::transform(const float4x4 &matrix) | ||||
| { | { | ||||
| for (SplinePtr &spline : this->splines()) { | for (SplinePtr &spline : this->splines()) { | ||||
| spline->transform(matrix); | spline->transform(matrix); | ||||
| } | } | ||||
| } | } | ||||
| void CurveEval::bounds_min_max(float3 &min, float3 &max, const bool use_evaluated) const | bool CurveEval::bounds_min_max(float3 &min, float3 &max, const bool use_evaluated) const | ||||
| { | { | ||||
| bool have_minmax = false; | |||||
| for (const SplinePtr &spline : this->splines()) { | for (const SplinePtr &spline : this->splines()) { | ||||
| if (spline->size()) { | |||||
| spline->bounds_min_max(min, max, use_evaluated); | spline->bounds_min_max(min, max, use_evaluated); | ||||
| have_minmax = true; | |||||
| } | } | ||||
| } | } | ||||
| return have_minmax; | |||||
| } | |||||
| float CurveEval::total_length() const | float CurveEval::total_length() const | ||||
| { | { | ||||
| float length = 0.0f; | float length = 0.0f; | ||||
| for (const SplinePtr &spline : this->splines()) { | for (const SplinePtr &spline : this->splines()) { | ||||
| length += spline->length(); | length += spline->length(); | ||||
| } | } | ||||
| return length; | return length; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 273 Lines • Show Last 20 Lines | |||||