32 params.set_output(
"Min", bounds->min);
33 params.set_output(
"Max", bounds->max);
39 if (
params.output_is_required(
"Bounding Box")) {
41 std::optional<Bounds<float3>> sub_bounds;
44 if (&sub_geometry == &geometry_set) {
55 const float3 scale = sub_bounds->max - sub_bounds->min;
56 const float3 center = sub_bounds->min + scale / 2.0f;
64 params.set_output(
"Bounding Box", std::move(geometry_set));
#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)
void transform_mesh(Mesh &mesh, float3 translation, math::Quaternion rotation, float3 scale)
Mesh * create_cuboid_mesh(const float3 &size, int verts_x, int verts_y, int verts_z, const std::optional< StringRef > &uv_id)
static void node_declare(NodeDeclarationBuilder &b)
static void node_geo_exec(GeoNodeExecParams params)
static void node_register()
VecBase< float, 3 > float3
void geo_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
void keep_only_during_modify(Span< GeometryComponent::Type > component_types)
void modify_geometry_sets(ForeachSubGeometryCallback callback)
void replace_mesh(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
std::optional< Bounds< float3 > > compute_boundbox_without_instances() const
void remove_geometry_during_modify()
NodeGeometryExecFunction geometry_node_execute
NodeDeclareFunction declare
static QuaternionBase identity()