Blender  V3.3
Classes | Functions
blender::nodes::node_geo_curve_spline_parameter_cc Namespace Reference

Classes

class  CurveParameterFieldInput
 
class  CurveLengthParameterFieldInput
 
class  IndexOnSplineFieldInput
 

Functions

static void node_declare (NodeDeclarationBuilder &b)
 
static Array< floataccumulated_lengths_curve_domain (const bke::CurvesGeometry &curves)
 
static Array< floatcurve_length_point_domain (const bke::CurvesGeometry &curves)
 
static VArray< floatconstruct_curve_parameter_varray (const bke::CurvesGeometry &curves, const IndexMask UNUSED(mask), const eAttrDomain domain)
 
static VArray< floatconstruct_curve_length_parameter_varray (const bke::CurvesGeometry &curves, const IndexMask UNUSED(mask), const eAttrDomain domain)
 
static VArray< int > construct_index_on_spline_varray (const bke::CurvesGeometry &curves, const IndexMask UNUSED(mask), const eAttrDomain domain)
 
static void node_geo_exec (GeoNodeExecParams params)
 

Function Documentation

◆ accumulated_lengths_curve_domain()

static Array<float> blender::nodes::node_geo_curve_spline_parameter_cc::accumulated_lengths_curve_domain ( const bke::CurvesGeometry curves)
static

For lengths on the curve domain, a basic interpolation from the point domain would be useless, since the average parameter for each curve would just be 0.5, or close to it. Instead, the value for each curve is defined as the portion of the total length of all curves at its start.

Definition at line 33 of file node_geo_curve_spline_parameter.cc.

References curves, and blender::math::length().

Referenced by construct_curve_length_parameter_varray().

◆ construct_curve_length_parameter_varray()

static VArray<float> blender::nodes::node_geo_curve_spline_parameter_cc::construct_curve_length_parameter_varray ( const bke::CurvesGeometry curves,
const IndexMask   UNUSEDmask,
const eAttrDomain  domain 
)
static

◆ construct_curve_parameter_varray()

static VArray<float> blender::nodes::node_geo_curve_spline_parameter_cc::construct_curve_parameter_varray ( const bke::CurvesGeometry curves,
const IndexMask   UNUSEDmask,
const eAttrDomain  domain 
)
static

◆ construct_index_on_spline_varray()

static VArray<int> blender::nodes::node_geo_curve_spline_parameter_cc::construct_index_on_spline_varray ( const bke::CurvesGeometry curves,
const IndexMask   UNUSEDmask,
const eAttrDomain  domain 
)
static

◆ curve_length_point_domain()

static Array<float> blender::nodes::node_geo_curve_spline_parameter_cc::curve_length_point_domain ( const bke::CurvesGeometry curves)
static

Return the length of each control point along each curve, starting at zero for the first point. Importantly, this is different than the length at each evaluated point. The implementation is different for every curve type:

  • Catmull Rom Curves: Use the resolution to find the evaluated point for each control point.
  • Poly Curves: Copy the evaluated lengths, but we need to add a zero to the front of the array.
  • Bezier Curves: Use the evaluated offsets to find the evaluated point for each control point.
  • NURBS Curves: Treat the control points as if they were a poly curve, because there is no obvious mapping from each control point to a specific evaluated point.

Definition at line 58 of file node_geo_curve_spline_parameter.cc.

References curves, blender::threading::parallel_for(), result, and types.

Referenced by construct_curve_length_parameter_varray(), and construct_curve_parameter_varray().

◆ node_declare()

static void blender::nodes::node_geo_curve_spline_parameter_cc::node_declare ( NodeDeclarationBuilder b)
static

◆ node_geo_exec()

static void blender::nodes::node_geo_curve_spline_parameter_cc::node_geo_exec ( GeoNodeExecParams  params)
static

Definition at line 312 of file node_geo_curve_spline_parameter.cc.

References params.

Referenced by register_node_type_geo_curve_spline_parameter().