14#include "../Material.h"
15#include "../Static/GradientMaterial.h"
16#include "../../../Physics/Utils/BouncePhysics.h"
130 void Update(
float* readData);
Simulates bouncing physics with gravity and velocity damping.
Creates a customizable gradient material for rendering.
Abstract base class for rendering materials.
Represents an RGB color and provides methods for manipulation.
A material that visualizes audio data as a spectrum.
RGBColor rainbowSpectrum[6]
Predefined rainbow color gradient.
void SetPosition(Vector2D offset)
Sets the position of the visualization area.
float bounceData[128]
Processed bounce data for visualization.
float * data
Pointer to the input audio data.
BouncePhysics * bPhy[128]
Array of bounce physics objects for each frequency bin.
float hueAngle
Hue adjustment angle for the spectrum colors.
bool flipY
Whether to flip the visualization along the Y-axis.
void SetMirrorYState(bool state)
Sets the mirroring state for the visualization.
bool bounce
Whether to apply bouncing animation to the spectrum.
float * GetFourierData()
Retrieves the Fourier data used for visualization.
void Update(float *readData)
Updates the spectrum visualization with new audio data.
RGBColor GetRGB(const Vector3D &position, const Vector3D &normal, const Vector3D &uvw) override
Computes the color at a given position in the material.
void SetFlipYState(bool state)
Sets the flipping state for the visualization.
void SetSize(Vector2D size)
Sets the size of the visualization area.
Vector2D offset
Offset position of the visualization area.
float angle
Rotation angle of the visualization.
GradientMaterial< 6 > gM
Gradient material for coloring the spectrum.
uint8_t colors
Number of colors in the gradient.
void SetMaterial(Material *material)
Sets a custom material for additional effects.
void SetRotation(float angle)
Sets the rotation angle of the visualization.
bool mirrorY
Whether to mirror the visualization along the Y-axis.
Material * material
Optional sub-material for additional effects.
~SpectrumAnalyzer()
Destructor for SpectrumAnalyzer.
uint8_t bins
Number of frequency bins.
void SetHueAngle(float hueAngle)
Sets the hue adjustment angle for the spectrum colors.
Vector2D size
Size of the visualization area.
Represents a 2D vector (X, Y) and provides methods for vector arithmetic.
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.