style: aplicar fixes de clang-tidy (todo excepto uppercase-literal-suffix)
Corregidos ~2570 issues automáticamente con clang-tidy --fix-errors más ajustes manuales posteriores: - modernize: designated-initializers, trailing-return-type, use-auto, avoid-c-arrays (→ std::array<>), use-ranges, use-emplace, deprecated-headers, use-equals-default, pass-by-value, return-braced-init-list, use-default-member-init - readability: math-missing-parentheses, implicit-bool-conversion, braces-around-statements, isolate-declaration, use-std-min-max, identifier-naming, else-after-return, redundant-casting, convert-member-functions-to-static, make-member-function-const, static-accessed-through-instance - performance: avoid-endl, unnecessary-value-param, type-promotion, inefficient-vector-operation - dead code: XOR_KEY (orphan tras eliminar encryptData/decryptData), dead stores en engine.cpp y png_shape.cpp - NOLINT justificado en 10 funciones con alta complejidad cognitiva (initialize, render, main, processEvents, update×3, performDemoAction, randomizeOnDemoStart, renderDebugHUD, AppLogo::update) Compilación: gcc -Wall sin warnings. clang-tidy: 0 issues. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "shape.hpp"
|
||||
#include <vector>
|
||||
|
||||
#include "shape.hpp"
|
||||
|
||||
// Figura: Cubo 3D rotante
|
||||
// Distribución:
|
||||
// - 1-8 pelotas: Solo vértices (8 puntos)
|
||||
@@ -10,28 +11,28 @@
|
||||
// - 27+ pelotas: Grid volumétrico 3D uniforme
|
||||
// Comportamiento: Rotación simultánea en ejes X, Y, Z (efecto Rubik)
|
||||
class CubeShape : public Shape {
|
||||
private:
|
||||
float angle_x_ = 0.0f; // Ángulo de rotación en eje X (rad)
|
||||
float angle_y_ = 0.0f; // Ángulo de rotación en eje Y (rad)
|
||||
float angle_z_ = 0.0f; // Ángulo de rotación en eje Z (rad)
|
||||
float size_ = 0.0f; // Mitad del lado del cubo (píxeles)
|
||||
int num_points_ = 0; // Cantidad de puntos generados
|
||||
private:
|
||||
float angle_x_ = 0.0f; // Ángulo de rotación en eje X (rad)
|
||||
float angle_y_ = 0.0f; // Ángulo de rotación en eje Y (rad)
|
||||
float angle_z_ = 0.0f; // Ángulo de rotación en eje Z (rad)
|
||||
float size_ = 0.0f; // Mitad del lado del cubo (píxeles)
|
||||
int num_points_ = 0; // Cantidad de puntos generados
|
||||
|
||||
// Posiciones base 3D (sin rotar) - se calculan en generatePoints()
|
||||
std::vector<float> base_x_;
|
||||
std::vector<float> base_y_;
|
||||
std::vector<float> base_z_;
|
||||
// Posiciones base 3D (sin rotar) - se calculan en generatePoints()
|
||||
std::vector<float> base_x_;
|
||||
std::vector<float> base_y_;
|
||||
std::vector<float> base_z_;
|
||||
|
||||
public:
|
||||
void generatePoints(int num_points, float screen_width, float screen_height) override;
|
||||
void update(float delta_time, float screen_width, float screen_height) override;
|
||||
void getPoint3D(int index, float& x, float& y, float& z) const override;
|
||||
const char* getName() const override { return "CUBE"; }
|
||||
float getScaleFactor(float screen_height) const override;
|
||||
public:
|
||||
void generatePoints(int num_points, float screen_width, float screen_height) override;
|
||||
void update(float delta_time, float screen_width, float screen_height) override;
|
||||
void getPoint3D(int index, float& x, float& y, float& z) const override;
|
||||
const char* getName() const override { return "CUBE"; }
|
||||
float getScaleFactor(float screen_height) const override;
|
||||
|
||||
private:
|
||||
// Métodos auxiliares para distribución de puntos
|
||||
void generateVertices(); // 8 vértices
|
||||
void generateVerticesAndCenters(); // 26 puntos (vértices + caras + aristas)
|
||||
void generateVolumetricGrid(); // Grid 3D para muchas pelotas
|
||||
private:
|
||||
// Métodos auxiliares para distribución de puntos
|
||||
void generateVertices(); // 8 vértices
|
||||
void generateVerticesAndCenters(); // 26 puntos (vértices + caras + aristas)
|
||||
void generateVolumetricGrid(); // Grid 3D para muchas pelotas
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user