18 "For curves, point clouds, and Grease Pencil, take the radius attribute into account "
19 "when computing the bounds.");
20 b.add_output<
decl::Geometry>(
"Bounding Box").propagate_all_instance_attributes();
28 const bool use_radius =
params.extract_input<
bool>(
"Use Radius");
46 if (
params.output_is_required(
"Bounding Box")) {
48 std::optional<Bounds<float3>> sub_bounds;
51 if (&sub_geometry == &geometry_set) {
62 const float3 scale = sub_bounds->max - sub_bounds->min;
63 const float3 center = sub_bounds->min + scale / 2.0f;
71 params.set_output(
"Bounding Box", std::move(geometry_set));
81 "Calculate the limits of a geometry's positions and generate a box mesh with those "
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_BOUNDING_BOX
#define NOD_REGISTER_NODE(REGISTER_FUNC)
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, std::string idname, const std::optional< int16_t > legacy_type)
std::optional< Bounds< float3 > > compute_boundbox_without_instances(bool use_radius=true, bool use_subdiv=false) const
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)
void remove_geometry_during_modify()
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
NodeDeclareFunction declare
static QuaternionBase identity()