17 .description(
"The number of edges on the curve");
19 .default_value({-1.0f, 0.0f, 0.0f})
21 .
description(
"Position of the first control point");
23 .default_value({0.0f, 2.0f, 0.0f})
25 .
description(
"Position of the middle control point");
27 .default_value({1.0f, 0.0f, 0.0f})
43 const float step = 1.0f / resolution;
45 const float factor =
step *
i;
60 std::max(
params.extract_input<
int>(
"Resolution"), 3));
69 ntype.
ui_name =
"Quadratic Bézier";
71 "Generate a poly spline in a parabola shape with control points positions";
Low-level operations for curves.
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_CURVE_PRIMITIVE_QUADRATIC_BEZIER
#define NOD_REGISTER_NODE(REGISTER_FUNC)
MutableSpan< float3 > positions_for_write()
VecBase< float, D > step(VecOp< float, D >, VecOp< float, D >) RET
void node_register_type(bNodeType &ntype)
Curves * curves_new_nomain_single(int points_num, CurveType type)
T interpolate(const T &a, const T &b, const FactorT &t)
static void node_register()
static Curves * create_quadratic_bezier_curve(const float3 p1, const float3 p2, const float3 p3, const int resolution)
static void node_declare(NodeDeclarationBuilder &b)
static void node_geo_exec(GeoNodeExecParams params)
VecBase< float, 3 > float3
void geo_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
NodeDeclareFunction declare
static GeometrySet from_curves(Curves *curves, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)