Differential D13033 Diff 44115 source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_ico_sphere.cc
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_ico_sphere.cc
| Show All 22 Lines | |||||
| #include "bmesh.h" | #include "bmesh.h" | ||||
| #include "node_geometry_util.hh" | #include "node_geometry_util.hh" | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static void geo_node_mesh_primitive_ico_sphere_declare(NodeDeclarationBuilder &b) | static void geo_node_mesh_primitive_ico_sphere_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_input<decl::Float>("Radius").default_value(1.0f).min(0.0f).subtype(PROP_DISTANCE); | b.add_input<decl::Float>(N_("Radius")).default_value(1.0f).min(0.0f).subtype(PROP_DISTANCE); | ||||
| b.add_input<decl::Int>("Subdivisions").default_value(1).min(1).max(7); | b.add_input<decl::Int>(N_("Subdivisions")).default_value(1).min(1).max(7); | ||||
| b.add_output<decl::Geometry>("Mesh"); | b.add_output<decl::Geometry>(N_("Mesh")); | ||||
| } | } | ||||
| static Mesh *create_ico_sphere_mesh(const int subdivisions, const float radius) | static Mesh *create_ico_sphere_mesh(const int subdivisions, const float radius) | ||||
| { | { | ||||
| const float4x4 transform = float4x4::identity(); | const float4x4 transform = float4x4::identity(); | ||||
| const BMeshCreateParams bmcp = {true}; | const BMeshCreateParams bmcp = {true}; | ||||
| const BMAllocTemplate allocsize = {0, 0, 0, 0}; | const BMAllocTemplate allocsize = {0, 0, 0, 0}; | ||||
| ▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines | |||||