Files
test2/source/blender/geometry/GEO_mesh_primitive_uv_sphere.hh
Hans Goudey 7344c7875a Geometry: Move mesh primitives from nodes to geometry module
This makes the code reusable in a few more places,
particularly by tests for a new boolean implementation
also defined in the geometry module.

It also makes the way some primitives are reused among
different nodes a bit clearer.

Pull Request: https://projects.blender.org/blender/blender/pulls/112255
2023-09-11 22:49:41 +02:00

32 lines
905 B
C++

/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
#include "BLI_bounds_types.hh"
#include "BLI_math_vector_types.hh"
struct Mesh;
namespace blender::bke {
class AttributeIDRef;
} // namespace blender::bke
namespace blender::geometry {
/**
* Calculates the bounds of a radial primitive.
* The algorithm assumes X-axis symmetry of primitives.
*/
Bounds<float3> calculate_bounds_radial_primitive(float radius_top,
float radius_bottom,
int segments,
float height);
Mesh *create_uv_sphere_mesh(float radius,
int segments,
int rings,
const bke::AttributeIDRef &uv_map_id);
} // namespace blender::geometry