30 .description(
"Number of vertices on the circle");
35 .description(
"Distance of the vertices from the origin");
131 const float angle_delta = 2.0f * (
M_PI /
float(verts_num));
133 const float angle =
i * angle_delta;
142 int2 &edge = edges[
i];
144 edge[1] = (
i + 1) % verts_num;
150 int2 &edge = edges[verts_num +
i];
158 face_offsets.
first() = 0;
159 face_offsets.
last() = corner_verts.
size();
164 mesh->tag_loose_edges_none();
168 face_offsets[
i] = 3 *
i;
171 corner_verts[3 *
i] =
i;
172 corner_edges[3 *
i] =
i;
174 corner_verts[3 *
i + 1] = (
i + 1) % verts_num;
175 corner_edges[3 *
i + 1] = verts_num + ((
i + 1) % verts_num);
177 corner_verts[3 *
i + 2] = verts_num;
178 corner_edges[3 *
i + 2] = verts_num +
i;
182 mesh->tag_loose_verts_none();
183 mesh->tag_overlapping_none();
194 const float radius =
params.extract_input<
float>(
"Radius");
195 const int verts_num =
params.extract_input<
int>(
"Vertices");
198 params.set_default_remaining_outputs();
General operations, lookup, etc. for materials.
void BKE_id_material_eval_ensure_default_slot(ID *id)
Mesh * BKE_mesh_new_nomain(int verts_num, int edges_num, int faces_num, int corners_num)
#define NODE_STORAGE_FUNCS(StorageT)
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_MESH_PRIMITIVE_CIRCLE
#define BLI_assert_unreachable()
GeometryNodeMeshCircleFillType
@ GEO_NODE_MESH_CIRCLE_FILL_NGON
@ GEO_NODE_MESH_CIRCLE_FILL_TRIANGLE_FAN
@ GEO_NODE_MESH_CIRCLE_FILL_NONE
static double angle(const Eigen::Vector3d &v1, const Eigen::Vector3d &v2)
#define NOD_REGISTER_NODE(REGISTER_FUNC)
#define NOD_storage_enum_accessors(member)
constexpr int64_t size() const
constexpr T & first() const
constexpr IndexRange index_range() const
constexpr T & last(const int64_t n=0) const
void * MEM_callocN(size_t len, const char *str)
void fill_index_range(MutableSpan< T > span, const T start=0)
void node_register_type(bNodeType &ntype)
void mesh_smooth_set(Mesh &mesh, bool use_smooth, bool keep_sharp_edges=false)
void node_type_storage(bNodeType &ntype, std::optional< StringRefNull > storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
Bounds< float3 > calculate_bounds_radial_primitive(float radius_top, float radius_bottom, int segments, float height)
static void node_layout(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_geo_exec(GeoNodeExecParams params)
static int circle_edge_total(const GeometryNodeMeshCircleFillType fill_type, const int verts_num)
static int circle_corner_total(const GeometryNodeMeshCircleFillType fill_type, const int verts_num)
static void node_rna(StructRNA *srna)
static void node_register()
static void node_declare(NodeDeclarationBuilder &b)
static int circle_vert_total(const GeometryNodeMeshCircleFillType fill_type, const int verts_num)
static void node_init(bNodeTree *, bNode *node)
static Mesh * create_circle_mesh(const float radius, const int verts_num, const GeometryNodeMeshCircleFillType fill_type)
static int circle_face_total(const GeometryNodeMeshCircleFillType fill_type, const int verts_num)
static Bounds< float3 > calculate_bounds_circle(const float radius, const int verts_num)
PropertyRNA * RNA_def_node_enum(StructRNA *srna, const char *identifier, const char *ui_name, const char *ui_description, const EnumPropertyItem *static_items, const EnumRNAAccessors accessors, std::optional< int > default_value, const EnumPropertyItemFunc item_func, const bool allow_animation)
VecBase< int32_t, 2 > int2
VecBase< float, 3 > float3
void geo_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
void node_free_standard_storage(bNode *node)
void node_copy_standard_storage(bNodeTree *, bNode *dest_node, const bNode *src_node)
const EnumPropertyItem rna_enum_node_geometry_mesh_circle_fill_type_items[]
std::string ui_description
void(* initfunc)(bNodeTree *ntree, bNode *node)
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeDeclareFunction declare
static GeometrySet from_mesh(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
void use_property_decorate_set(bool is_sep)
void use_property_split_set(bool value)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)