/
spivag
/
command_occ
Обзор
Документация
Войти
/
spivag
/
command_occ
Код
Запросы
1
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
initial
commands/attribute_computer.cpp
56 строк
2 KB
spivag
Запрос на слияние 'c3d_sdk_removal' (
#2
) из c3d_sdk_removal в initial
16 апр 2026, 15:34
Верифицирован
16 апр 2026, 15:34
e04e876
Код
Авторство
О чём код?
/** * @file attribute_computer.cpp * @brief Реализация вычислителей атрибутов вершин * @copyright (c) Alexander Spivakov 2025 */ #include "attribute_computer.h" #include <cmath> #include <limits> // ============================================================================ // AttributeComputerFactory implementation // ============================================================================ std::unique_ptr< IAttributeComputer > AttributeComputerFactory::Create( AttributeType type ) { switch ( type ) { case AttributeType::None: return nullptr; // Здесь будут добавлены другие типы: //case AttributeType::GaussCurvature: // return std::make_unique< GaussCurvatureComputer >(); // case AttributeType::MeanCurvature: // return std::make_unique< MeanCurvatureComputer >(); // case AttributeType::MinCurvature: // return std::make_unique< MinCurvatureComputer >(); // case AttributeType::MaxCurvature: // return std::make_unique< MaxCurvatureComputer >(); default: return nullptr; } } std::string AttributeComputerFactory::GetAttributeName( AttributeType type ) { switch ( type ) { case AttributeType::None: return "None"; case AttributeType::GaussCurvature: return "Gauss Curvature"; // case AttributeType::MeanCurvature: // return "Mean Curvature"; // case AttributeType::MinCurvature: // return "Min Principal Curvature"; // case AttributeType::MaxCurvature: // return "Max Principal Curvature"; default: return "Unknown"; } }