21 .description(
N_(
"Side length along each axis"));
26 .
description(
N_(
"Number of vertices for the X side of the shape"));
31 .
description(
N_(
"Number of vertices for the Y side of the shape"));
36 .
description(
N_(
"Number of vertices for the Z side of the shape"));
55 const int dimensions = (verts_x - 1 > 0) + (verts_y - 1 > 0) + (verts_z - 1 > 0);
56 if (dimensions == 0) {
59 if (dimensions == 1) {
63 start = {-
size.x / 2.0f, 0, 0};
64 delta = {
size.x / (verts_x - 1), 0, 0};
66 else if (verts_y > 1) {
67 start = {0, -
size.y / 2.0f, 0};
68 delta = {0,
size.y / (verts_y - 1), 0};
71 start = {0, 0, -
size.z / 2.0f};
72 delta = {0, 0,
size.z / (verts_z - 1)};
77 if (dimensions == 2) {
98 const int verts_x =
params.extract_input<
int>(
"Vertices X");
99 const int verts_y =
params.extract_input<
int>(
"Vertices Y");
100 const int verts_z =
params.extract_input<
int>(
"Vertices Z");
101 if (verts_x < 1 || verts_y < 1 || verts_z < 1) {
103 params.set_default_remaining_outputs();
General operations, lookup, etc. for materials.
void BKE_id_material_eval_ensure_default_slot(struct ID *id)
#define GEO_NODE_MESH_PRIMITIVE_CUBE
#define NODE_CLASS_GEOMETRY
void nodeRegisterType(struct bNodeType *ntype)
in reality light always falls off quadratically Particle Info
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
StringRefNull description() const
Mesh * create_cuboid_mesh(const float3 &size, int verts_x, int verts_y, int verts_z, const bke::AttributeIDRef &uv_id)
static void node_declare(NodeDeclarationBuilder &b)
static Mesh * create_cube_mesh(const float3 size, const int verts_x, const int verts_y, const int verts_z)
static void node_geo_exec(GeoNodeExecParams params)
static Mesh * create_cuboid_mesh(const float3 &size, const int verts_x, const int verts_y, const int verts_z)
Mesh * create_line_mesh(const float3 start, const float3 delta, int count)
void transform_mesh(Mesh &mesh, const float3 translation, const float3 rotation, const float3 scale)
Mesh * create_grid_mesh(int verts_x, int verts_y, float size_x, float size_y)
vec_base< float, 3 > float3
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void register_node_type_geo_mesh_primitive_cube()
void geo_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
static GeometrySet create_with_mesh(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
NodeGeometryExecFunction geometry_node_execute
NodeDeclareFunction declare