#ifndef GLTEST_SPECTRALMESH_H
#define GLTEST_SPECTRALMESH_H

#include "Mesh.h"
#include <fftw3.h>

class SpectralMesh: public Mesh {
private:
	float* _data;
	float* _spectrLine;
	fftwf_complex* _spectrLineComplex;

public:
	SpectralMesh(ShaderProgram* shader, std::size_t size);
	virtual ~SpectralMesh();
	void addLine(float* line, std::size_t depth = 0);

private:
	float heightMap(std::size_t nx, std::size_t ny) const override final;
	float heightMap(float fx, float fy) const override final;
	void normalizeArray(float* array, std::size_t size);
};


#endif //GLTEST_SPECTRALMESH_H
