Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_curve_parameter.cc
| Show All 18 Lines | |||||
| #include "BKE_spline.hh" | #include "BKE_spline.hh" | ||||
| #include "node_geometry_util.hh" | #include "node_geometry_util.hh" | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static void geo_node_curve_parameter_declare(NodeDeclarationBuilder &b) | static void geo_node_curve_parameter_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_output<decl::Float>("Factor"); | b.add_output<decl::Float>("Factor").field_source(); | ||||
| } | } | ||||
| /** | /** | ||||
| * A basic interpolation from the point domain to the spline domain would be useless, since the | * A basic interpolation from the point domain to the spline domain would be useless, since the | ||||
| * average parameter for each spline would just be 0.5, or close to it. Instead, the parameter for | * average parameter for each spline would just be 0.5, or close to it. Instead, the parameter for | ||||
| * each spline is the portion of the total length at the start of the spline. | * each spline is the portion of the total length at the start of the spline. | ||||
| */ | */ | ||||
| static Array<float> curve_parameter_spline_domain(const CurveEval &curve, const IndexMask mask) | static Array<float> curve_parameter_spline_domain(const CurveEval &curve, const IndexMask mask) | ||||
| ▲ Show 20 Lines • Show All 171 Lines • Show Last 20 Lines | |||||