Differential D12633 Diff 42457 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::Int>("Subdivisions").default_value(1).min(1).max(7); | b.add_input<decl::Int>("Subdivisions").default_value(1).min(1).max(7); | ||||
| b.add_input<decl::Float>("Radius").default_value(1.0f).min(0.0f).subtype(PROP_DISTANCE); | |||||
| b.add_output<decl::Geometry>("Geometry"); | b.add_output<decl::Geometry>("Geometry"); | ||||
| } | } | ||||
| 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}; | ||||
| ▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines | |||||