Код: Выделить всё
Sphere::Sphere(const LengthT radius, const LengthT a, const LengthT b, const LengthT c, , std::uint16_t sectorCount, std::uint16_t stackCount) :
m_radius(radius),
m_sectorCount(sectorCount),
m_stackCount(stackCount) {
const double sectorStep{2 * std::numbers::pi / m_sectorCount};
const double stackStep{std::numbers::pi / m_stackCount};
constexpr double half_pi{std::numbers::pi / 2};
double xy, sectorAngle, stackAngle;
const auto lengthInv{double(1) / m_radius};
for(std::uint16_t i{0}; i
Подробнее здесь: [url]https://stackoverflow.com/questions/78475367/how-to-convert-spherical-geometry-to-ellipsoid-geometry-c-vertex-generation[/url]