Implementar figura ICOSAHEDRON (D20 poliedro) - Tecla U
- Nueva clase IcosahedronShape con 12 vértices golden ratio - Vértices basados en 3 rectángulos áureos ortogonales - Subdivisión de caras para más de 12 puntos - Rotación triple simultánea (X, Y, Z) - Proyección a esfera circunscrita - Compatible con física spring-damper y z-sorting 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -23,12 +23,13 @@
|
||||
#include "ball.h" // for Ball
|
||||
#include "external/dbgtxt.h" // for dbg_init, dbg_print
|
||||
#include "external/texture.h" // for Texture
|
||||
#include "shapes/sphere_shape.h" // for SphereShape
|
||||
#include "shapes/cube_shape.h" // for CubeShape
|
||||
#include "shapes/helix_shape.h" // for HelixShape
|
||||
#include "shapes/wave_grid_shape.h" // for WaveGridShape
|
||||
#include "shapes/torus_shape.h" // for TorusShape
|
||||
#include "shapes/cylinder_shape.h" // for CylinderShape
|
||||
#include "shapes/sphere_shape.h" // for SphereShape
|
||||
#include "shapes/cube_shape.h" // for CubeShape
|
||||
#include "shapes/helix_shape.h" // for HelixShape
|
||||
#include "shapes/wave_grid_shape.h" // for WaveGridShape
|
||||
#include "shapes/torus_shape.h" // for TorusShape
|
||||
#include "shapes/cylinder_shape.h" // for CylinderShape
|
||||
#include "shapes/icosahedron_shape.h" // for IcosahedronShape
|
||||
|
||||
// Función auxiliar para obtener la ruta del directorio del ejecutable
|
||||
std::string getExecutableDirectory() {
|
||||
@@ -1084,6 +1085,9 @@ void Engine::activateShape(ShapeType type) {
|
||||
case ShapeType::CYLINDER:
|
||||
active_shape_ = std::make_unique<CylinderShape>();
|
||||
break;
|
||||
case ShapeType::ICOSAHEDRON:
|
||||
active_shape_ = std::make_unique<IcosahedronShape>();
|
||||
break;
|
||||
// Futuras figuras se añadirán aquí
|
||||
default:
|
||||
active_shape_ = std::make_unique<SphereShape>(); // Fallback
|
||||
|
||||
Reference in New Issue
Block a user