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;
44 for (
const int i :
IndexRange(resolution + 1)) {
45 const float factor = step * i;
60 std::max(
params.extract_input<
int>(
"Resolution"), 3));
68 &ntype, GEO_NODE_CURVE_PRIMITIVE_QUADRATIC_BEZIER,
"Quadratic Bézier",
NODE_CLASS_GEOMETRY);
Low-level operations for curves.
#define NODE_CLASS_GEOMETRY
#define NOD_REGISTER_NODE(REGISTER_FUNC)
local_group_size(16, 16) .push_constant(Type b
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)
void geo_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
static GeometrySet from_curves(Curves *curves, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
NodeGeometryExecFunction geometry_node_execute
NodeDeclareFunction declare